ov7a
ov7a

Reputation: 1594

No icon in task bar

I have default settings for application icon, it appears normally in title window in title, alt-tab menu, explorer, etc. but in taskbar it is shown like this:

in taskbar

How to fix this and get normal icon in taskbar?

Upvotes: 0

Views: 366

Answers (2)

ov7a
ov7a

Reputation: 1594

One of my problems was related to loginDialog. It is possible to get an icon in taskbar using custom icon, but still problem with standard icon is present.

        var loginDialog = new LoginView();

        loginDialog.Loaded += (sender, args) => {
            var window = loginDialog.ParentOfType<Window>();
            if (window != null) {
                window.ShowInTaskbar = true;
                window.Icon = BitmapFrame.Create(new Uri("pack://application:,,,/App;component/Themes/MainIcon.png"));
            }
        };

Upvotes: 0

Farhad Bagherlo
Farhad Bagherlo

Reputation: 6699

Right-click on the windows and select the Properties and apply the icon like the image

enter image description here

Upvotes: 1

Related Questions