Telerik RadWindow icon not displayed on task bar c# wpf [duplicate]

£可爱£侵袭症+ 提交于 2019-12-07 03:10:33

Hey you can try this out

    private void MainWindow_Loaded(object sender, RoutedEventArgs e)
    {
        Window window = (sender as RadWindow).ParentOfType<Window>();            
        if (window != null)
        {
            window.ShowInTaskbar = true;
            window.Icon = BitmapFrame.Create(new Uri("pack://application:,,,/Screener;Component/Images/Screener1.ico", UriKind.RelativeOrAbsolute));
        }
        throw new NotImplementedException();
    }

The taskbar is showing the icon of the active window. Set the icon of the active window.

The icon that you have set in the Application tab of the project Properties Window is the icon that will be applied to the project assembly file. If you look into your project's bin folder, you should see your icon on the executable file.

If you want to set an icon to appear in the title bar of your running application, then you need to set the Window.Icon Property in the MainWindow.xaml file.

<Window x:Class="Midas.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Icon="FolderName/IconName.ico">
    ...
</Window>
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!