diff --git a/Source/Changelog.txt b/Source/Changelog.txt new file mode 100644 index 0000000..27fab31 --- /dev/null +++ b/Source/Changelog.txt @@ -0,0 +1,20 @@ +hardcodet.net NotifyIcon for WPF - Changelog +Copyright (c) 2009 Philipp Sumi +Contact and Information: http://www.hardcodet.net + + +---------------------------------------------------------------------------- + +1.0.1 +***** +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). + + + +---------------------------------------------------------------------------- + +1.0.0 +***** +ADD Initial release. \ No newline at end of file diff --git a/Source/NotifyIconWpf.sln b/Source/NotifyIconWpf.sln index b1e2296..84d90fa 100644 --- a/Source/NotifyIconWpf.sln +++ b/Source/NotifyIconWpf.sln @@ -5,6 +5,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NotifyIconWpf", "NotifyIcon EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Sample Project", "Sample Project\Sample Project.csproj", "{71C74F29-F1C2-49C5-969F-C25AC4CDFCCC}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C37AE34D-A8C4-4AEC-995C-3C763300934E}" + ProjectSection(SolutionItems) = preProject + Changelog.txt = Changelog.txt + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU diff --git a/Source/Sample Project/App.xaml b/Source/Sample Project/App.xaml index 04fb858..e3eec8e 100644 --- a/Source/Sample Project/App.xaml +++ b/Source/Sample Project/App.xaml @@ -1,4 +1,4 @@ - diff --git a/Source/Sample Project/App.xaml.cs b/Source/Sample Project/App.xaml.cs index 92b661a..3ddc729 100644 --- a/Source/Sample Project/App.xaml.cs +++ b/Source/Sample Project/App.xaml.cs @@ -5,7 +5,7 @@ using System.Data; using System.Linq; using System.Windows; -namespace Sample_Project +namespace Samples { /// /// Interaction logic for App.xaml diff --git a/Source/Sample Project/Commands/CommandBase.cs b/Source/Sample Project/Commands/CommandBase.cs index b3411ae..c841986 100644 --- a/Source/Sample Project/Commands/CommandBase.cs +++ b/Source/Sample Project/Commands/CommandBase.cs @@ -2,7 +2,7 @@ using System.Windows.Input; using System.Windows.Markup; -namespace Sample_Project.Commands +namespace Samples.Commands { /// /// Basic implementation of the diff --git a/Source/Sample Project/Commands/HideMainWindowCommand.cs b/Source/Sample Project/Commands/HideMainWindowCommand.cs index ea40b97..eae7c0e 100644 --- a/Source/Sample Project/Commands/HideMainWindowCommand.cs +++ b/Source/Sample Project/Commands/HideMainWindowCommand.cs @@ -1,7 +1,7 @@ using System.Windows; using System.Windows.Input; -namespace Sample_Project.Commands +namespace Samples.Commands { /// /// Hides the main window. diff --git a/Source/Sample Project/Commands/ShowMainWindowCommand.cs b/Source/Sample Project/Commands/ShowMainWindowCommand.cs index d80e5ce..c499c85 100644 --- a/Source/Sample Project/Commands/ShowMainWindowCommand.cs +++ b/Source/Sample Project/Commands/ShowMainWindowCommand.cs @@ -4,7 +4,7 @@ using System.Linq; using System.Windows; using System.Windows.Input; -namespace Sample_Project.Commands +namespace Samples.Commands { /// /// Shows the main window. diff --git a/Source/Sample Project/FancyBalloon.xaml b/Source/Sample Project/FancyBalloon.xaml index b7339d5..0dab931 100644 --- a/Source/Sample Project/FancyBalloon.xaml +++ b/Source/Sample Project/FancyBalloon.xaml @@ -1,5 +1,5 @@  /// Interaction logic for FancyBalloon.xaml diff --git a/Source/Sample Project/FancyPopup.xaml b/Source/Sample Project/FancyPopup.xaml index 432b97e..1cfb9cd 100644 --- a/Source/Sample Project/FancyPopup.xaml +++ b/Source/Sample Project/FancyPopup.xaml @@ -1,5 +1,5 @@  + diff --git a/Source/Sample Project/FancyPopup.xaml.cs b/Source/Sample Project/FancyPopup.xaml.cs index 7d5d028..c50f34f 100644 --- a/Source/Sample Project/FancyPopup.xaml.cs +++ b/Source/Sample Project/FancyPopup.xaml.cs @@ -1,7 +1,7 @@ using System.Windows; using System.Windows.Controls; -namespace Sample_Project +namespace Samples { /// /// Interaction logic for FancyPopup.xaml diff --git a/Source/Sample Project/FancyToolTip.xaml b/Source/Sample Project/FancyToolTip.xaml index 7db12ff..59be48b 100644 --- a/Source/Sample Project/FancyToolTip.xaml +++ b/Source/Sample Project/FancyToolTip.xaml @@ -5,7 +5,7 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:tb="http://www.hardcodet.net/taskbar" mc:Ignorable="d" - x:Class="Sample_Project.FancyToolTip" + x:Class="Samples.FancyToolTip" x:Name="me" Width="285" Height="136"> @@ -109,6 +109,6 @@ Foreground="#FF141414" TextWrapping="Wrap" Margin="82,42,20,44.96" - x:Name="txtToolTipDetail_Copy" > + x:Name="txtToolTipDetail_Copy" > \ No newline at end of file diff --git a/Source/Sample Project/FancyToolTip.xaml.cs b/Source/Sample Project/FancyToolTip.xaml.cs index d15a337..946d277 100644 --- a/Source/Sample Project/FancyToolTip.xaml.cs +++ b/Source/Sample Project/FancyToolTip.xaml.cs @@ -12,7 +12,7 @@ using System.Windows.Navigation; using System.Windows.Shapes; using Hardcodet.Wpf.TaskbarNotification; -namespace Sample_Project +namespace Samples { /// /// Interaction logic for FancyToolTip.xaml diff --git a/Source/Sample Project/Properties/Resources.Designer.cs b/Source/Sample Project/Properties/Resources.Designer.cs index 1646b08..c0666f1 100644 --- a/Source/Sample Project/Properties/Resources.Designer.cs +++ b/Source/Sample Project/Properties/Resources.Designer.cs @@ -8,7 +8,7 @@ // //------------------------------------------------------------------------------ -namespace Sample_Project.Properties { +namespace Samples.Properties { using System; @@ -39,7 +39,7 @@ namespace Sample_Project.Properties { internal static global::System.Resources.ResourceManager ResourceManager { get { if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Sample_Project.Properties.Resources", typeof(Resources).Assembly); + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Samples.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; diff --git a/Source/Sample Project/Properties/Settings.Designer.cs b/Source/Sample Project/Properties/Settings.Designer.cs index 4a1169a..acb4052 100644 --- a/Source/Sample Project/Properties/Settings.Designer.cs +++ b/Source/Sample Project/Properties/Settings.Designer.cs @@ -8,23 +8,19 @@ // //------------------------------------------------------------------------------ -namespace Sample_Project.Properties -{ - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase - { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default - { - get - { - return defaultInstance; - } +namespace Samples.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } } - } } diff --git a/Source/Sample Project/Sample Project.csproj b/Source/Sample Project/Sample Project.csproj index 7d102c5..ffeabeb 100644 --- a/Source/Sample Project/Sample Project.csproj +++ b/Source/Sample Project/Sample Project.csproj @@ -8,7 +8,7 @@ {71C74F29-F1C2-49C5-969F-C25AC4CDFCCC} WinExe Properties - Sample_Project + Samples Sample Project v3.5 512 @@ -88,6 +88,18 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + MSBuild:Compile Designer @@ -124,6 +136,15 @@ True Settings.settings + + Window1.xaml + + + SimpleUserControl.xaml + + + WelcomeBalloon.xaml + ResXFileCodeGenerator Resources.Designer.cs @@ -156,9 +177,6 @@ - - - + + + + + + + diff --git a/Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml b/Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml new file mode 100644 index 0000000..59619ec --- /dev/null +++ b/Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml @@ -0,0 +1,17 @@ + + + + + + + + diff --git a/Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml.cs b/Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml.cs new file mode 100644 index 0000000..caf3ef1 --- /dev/null +++ b/Source/Sample Project/Tutorials/01 - Declaration/Window1.xaml.cs @@ -0,0 +1,15 @@ +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/SimpleUserControl.xaml b/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml new file mode 100644 index 0000000..606ca05 --- /dev/null +++ b/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml @@ -0,0 +1,8 @@ + + + + + diff --git a/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml.cs b/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml.cs new file mode 100644 index 0000000..441276e --- /dev/null +++ b/Source/Sample Project/Tutorials/02 - ToolTips/SimpleUserControl.xaml.cs @@ -0,0 +1,27 @@ +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.Navigation; +using System.Windows.Shapes; + +namespace Samples.Tutorials +{ + /// + /// Interaction logic for SimpleUserControl.xaml + /// + public partial class SimpleUserControl : UserControl + { + public SimpleUserControl() + { + InitializeComponent(); + } + } +} diff --git a/Source/Sample Project/WelcomeBalloon.xaml b/Source/Sample Project/WelcomeBalloon.xaml new file mode 100644 index 0000000..d8231a9 --- /dev/null +++ b/Source/Sample Project/WelcomeBalloon.xaml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Source/Sample Project/WelcomeBalloon.xaml.cs b/Source/Sample Project/WelcomeBalloon.xaml.cs new file mode 100644 index 0000000..0f29d2f --- /dev/null +++ b/Source/Sample Project/WelcomeBalloon.xaml.cs @@ -0,0 +1,27 @@ +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.Navigation; +using System.Windows.Shapes; + +namespace Samples +{ + /// + /// Interaction logic for WelcomeBalloon.xaml + /// + public partial class WelcomeBalloon : UserControl + { + public WelcomeBalloon() + { + InitializeComponent(); + } + } +} diff --git a/Source/Sample Project/Window1.xaml b/Source/Sample Project/Window1.xaml index 66acba9..9290ccd 100644 --- a/Source/Sample Project/Window1.xaml +++ b/Source/Sample Project/Window1.xaml @@ -1,17 +1,20 @@  + xmlns:local="clr-namespace:Samples" + xmlns:Commands="clr-namespace:Samples.Commands" + MinWidth="750" + MinHeight="800" + ResizeMode="NoResize"> + SourceName="tb" /> - + + + - - - + + DoubleClickCommand="{Commands:ShowMainWindowCommand}"> @@ -85,57 +88,19 @@ - - - + + + - - - - - - - + Height="248" + x:Name="Balloons" + Width="372" + HorizontalAlignment="Left"> WPF NotifyIcon + x:Name="txtBalloonText" + AcceptsReturn="True" + Height="47" + VerticalAlignment="Bottom" + d:LayoutOverrides="VerticalAlignment" + TextWrapping="Wrap" + Text="You should see a LED icon in your system tray. This is your NotifyIcon." /> + Text="Balloon Title" /> + Width="85" + Height="23" + VerticalAlignment="Bottom" + d:LayoutOverrides="VerticalAlignment"> + Text="Displays default balloon tips as supported by the OS. " />