PDA

View Full Version : چطوری برناممو رو داخل Notification area (کنار ساعت) نمایش بدم؟!



AlgorithmX
دوشنبه 21 شهریور 1390, 23:46 عصر
سلام : چطوری برناممو رو داخل Notification area (کنار ساعت) نمایش بدم؟!
داخل winapp راحتر بود!

رضا عربلو
سه شنبه 22 شهریور 1390, 11:20 صبح
Here's a quick example to show how to minimise to the notification area. You need to add references to the System.Window.Forms and System.Drawing assemblies.
public partial class Window1 : System.Windows.Window
{
public Window1()
{
InitializeComponent();
System.Windows.Forms.NotifyIcon ni = new System.Windows.Forms.NotifyIcon();
ni.Icon = new System.Drawing.Icon("Main.ico");
ni.Visible = true;
ni.DoubleClick += delegate(object sender, EventArgs args)
{
this.Show();
this.WindowState = WindowState.Normal;
};
}
protected override void OnStateChanged(EventArgs e)
{
if (WindowState == WindowState.Minimized)
this.Hide();
base.OnStateChanged(e);
}
}

AlgorithmX
سه شنبه 22 شهریور 1390, 12:48 عصر
میشه یه نمونه هم بزارید؟!!:خجالت:

AlgorithmX
یک شنبه 04 تیر 1391, 22:51 عصر
میشه یه نمونه هم بزارید؟!!:خجالت:

درخواستم به تاریخ پیوست:متفکر:

m.bibjan
دوشنبه 05 تیر 1391, 01:51 صبح
سلام
این لینک هم کد داره هم نمونه داره.
http://www.codeproject.com/Articles/36788/WPF-XAML-NotifyIcon-and-Taskbar-System-Tray-Popup