http://msdn.microsoft.com/en-us/library/system.windows.window.icon.aspx

A WPF window always displays an icon. When one is not provided by setting Icon, WPF chooses an icon to display based on the following rules:

  1. Use the assembly icon, if specified.

  2. If the assembly icon is not specified, use the default Microsoft Windows icon.

 

 

可以使用程序集级别的icon,也可以自己指定

// Set an icon using code
Uri iconUri = new Uri("pack://application:,,,/WPFIcon2.ico", UriKind.RelativeOrAbsolute);
this.Icon = BitmapFrame.Create(iconUri);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-10
  • 2022-01-17
  • 2022-01-03
  • 2021-11-09
  • 2021-04-29
猜你喜欢
  • 2021-06-29
  • 2021-12-01
  • 2022-12-23
  • 2021-10-30
  • 2022-02-03
  • 2022-12-23
  • 2022-02-02
相关资源
相似解决方案