I need to know how to set the very top left icon / image on a WPF page. I know how to do it in a WPF Window the page looks to be different.
Thanks,
Darren
I need to know how to set the very top left icon / image on a WPF page. I know how to do it in a WPF Window the page looks to be different.
Thanks,
Darren
Hi Darren,
Are you referring to a WPF application deployed as an XBAP, if so the same rules apply as a normal website and you would just place a favicon.ico in the root of your IIS website.
I don't think there's any support for changing the host window's icon based on its current page in a navigation-style application.
One workaround might be to introduce a property of type Image into your pages (perhaps derive all your pages from a base page, or introduce an IHasIcon interface and implement that), then bind the host window's icon to that. Something along the lines of:
<Window ...
Icon="{Binding Content.Icon,ElementName=frame1>
<Frame x:Name="frame1" ... />
</Window>
I haven't tried this but I've done similar things with binding a TextBlock to the "title" of the current page in a navigation application.