diff --git a/Source/Changelog.txt b/Source/Changelog.txt
index 27fab31..4d56c1a 100644
--- a/Source/Changelog.txt
+++ b/Source/Changelog.txt
@@ -10,7 +10,9 @@ Contact and Information: http://www.hardcodet.net
CHG DataContext is also assigned to ContextMenu, and properly coerced for
ToolTips and Popups. Also checks whether target item has a binding
on the DataContext (does not just override if DataContext is null).
-
+CHG The LeftClickCommand now executes with a delay in order to mak sure
+ it's not a double-click.
+FIX Removed debug output in WindowMessageSink.
----------------------------------------------------------------------------
diff --git a/Source/NotifyIconWpf/Diagrams/TaskbarIcon Overview.cd b/Source/NotifyIconWpf/Diagrams/TaskbarIcon Overview.cd
index cd094d6..42e21f9 100644
--- a/Source/NotifyIconWpf/Diagrams/TaskbarIcon Overview.cd
+++ b/Source/NotifyIconWpf/Diagrams/TaskbarIcon Overview.cd
@@ -1,10 +1,9 @@
-
+
-
@@ -14,11 +13,18 @@
-
+
ABAEAAAAAAAAAAABAAAAAAAAAAAAAAAAAIAKAIAAAAA=
PopupActivationMode.cs
+
+
+
+ AAAAAAAAAAAAAQAAAAAAABAAAAAAAAAAAAAAAEEAAAA=
+ BalloonIcon.cs
+
+
\ No newline at end of file
diff --git a/Source/NotifyIconWpf/Interop/WindowMessageSink.cs b/Source/NotifyIconWpf/Interop/WindowMessageSink.cs
index 710fa06..1653525 100644
--- a/Source/NotifyIconWpf/Interop/WindowMessageSink.cs
+++ b/Source/NotifyIconWpf/Interop/WindowMessageSink.cs
@@ -233,17 +233,14 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
switch (lParam)
{
case 0x200:
-// Debug.WriteLine("MOVE");
MouseEventReceived(MouseEvent.MouseMove);
break;
case 0x201:
- Debug.WriteLine("left down 1");
MouseEventReceived(MouseEvent.IconLeftMouseDown);
break;
case 0x202:
- Debug.WriteLine("left up");
if (!isDoubleClick)
{
MouseEventReceived(MouseEvent.IconLeftMouseUp);
@@ -252,69 +249,57 @@ namespace Hardcodet.Wpf.TaskbarNotification.Interop
break;
case 0x203:
- Debug.WriteLine("left click 2");
isDoubleClick = true;
MouseEventReceived(MouseEvent.IconDoubleClick);
break;
case 0x204:
- Debug.WriteLine("right click 1");
MouseEventReceived(MouseEvent.IconRightMouseDown);
break;
case 0x205:
- Console.Out.WriteLine("right mouse up");
MouseEventReceived(MouseEvent.IconRightMouseUp);
break;
case 0x206:
//double click with right mouse button - do not trigger event
- Debug.WriteLine("right click 2");
break;
case 0x207:
- Debug.WriteLine("middle click 1");
MouseEventReceived(MouseEvent.IconMiddleMouseDown);
break;
case 520:
- Debug.WriteLine("mouse up middle");
MouseEventReceived(MouseEvent.IconMiddleMouseUp);
break;
case 0x209:
//double click with middle mouse button - do not trigger event
- Debug.WriteLine("middle click 2");
break;
case 0x402:
- Debug.WriteLine("balloon shown");
BallonToolTipChanged(true);
break;
case 0x403:
case 0x404:
- Debug.WriteLine("balloon close");
BallonToolTipChanged(false);
break;
case 0x405:
- Debug.WriteLine("balloon clicked");
MouseEventReceived(MouseEvent.BalloonToolTipClicked);
break;
case 0x406:
- Debug.WriteLine("show custom tooltip");
ChangeToolTipStateRequest(true);
break;
case 0x407:
- Debug.WriteLine("close custom tooltip");
ChangeToolTipStateRequest(false);
break;
default:
- Debug.WriteLine("Unhandled message ID: " + lParam);
+ Debug.WriteLine("Unhandled NotifyIcon message ID: " + lParam);
break;
}
diff --git a/Source/NotifyIconWpf/TaskbarIcon.cs b/Source/NotifyIconWpf/TaskbarIcon.cs
index 320aa42..2a4ff06 100644
--- a/Source/NotifyIconWpf/TaskbarIcon.cs
+++ b/Source/NotifyIconWpf/TaskbarIcon.cs
@@ -156,6 +156,7 @@ namespace Hardcodet.Wpf.TaskbarNotification
///
/// An optional animation for the popup.
/// The time after which the popup is being closed.
+ /// Submit null in order to keep the balloon open inde
///
/// If
/// is a null reference.
diff --git a/Source/Sample Project/App.xaml b/Source/Sample Project/App.xaml
index e3eec8e..e4e63cf 100644
--- a/Source/Sample Project/App.xaml
+++ b/Source/Sample Project/App.xaml
@@ -1,12 +1,12 @@
+ StartupUri="Main.xaml">
-
+
diff --git a/Source/Sample Project/App.xaml.cs b/Source/Sample Project/App.xaml.cs
index 3ddc729..0764b0a 100644
--- a/Source/Sample Project/App.xaml.cs
+++ b/Source/Sample Project/App.xaml.cs
@@ -4,6 +4,7 @@ using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
+using Hardcodet.Wpf.TaskbarNotification;
namespace Samples
{
@@ -12,5 +13,6 @@ namespace Samples
///
public partial class App : Application
{
+
}
}
diff --git a/Source/Sample Project/Commands/CommandBase.cs b/Source/Sample Project/Commands/CommandBase.cs
index c841986..9b47695 100644
--- a/Source/Sample Project/Commands/CommandBase.cs
+++ b/Source/Sample Project/Commands/CommandBase.cs
@@ -1,4 +1,6 @@
using System;
+using System.ComponentModel;
+using System.Windows;
using System.Windows.Input;
using System.Windows.Markup;
@@ -58,7 +60,18 @@ namespace Samples.Commands
///
public virtual bool CanExecute(object parameter)
{
- return true;
+ return IsDesignMode ? false : true;
+ }
+
+
+ public static bool IsDesignMode
+ {
+ get
+ {
+ return (bool)
+ DependencyPropertyDescriptor.FromProperty(DesignerProperties.IsInDesignModeProperty, typeof(FrameworkElement))
+ .Metadata.DefaultValue;
+ }
}
}
}
diff --git a/Source/Sample Project/Commands/HideMainWindowCommand.cs b/Source/Sample Project/Commands/HideMainWindowCommand.cs
index eae7c0e..694fb1f 100644
--- a/Source/Sample Project/Commands/HideMainWindowCommand.cs
+++ b/Source/Sample Project/Commands/HideMainWindowCommand.cs
@@ -18,7 +18,7 @@ namespace Samples.Commands
public override bool CanExecute(object parameter)
{
- return Application.Current.MainWindow.IsVisible;
+ return !IsDesignMode && Application.Current.MainWindow.IsVisible;
}
diff --git a/Source/Sample Project/Commands/ShowMainWindowCommand.cs b/Source/Sample Project/Commands/ShowMainWindowCommand.cs
index c499c85..f3bccc9 100644
--- a/Source/Sample Project/Commands/ShowMainWindowCommand.cs
+++ b/Source/Sample Project/Commands/ShowMainWindowCommand.cs
@@ -20,7 +20,7 @@ namespace Samples.Commands
public override bool CanExecute(object parameter)
{
- return Application.Current.MainWindow.IsVisible == false;
+ return !IsDesignMode && Application.Current.MainWindow.IsVisible == false;
}
}
diff --git a/Source/Sample Project/Images/Preferences.png b/Source/Sample Project/Images/Preferences.png
new file mode 100644
index 0000000..cd420d7
Binary files /dev/null and b/Source/Sample Project/Images/Preferences.png differ
diff --git a/Source/Sample Project/Main.xaml b/Source/Sample Project/Main.xaml
new file mode 100644
index 0000000..ffe00d0
--- /dev/null
+++ b/Source/Sample Project/Main.xaml
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ http://www.hardcodet.net/wpf-notifyicon
+
+ http://www.codeproject.com/wpf-notifyicon
+
+
+
+
+
+
diff --git a/Source/Sample Project/Main.xaml.cs b/Source/Sample Project/Main.xaml.cs
new file mode 100644
index 0000000..3fd344b
--- /dev/null
+++ b/Source/Sample Project/Main.xaml.cs
@@ -0,0 +1,105 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+using Hardcodet.Wpf.TaskbarNotification;
+using Samples.Tutorials;
+using Samples.Tutorials.Balloons;
+using Samples.Tutorials.Commands;
+using Samples.Tutorials.ContextMenus;
+using Samples.Tutorials.Popups;
+using Samples.Tutorials.ToolTips;
+
+namespace Samples
+{
+ ///
+ /// Interaction logic for Main.xaml
+ ///
+ public partial class Main : Window
+ {
+ public Main()
+ {
+ InitializeComponent();
+ }
+
+
+
+ ///
+ /// Sets and
+ /// properties of a dialog that
+ /// is about to be displayed.
+ ///
+ /// The processed window.
+ private void ShowDialog(Window window)
+ {
+ window.Owner = this;
+ window.WindowStartupLocation = WindowStartupLocation.CenterOwner;
+ window.ShowDialog();
+ }
+
+ private void btnDeclaration_Click(object sender, RoutedEventArgs e)
+ {
+ ShowDialog(new SimpleWindowWithNotifyIcon());
+ }
+
+
+ private void btnInlineToolTip_Click(object sender, RoutedEventArgs e)
+ {
+ ShowDialog(new InlineToolTipWindow());
+ }
+
+ private void btnToolTipControl_Click(object sender, RoutedEventArgs e)
+ {
+ ShowDialog(new UserControlToolTipWindow());
+ }
+
+ private void btnPopups_Click(object sender, RoutedEventArgs e)
+ {
+ ShowDialog(new InlinePopupWindow());
+ }
+
+ private void btnContextMenus_Click(object sender, RoutedEventArgs e)
+ {
+ ShowDialog(new InlineContextMenuWindow());
+ }
+
+ private void btnBalloons_Click(object sender, RoutedEventArgs e)
+ {
+ ShowDialog(new BalloonSampleWindow());
+ }
+
+ private void btnCommands_Click(object sender, RoutedEventArgs e)
+ {
+ ShowDialog(new CommandWindow());
+ }
+
+ private void btnMainSample_Click(object sender, RoutedEventArgs e)
+ {
+ var sampleWindow = new ShowcaseWindow();
+
+ sampleWindow.Owner = this;
+ sampleWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen;
+ sampleWindow.ShowDialog();
+ }
+
+
+ private void OnNavigationRequest(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
+ {
+ Process.Start(e.Uri.ToString());
+ e.Handled = true;
+ }
+
+
+
+
+ }
+}
diff --git a/Source/Sample Project/Sample Project.csproj b/Source/Sample Project/Sample Project.csproj
index ffeabeb..374e8ad 100644
--- a/Source/Sample Project/Sample Project.csproj
+++ b/Source/Sample Project/Sample Project.csproj
@@ -62,16 +62,16 @@
-
-
+
+
MSBuild:Compile
Designer
-
+
MSBuild:Compile
Designer
-
+
FancyToolTip.xaml
@@ -80,15 +80,27 @@
MSBuild:Compile
Designer
-
+
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
-
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
Designer
MSBuild:Compile
@@ -96,11 +108,39 @@
Designer
MSBuild:Compile
-
+
Designer
MSBuild:Compile
-
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
MSBuild:Compile
Designer
@@ -108,21 +148,24 @@
Code
App.xaml
-
+
Code
- Window1.xaml
+ ShowcaseWindow.xaml
-
+
FancyBalloon.xaml
-
+
FancyPopup.xaml
+
+ Main.xaml
+
Code
@@ -136,13 +179,38 @@
True
Settings.settings
-
- Window1.xaml
+
+ SimpleWindowWithNotifyIcon.xaml
SimpleUserControl.xaml
-
+
+ InlineToolTipWindow.xaml
+
+
+ UserControlToolTipWindow.xaml
+
+
+ InlinePopupWindow.xaml
+
+
+ InlineContextMenuWindow.xaml
+
+
+ CommandWindow.xaml
+
+
+
+ EventVisualizerWindow.xaml
+
+
+ BalloonSampleWindow.xaml
+
+
+ DataBoundToolTipWindow.xaml
+
+
WelcomeBalloon.xaml
diff --git a/Source/Sample Project/FancyBalloon.xaml b/Source/Sample Project/Showcase/FancyBalloon.xaml
similarity index 94%
rename from Source/Sample Project/FancyBalloon.xaml
rename to Source/Sample Project/Showcase/FancyBalloon.xaml
index 0dab931..c0d58ba 100644
--- a/Source/Sample Project/FancyBalloon.xaml
+++ b/Source/Sample Project/Showcase/FancyBalloon.xaml
@@ -84,7 +84,7 @@
HorizontalAlignment="Left"
Margin="0,10,0,0"
Width="72"
- Source="Images\Info.png"
+ Source="/Images/Info.png"
Stretch="Fill" Height="72" VerticalAlignment="Top" />
-
+
diff --git a/Source/Sample Project/FancyBalloon.xaml.cs b/Source/Sample Project/Showcase/FancyBalloon.xaml.cs
similarity index 100%
rename from Source/Sample Project/FancyBalloon.xaml.cs
rename to Source/Sample Project/Showcase/FancyBalloon.xaml.cs
diff --git a/Source/Sample Project/FancyPopup.xaml b/Source/Sample Project/Showcase/FancyPopup.xaml
similarity index 96%
rename from Source/Sample Project/FancyPopup.xaml
rename to Source/Sample Project/Showcase/FancyPopup.xaml
index 1cfb9cd..efba38f 100644
--- a/Source/Sample Project/FancyPopup.xaml
+++ b/Source/Sample Project/Showcase/FancyPopup.xaml
@@ -49,7 +49,7 @@
VerticalAlignment="Top"
Width="72"
Height="72"
- Source="Images\preferences.png"
+ Source="/Images/Preferences.png"
Stretch="Fill" x:Name="image" RenderTransformOrigin="0.5,0.5" >
diff --git a/Source/Sample Project/FancyPopup.xaml.cs b/Source/Sample Project/Showcase/FancyPopup.xaml.cs
similarity index 100%
rename from Source/Sample Project/FancyPopup.xaml.cs
rename to Source/Sample Project/Showcase/FancyPopup.xaml.cs
diff --git a/Source/Sample Project/FancyToolTip.xaml b/Source/Sample Project/Showcase/FancyToolTip.xaml
similarity index 96%
rename from Source/Sample Project/FancyToolTip.xaml
rename to Source/Sample Project/Showcase/FancyToolTip.xaml
index 59be48b..0e42d0b 100644
--- a/Source/Sample Project/FancyToolTip.xaml
+++ b/Source/Sample Project/Showcase/FancyToolTip.xaml
@@ -71,7 +71,7 @@
HorizontalAlignment="Left"
Margin="10,10,0,26"
Width="72"
- Source="Images\Info.png"
+ Source="/Images/Info.png"
Stretch="Fill"
VerticalAlignment="Top"
RenderTransformOrigin="0.792,0.486" x:Name="image" Height="72" >
diff --git a/Source/Sample Project/FancyToolTip.xaml.cs b/Source/Sample Project/Showcase/FancyToolTip.xaml.cs
similarity index 100%
rename from Source/Sample Project/FancyToolTip.xaml.cs
rename to Source/Sample Project/Showcase/FancyToolTip.xaml.cs
diff --git a/Source/Sample Project/TaskbarIconResources.xaml b/Source/Sample Project/Showcase/NotifyIconResources.xaml
similarity index 100%
rename from Source/Sample Project/TaskbarIconResources.xaml
rename to Source/Sample Project/Showcase/NotifyIconResources.xaml
diff --git a/Source/Sample Project/Window1.xaml b/Source/Sample Project/Showcase/ShowcaseWindow.xaml
similarity index 90%
rename from Source/Sample Project/Window1.xaml
rename to Source/Sample Project/Showcase/ShowcaseWindow.xaml
index 9290ccd..bcaa51a 100644
--- a/Source/Sample Project/Window1.xaml
+++ b/Source/Sample Project/Showcase/ShowcaseWindow.xaml
@@ -1,11 +1,11 @@
-
-
-
+
+
+
-
+ Text="NetDrives" />
+ Source="/Icons/Inactive.ico" />
+ Source="/Icons/Error.ico" />
- /// Interaction logic for Window1.xaml
+ /// Interaction logic for ShowcaseWindow.xaml
///
- public partial class Window1 : Window
+ public partial class ShowcaseWindow : Window
{
- public Window1()
+ public ShowcaseWindow()
{
InitializeComponent();
@@ -82,5 +81,13 @@ namespace Samples
Process.Start(e.Uri.ToString());
e.Handled = true;
}
+
+
+ protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
+ {
+ //clean up notifyicon (would otherwise stay open until application finishes)
+ tb.Dispose();
+ base.OnClosing(e);
+ }
}
}
\ No newline at end of file
diff --git a/Source/Sample Project/WelcomeBalloon.xaml b/Source/Sample Project/Showcase/WelcomeBalloon.xaml
similarity index 100%
rename from Source/Sample Project/WelcomeBalloon.xaml
rename to Source/Sample Project/Showcase/WelcomeBalloon.xaml
diff --git a/Source/Sample Project/WelcomeBalloon.xaml.cs b/Source/Sample Project/Showcase/WelcomeBalloon.xaml.cs
similarity index 100%
rename from Source/Sample Project/WelcomeBalloon.xaml.cs
rename to Source/Sample Project/Showcase/WelcomeBalloon.xaml.cs
diff --git a/Source/Sample Project/Tutorials/01 - Declaration/NotifyIconResourceDictionary.xaml b/Source/Sample Project/Tutorials/01 - Declaration/NotifyIconResourceDictionary.xaml
new file mode 100644
index 0000000..021457e
--- /dev/null
+++ b/Source/Sample Project/Tutorials/01 - Declaration/NotifyIconResourceDictionary.xaml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml b/Source/Sample Project/Tutorials/01 - Declaration/SimpleWindowWithNotifyIcon.xaml
similarity index 62%
rename from Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml
rename to Source/Sample Project/Tutorials/01 - Declaration/SimpleWindowWithNotifyIcon.xaml
index 59619ec..000598d 100644
--- a/Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml
+++ b/Source/Sample Project/Tutorials/01 - Declaration/SimpleWindowWithNotifyIcon.xaml
@@ -1,5 +1,5 @@
+
diff --git a/Source/Sample Project/Tutorials/01 - Declaration/SimpleWindowWithNotifyIcon.xaml.cs b/Source/Sample Project/Tutorials/01 - Declaration/SimpleWindowWithNotifyIcon.xaml.cs
new file mode 100644
index 0000000..ab7ae3e
--- /dev/null
+++ b/Source/Sample Project/Tutorials/01 - Declaration/SimpleWindowWithNotifyIcon.xaml.cs
@@ -0,0 +1,23 @@
+using System.Windows;
+
+namespace Samples.Tutorials
+{
+ ///
+ /// Interaction logic for SimpleWindowWithNotifyIcon.xaml
+ ///
+ public partial class SimpleWindowWithNotifyIcon : Window
+ {
+ public SimpleWindowWithNotifyIcon()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
+ {
+ //clean up notifyicon (would otherwise stay open until application finishes)
+ MyNotifyIcon.Dispose();
+
+ base.OnClosing(e);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml.cs b/Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml.cs
deleted file mode 100644
index caf3ef1..0000000
--- a/Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using System.Windows;
-
-namespace Samples.Tutorials
-{
- ///
- /// Interaction logic for SimpleDirectDeclaration.xaml
- ///
- public partial class SimpleDirectDeclaration : Window
- {
- public SimpleDirectDeclaration()
- {
- InitializeComponent();
- }
- }
-}
\ No newline at end of file
diff --git a/Source/Sample Project/Tutorials/02 - ToolTips/InlineToolTipWindow.xaml b/Source/Sample Project/Tutorials/02 - ToolTips/InlineToolTipWindow.xaml
new file mode 100644
index 0000000..48f8a35
--- /dev/null
+++ b/Source/Sample Project/Tutorials/02 - ToolTips/InlineToolTipWindow.xaml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Sample Project/Tutorials/02 - ToolTips/InlineToolTipWindow.xaml.cs b/Source/Sample Project/Tutorials/02 - ToolTips/InlineToolTipWindow.xaml.cs
new file mode 100644
index 0000000..4477529
--- /dev/null
+++ b/Source/Sample Project/Tutorials/02 - ToolTips/InlineToolTipWindow.xaml.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Samples.Tutorials.ToolTips
+{
+ ///
+ /// Interaction logic for Window1.xaml
+ ///
+ public partial class InlineToolTipWindow : Window
+ {
+ public InlineToolTipWindow()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
+ {
+ //clean up notifyicon (would otherwise stay open until application finishes)
+ MyNotifyIcon.Dispose();
+
+ base.OnClosing(e);
+ }
+ }
+}
diff --git a/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml b/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml
index 606ca05..d8ad5d8 100644
--- a/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml
+++ b/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml
@@ -1,8 +1,22 @@
-
-
-
-
+
+
+
+
+
+
+
diff --git a/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml.cs b/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml.cs
index 441276e..ee7d684 100644
--- a/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml.cs
+++ b/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml.cs
@@ -12,7 +12,7 @@ using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
-namespace Samples.Tutorials
+namespace Samples.Tutorials.ToolTips
{
///
/// Interaction logic for SimpleUserControl.xaml
diff --git a/Source/Sample Project/Tutorials/02 - ToolTips/UserControlToolTipWindow.xaml b/Source/Sample Project/Tutorials/02 - ToolTips/UserControlToolTipWindow.xaml
new file mode 100644
index 0000000..35a1f0c
--- /dev/null
+++ b/Source/Sample Project/Tutorials/02 - ToolTips/UserControlToolTipWindow.xaml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Sample Project/Tutorials/02 - ToolTips/UserControlToolTipWindow.xaml.cs b/Source/Sample Project/Tutorials/02 - ToolTips/UserControlToolTipWindow.xaml.cs
new file mode 100644
index 0000000..8910dc6
--- /dev/null
+++ b/Source/Sample Project/Tutorials/02 - ToolTips/UserControlToolTipWindow.xaml.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Samples.Tutorials.ToolTips
+{
+ ///
+ /// Interaction logic for UserControlToolTipWindow.xaml
+ ///
+ public partial class UserControlToolTipWindow : Window
+ {
+ public UserControlToolTipWindow()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
+ {
+ //clean up notifyicon (would otherwise stay open until application finishes)
+ MyNotifyIcon.Dispose();
+
+ base.OnClosing(e);
+ }
+ }
+}
diff --git a/Source/Sample Project/Tutorials/03 - Popups/InlinePopupWindow.xaml b/Source/Sample Project/Tutorials/03 - Popups/InlinePopupWindow.xaml
new file mode 100644
index 0000000..476889b
--- /dev/null
+++ b/Source/Sample Project/Tutorials/03 - Popups/InlinePopupWindow.xaml
@@ -0,0 +1,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Sample Project/Tutorials/03 - Popups/InlinePopupWindow.xaml.cs b/Source/Sample Project/Tutorials/03 - Popups/InlinePopupWindow.xaml.cs
new file mode 100644
index 0000000..8ce3c48
--- /dev/null
+++ b/Source/Sample Project/Tutorials/03 - Popups/InlinePopupWindow.xaml.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Samples.Tutorials.Popups
+{
+ ///
+ /// Interaction logic for InlinePopupWindow.xaml
+ ///
+ public partial class InlinePopupWindow : Window
+ {
+ public InlinePopupWindow()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
+ {
+ //clean up notifyicon (would otherwise stay open until application finishes)
+ MyNotifyIcon.Dispose();
+
+ base.OnClosing(e);
+ }
+ }
+}
diff --git a/Source/Sample Project/Tutorials/04 - ContextMenus/InlineContextMenuWindow.xaml b/Source/Sample Project/Tutorials/04 - ContextMenus/InlineContextMenuWindow.xaml
new file mode 100644
index 0000000..7338e68
--- /dev/null
+++ b/Source/Sample Project/Tutorials/04 - ContextMenus/InlineContextMenuWindow.xaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Sample Project/Tutorials/04 - ContextMenus/InlineContextMenuWindow.xaml.cs b/Source/Sample Project/Tutorials/04 - ContextMenus/InlineContextMenuWindow.xaml.cs
new file mode 100644
index 0000000..fea9324
--- /dev/null
+++ b/Source/Sample Project/Tutorials/04 - ContextMenus/InlineContextMenuWindow.xaml.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Samples.Tutorials.ContextMenus
+{
+ ///
+ /// Interaction logic for InlineContextMenuWindow.xaml
+ ///
+ public partial class InlineContextMenuWindow : Window
+ {
+ public InlineContextMenuWindow()
+ {
+ InitializeComponent();
+ }
+
+
+ protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
+ {
+ //clean up notifyicon (would otherwise stay open until application finishes)
+ MyNotifyIcon.Dispose();
+
+ base.OnClosing(e);
+ }
+ }
+}
diff --git a/Source/Sample Project/Tutorials/05 - Balloons/BalloonSampleWindow.xaml b/Source/Sample Project/Tutorials/05 - Balloons/BalloonSampleWindow.xaml
new file mode 100644
index 0000000..c7e93f7
--- /dev/null
+++ b/Source/Sample Project/Tutorials/05 - Balloons/BalloonSampleWindow.xaml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Sample Project/Tutorials/05 - Balloons/BalloonSampleWindow.xaml.cs b/Source/Sample Project/Tutorials/05 - Balloons/BalloonSampleWindow.xaml.cs
new file mode 100644
index 0000000..35cf0f8
--- /dev/null
+++ b/Source/Sample Project/Tutorials/05 - Balloons/BalloonSampleWindow.xaml.cs
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Controls.Primitives;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+using Hardcodet.Wpf.TaskbarNotification;
+
+namespace Samples.Tutorials.Balloons
+{
+ ///
+ /// Interaction logic for BalloonSampleWindow.xaml
+ ///
+ public partial class BalloonSampleWindow : Window
+ {
+ public BalloonSampleWindow()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
+ {
+ //clean up notifyicon (would otherwise stay open until application finishes)
+ MyNotifyIcon.Dispose();
+
+ base.OnClosing(e);
+ }
+
+
+ private void btnShowCustomBalloon_Click(object sender, RoutedEventArgs e)
+ {
+ FancyBalloon balloon = new FancyBalloon();
+ balloon.BalloonText = "Custom Balloon";
+
+ //show balloon and close it after 4 seconds
+ MyNotifyIcon.ShowCustomBalloon(balloon, PopupAnimation.Slide, 4000);
+ }
+
+ private void btnHideStandardBalloon_Click(object sender, RoutedEventArgs e)
+ {
+ MyNotifyIcon.HideBalloonTip();
+ }
+
+
+ private void btnShowStandardBalloon_Click(object sender, RoutedEventArgs e)
+ {
+ string title = "WPF NotifyIcon";
+ string text = "This is a standard balloon";
+
+ MyNotifyIcon.ShowBalloonTip(title, text, MyNotifyIcon.Icon);
+ }
+
+ private void btnCloseCustomBalloon_Click(object sender, RoutedEventArgs e)
+ {
+ MyNotifyIcon.CloseBalloon();
+ }
+
+
+ }
+}
diff --git a/Source/Sample Project/Tutorials/06 - Commands/CommandWindow.xaml b/Source/Sample Project/Tutorials/06 - Commands/CommandWindow.xaml
new file mode 100644
index 0000000..8a9a606
--- /dev/null
+++ b/Source/Sample Project/Tutorials/06 - Commands/CommandWindow.xaml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Sample Project/Tutorials/06 - Commands/CommandWindow.xaml.cs b/Source/Sample Project/Tutorials/06 - Commands/CommandWindow.xaml.cs
new file mode 100644
index 0000000..abe9b6f
--- /dev/null
+++ b/Source/Sample Project/Tutorials/06 - Commands/CommandWindow.xaml.cs
@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Samples.Tutorials.Commands
+{
+ ///
+ /// Interaction logic for CommandWindow.xaml
+ ///
+ public partial class CommandWindow : Window
+ {
+ public CommandWindow()
+ {
+ InitializeComponent();
+ }
+
+ protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
+ {
+ //clean up notifyicon (would otherwise stay open until application finishes)
+ MyNotifyIcon.Dispose();
+
+ base.OnClosing(e);
+ }
+ }
+}
diff --git a/Source/Sample Project/Tutorials/06 - Commands/ShowMessageCommand.cs b/Source/Sample Project/Tutorials/06 - Commands/ShowMessageCommand.cs
new file mode 100644
index 0000000..1fa40d1
--- /dev/null
+++ b/Source/Sample Project/Tutorials/06 - Commands/ShowMessageCommand.cs
@@ -0,0 +1,25 @@
+using System;
+using System.Windows;
+using System.Windows.Input;
+
+namespace Samples.Tutorials.Commands
+{
+ ///
+ /// A simple command that displays the command parameter as
+ /// a dialog message.
+ ///
+ public class ShowMessageCommand : ICommand
+ {
+ public void Execute(object parameter)
+ {
+ MessageBox.Show(parameter.ToString());
+ }
+
+ public bool CanExecute(object parameter)
+ {
+ return true;
+ }
+
+ public event EventHandler CanExecuteChanged;
+ }
+}
diff --git a/Source/Sample Project/Tutorials/07 - Events/EventVisualizerWindow.xaml b/Source/Sample Project/Tutorials/07 - Events/EventVisualizerWindow.xaml
new file mode 100644
index 0000000..1dd568b
--- /dev/null
+++ b/Source/Sample Project/Tutorials/07 - Events/EventVisualizerWindow.xaml
@@ -0,0 +1,261 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Source/Sample Project/Tutorials/07 - Events/EventVisualizerWindow.xaml.cs b/Source/Sample Project/Tutorials/07 - Events/EventVisualizerWindow.xaml.cs
new file mode 100644
index 0000000..febb6e1
--- /dev/null
+++ b/Source/Sample Project/Tutorials/07 - Events/EventVisualizerWindow.xaml.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Samples.Tutorials.Events
+{
+ ///
+ /// Interaction logic for EventVisualizerWindow.xaml
+ ///
+ public partial class EventVisualizerWindow : Window
+ {
+ public EventVisualizerWindow()
+ {
+ InitializeComponent();
+ }
+
+
+ protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
+ {
+ //clean up notifyicon (would otherwise stay open until application finishes)
+ notifyIcon.Dispose();
+
+ base.OnClosing(e);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Source/Sample Project/Tutorials/08 - DataBinding/DataBoundToolTipWindow.xaml b/Source/Sample Project/Tutorials/08 - DataBinding/DataBoundToolTipWindow.xaml
new file mode 100644
index 0000000..1fb880d
--- /dev/null
+++ b/Source/Sample Project/Tutorials/08 - DataBinding/DataBoundToolTipWindow.xaml
@@ -0,0 +1,89 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Sample Project/Tutorials/08 - DataBinding/DataBoundToolTipWindow.xaml.cs b/Source/Sample Project/Tutorials/08 - DataBinding/DataBoundToolTipWindow.xaml.cs
new file mode 100644
index 0000000..a383e18
--- /dev/null
+++ b/Source/Sample Project/Tutorials/08 - DataBinding/DataBoundToolTipWindow.xaml.cs
@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Samples.Tutorials.DataBinding
+{
+ ///
+ /// Interaction logic for DataBoundToolTipWindow.xaml
+ ///
+ public partial class DataBoundToolTipWindow : Window
+ {
+ public DataBoundToolTipWindow()
+ {
+ InitializeComponent();
+ }
+
+
+ protected override void OnClosing(System.ComponentModel.CancelEventArgs e)
+ {
+ //clean up notifyicon (would otherwise stay open until application finishes)
+ MyNotifyIcon.Dispose();
+
+ base.OnClosing(e);
+ }
+ }
+}