This PR updates the example in tray-icon.md in two ways:
The <TrayIcon.Icons> snippet is placed in context. When I tried to use this yesterday, I saw the snippet and thought, "Well, that's great but where do I put that?" The page does say App.xaml, and yes, you do just drop it in there, but there was uncertainty there that a <TrayIcon.Icons> element could simply go directly in as a child of the root <Application>.
The sample references an icon as "/Assets/avalonia-logo.ico", but it doesn't say how you get that icon there. After some fiddling and searching and experimentation, I finally discovered that it works if I put an <AvaloniaResource> item into my .csproj. So, this PR adds a mention of this fact for future readers.
This PR updates the example in tray-icon.md in two ways:
The
<TrayIcon.Icons>
snippet is placed in context. When I tried to use this yesterday, I saw the snippet and thought, "Well, that's great but where do I put that?" The page does sayApp.xaml
, and yes, you do just drop it in there, but there was uncertainty there that a<TrayIcon.Icons>
element could simply go directly in as a child of the root<Application>
.The sample references an icon as "/Assets/avalonia-logo.ico", but it doesn't say how you get that icon there. After some fiddling and searching and experimentation, I finally discovered that it works if I put an
<AvaloniaResource>
item into my.csproj
. So, this PR adds a mention of this fact for future readers.