Files
wpf-notifyicon/Source/Sample Project/FancyPopup.xaml.cs
Philipp Sumi 354ba1ca43 NotifyWPF
---------
CHG   Lot of plumbing, some fixes
CHG   Work on sample project.
CHG   Popups and ContextMenu now store coordinates - otherwise delayed opending may happen elsewhere.

git-svn-id: https://svn.evolvesoftware.ch/repos/evolve.net/WPF/NotifyIcon@55 9f600761-6f11-4665-b6dc-0185e9171623
2009-03-31 22:20:07 +00:00

46 lines
1.2 KiB
C#

using System.Windows;
using System.Windows.Controls;
namespace Sample_Project
{
/// <summary>
/// Interaction logic for FancyPopup.xaml
/// </summary>
public partial class FancyPopup : UserControl
{
#region ClickCount dependency property
/// <summary>
/// The number of clicks on the popup button.
/// </summary>
public static readonly DependencyProperty ClickCountProperty =
DependencyProperty.Register("ClickCount",
typeof (int),
typeof (FancyPopup),
new FrameworkPropertyMetadata(0));
/// <summary>
/// A property wrapper for the <see cref="ClickCountProperty"/>
/// dependency property:<br/>
/// The number of clicks on the popup button.
/// </summary>
public int ClickCount
{
get { return (int) GetValue(ClickCountProperty); }
set { SetValue(ClickCountProperty, value); }
}
#endregion
public FancyPopup()
{
InitializeComponent();
}
private void OnButtonClick(object sender, RoutedEventArgs e)
{
//just increment a counter - will be displayed on screen
ClickCount++;
}
}
}