AvaloniaUI / avalonia-docs

https://docs.avaloniaui.net/docs/welcome
57 stars 187 forks source link

Add helpful context to example in tray-icon.md #499

Closed logiclrd closed 3 months ago

logiclrd commented 3 months ago

This PR updates the example in tray-icon.md in two ways:

  1. 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>.

  2. 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.