Skip to content

Icons won't show when not using pack URIs #24

@Stanzilla

Description

@Stanzilla

When using the C# API to create a new tray icon menu entry like so:

var launchItem = new MenuItem() 
{ 
	Header = "Test",
    Icon = new Image() 
	{ 
		Source = new BitmapImage(new Uri("LogoIcon.ico", UriKind.Relative)) 
	}          
}
launchItem.Click += (o, e) => Logic.OpenEditor("Test2");
TaskbarContextMenu.Items.Add(launchItem);

The icon won't show next to the menu entry. If you use

Icon = new Image() 
{ 
	Source = new BitmapImage(new uri("pack://application:,,,/WpfProject1;component/LogoIcon.ico")) 
}

instead, it does show correctly.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions