Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dispose a TrayNotifyIcon #303

Closed
iHimiko opened this issue Mar 1, 2017 · 1 comment
Closed

Dispose a TrayNotifyIcon #303

iHimiko opened this issue Mar 1, 2017 · 1 comment
Assignees
Labels

Comments

@iHimiko
Copy link
Contributor

iHimiko commented Mar 1, 2017

I see icon tray when exit from app, and can i help to fix it.
Just add new field in App.xaml.cs
public static TaskbarIcon TrayTaskbarIcon;
and write data to this from NotifyIcon.xaml.cs.
To remove icon from TaskBar just need relese it from event
protected override void OnExit(ExitEventArgs e) { TrayTaskbarIcon?.Dispose(); _unique.ReleaseMutex(); base.OnExit(e); }
And dont forget remove it from App.xaml and from App.xaml.cs
private void App_OnExit(object sender, ExitEventArgs e) { _unique.ReleaseMutex(); }

@neowutran neowutran added the bug label Mar 2, 2017
@neowutran neowutran self-assigned this Mar 2, 2017
@neowutran
Copy link
Owner

thanks =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants