RadRibbonWindow is not loading application icon from embedded resource - wpf

Recently I have changed my WPF application Root window from Window to RadRibbonWindow and this RadRibbonwindow is not loading application Icon from embedded resources. What do I need to do, to make RabRibbonWindow load an icon "ico" from resources automatically? My all other Windows are loading Icon from embedded resources automatically.

in your header:
navigation:RadWindowInteropHelper.Icon="icon.ico"
from this example https://www.telerik.com/support/kb/wpf/window/details/how-to-use-radwindow-as-main-window
and the file icon.ico is in the root folder.

Related

icon in task bar will not change when winform is published

I have a winform app running on .net 4. When a certain condition happens, the icon running in the task bar changes from ping_logo to ping_logo_red. (the icon i'm talking about is the one that shows up when you run an application. You click on it and it will restore the windows to the screen or minimize it) The way that the icon is changing is as follows.
I added the ico files as Resources. In the code I change the resource being used
Me.Icon = My.Resources.ping_logo_red
Here is the thing. This works when I run the exe from my machine from the solution bin/release folder. When I publish this and install it from the published location, the icon does not change.
In the publish tab under the project both ping_logo.ico and ping_logo_red.ico are included in the publish status.
what have I not done that is keeping the icon from working in the published app. I've tried to uninstall the app and install it fresh but that doesn't seem to make a difference.
thanks
shannon
If you are using ClickOnce to publish your application then you need to set the icon property in the properties window of your project.
Right click your project -> Properties
Go to application tab
Select your icon file towards the bottom.
Another idea is changing the CopyToOutput property of your .ico file to "Copy Always" or "Copy If Newer".

Custom Font in Silverlight OOB

Can anyone give me a hand on how to use Custom fonts in a Silverlight app in OOB? It works in the browser correctly.
Furthermore, the font is working and referenced correctly as the designer renders what I am after, but when running the app it is ignored.
Thanks heaps
Edit :
Trying to emulate a Mutlimeter display (thus OOB)
FontFamily="/BNA;component/Fonts/Fonts.zip#Crystal"
Font Properties Build Action = "Resource", Copy to Output Directory = "Copy Always"
Got it sorted, had to embed in to the client app side using
FontFamily="/BNA;component/Crysta.ttf#Crystal" and setting the Font as a Resource

WPF doesn't load images correctly

I have some icons in my WPF project to make the application more user friendly. WPF shows all icons on my computer but when I run the app on other computers it will show some of icons but not all of them. How can I fix it?
Update:
<Image Source="Office/Add-Female-User.ico" Stretch="None" />
I'm sure that all images are accessible because some of them are visible.
You are referencing your images (in your image controls) as Content not Resource. I suspect the problem is your images aren't copied to the output dir. View properties on missing image files and set build action to Content and Copy to output dir to Copy if newer.
For resource referencing see http://msdn.microsoft.com/en-us/library/aa970069.aspx.

WPF installation

I'm new to WPF, and created a 1st simplistic WPF application that I want it to run in a webbrowser, IE or Fox.
1 - Within the Visual Studio project, I created a /Images folder with a few .jpg files
On the WPF xaml form I have 1 image and 1 button.
When application starts, the image displays /Images/img1.jpg
When User clicks the button the image must display /Images/img2.jpg
How can I force the VS publisher to include the Images folder? Apparently I can't see it in the ApplicationFiles ?
2 - Though I was able to program and run this small app on my local computer, I'm getting lost when it comes to deploying to my hosting ASP where I have a Windows hosting account that runs .NET 3.5!
From Microsoft WPF website they say I shall deploy 3 files:
"The Application Executable .exe
The Deployment Manifest .xbap
The application Manifest .manifest
The .xbap file contains the information that ClickOnce uses to deploy the application and has the .xbap extension."
But I can's see no .xbap files at all within the published stuff!!!
Any clue please?
To answer your first question:
The images will be embedded in the compiled application, so you will not see the images in the application files.
Note:
The build action of images added to your project is 'Resource' by default - leave this as is.
Do not use the resources tab in the Project properties window, just drop and drag the images into the Images folder in the solution explorer.
To help answer your second question:
Did you create the project as an WPF Browser Application?
In your .csproj file you should see the following:
<HostInBrowser>true</HostInBrowser>
<Install>False</Install>
<ApplicationExtension>.xbap</ApplicationExtension>
<TargetZone>Internet</TargetZone>
If not, just recreate the project as a WPF Browser Application and copy your files from the existing project to the new one.

How to use relative path of Silverlight app in image control inside user control?

I created a custom user control which contains an <Image /> control. My user control is bound to a CLR object which contains the proper filename to use for the <Image> Source property.
The user control is located under Controls folder in my Silverlight app. When the app runs, the image is only displayed if the image is in the same folder as the user control (i.e. the image must in the Controls folder).
How can I make the image source be relative to the location the Silverlight app is running?
The app is hosted in an ASP.NET MVC application.
A relative path that starts with "/" is considered be routed at the top level of the XAP file and (if the resource is not found in the Xap) in the server folder from which the XAP was downloaded.
In other words place a "/" at the beginning or your Urls and you will probably get the behaviour you describe.

Resources