Added .NET 5.0 and restructured the repository. (#47)

This commit is contained in:
Robin Krom
2020-11-22 22:04:27 +01:00
committed by GitHub
parent de6a2b2e25
commit 9e86ac77d3
100 changed files with 201 additions and 184 deletions

View File

@@ -7,8 +7,7 @@ trigger:
batch: true batch: true
branches: branches:
include: include:
- develop - master
- release/*
- feature/* - feature/*
exclude: exclude:
- gh-pages - gh-pages
@@ -32,24 +31,17 @@ stages:
versionSpec: '5.5.1' versionSpec: '5.5.1'
- task: UseDotNet@2 - task: UseDotNet@2
displayName: 'Use .NET Core sdk 3.1.6' displayName: 'Use .NET Core sdk 5.0'
inputs: inputs:
packageType: sdk packageType: sdk
version: 3.1.302 version: 5.0.100
- task: NuGetCommand@2 - task: DotNetCoreCLI@2
displayName: NuGet restore displayName: Build
inputs: inputs:
command: 'restore' command: build
restoreSolution: '$(solution)' projects: '$(solution)'
feedsToUse: config arguments: '--configuration $(buildConfiguration) /p:Platform="$(buildPlatform)"'
- task: MSBuild@1
displayName: Build and package
inputs:
solution: '$(solution)'
platform: $(buildPlatform)
configuration: $(buildConfiguration)
- task: CopyFiles@2 - task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)' displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'

View File

@@ -22,12 +22,6 @@ Source code and extensive sample application available at http://www.hardcodet.n
<tags>NotifyIcon WPF Tray Notify ToolTip Popup Balloon Toast</tags> <tags>NotifyIcon WPF Tray Notify ToolTip Popup Balloon Toast</tags>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="!$(TargetFramework.StartsWith('net4'))">
<GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<GenerateResourceUsePreserializedResources>false</GenerateResourceUsePreserializedResources>
</PropertyGroup>
<PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))"> <PropertyGroup Condition="$(TargetFramework.StartsWith('net4'))">
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup> </PropertyGroup>
@@ -46,6 +40,13 @@ Source code and extensive sample application available at http://www.hardcodet.n
<DebugSymbols>True</DebugSymbols> <DebugSymbols>True</DebugSymbols>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<Choose> <Choose>
<When Condition=" '$(IsSampleProject)' != 'true' "> <When Condition=" '$(IsSampleProject)' != 'true' ">
<PropertyGroup> <PropertyGroup>
@@ -61,10 +62,6 @@ Source code and extensive sample application available at http://www.hardcodet.n
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Version="3.2.31">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/> <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
<None Include="$(SolutionDir)\icon.png" Pack="true" PackagePath="\"/> <None Include="$(SolutionDir)\icon.png" Pack="true" PackagePath="\"/>
</ItemGroup> </ItemGroup>

View File

@@ -1,4 +1,4 @@
<Application x:Class="Samples.App" <Application x:Class="NotifyIconWpf.Sample.ShowCases.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Main.xaml"> StartupUri="Main.xaml">

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples namespace NotifyIconWpf.Sample.ShowCases
{ {
/// <summary> /// <summary>
/// Interaction logic for App.xaml /// Interaction logic for App.xaml

View File

@@ -1,7 +1,7 @@
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
namespace Samples.Commands namespace NotifyIconWpf.Sample.ShowCases.Commands
{ {
/// <summary> /// <summary>
/// Closes the current window. /// Closes the current window.

View File

@@ -6,7 +6,7 @@ using System.Windows.Markup;
using System.Windows.Media; using System.Windows.Media;
using Hardcodet.Wpf.TaskbarNotification; using Hardcodet.Wpf.TaskbarNotification;
namespace Samples.Commands namespace NotifyIconWpf.Sample.ShowCases.Commands
{ {
/// <summary> /// <summary>
/// Basic implementation of the <see cref="ICommand"/> /// Basic implementation of the <see cref="ICommand"/>

View File

@@ -1,7 +1,7 @@
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
namespace Samples.Commands namespace NotifyIconWpf.Sample.ShowCases.Commands
{ {
/// <summary> /// <summary>
/// Hides the main window. /// Hides the main window.

View File

@@ -1,7 +1,7 @@
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
namespace Samples.Commands namespace NotifyIconWpf.Sample.ShowCases.Commands
{ {
/// <summary> /// <summary>
/// Shows the main window. /// Shows the main window.

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 502 B

After

Width:  |  Height:  |  Size: 502 B

View File

Before

Width:  |  Height:  |  Size: 667 B

After

Width:  |  Height:  |  Size: 667 B

View File

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View File

Before

Width:  |  Height:  |  Size: 113 KiB

After

Width:  |  Height:  |  Size: 113 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 237 B

View File

@@ -1,5 +1,5 @@
<Window <Window
x:Class="Samples.Main" x:Class="NotifyIconWpf.Sample.ShowCases.Main"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="NotifyIcon Samples" Title="NotifyIcon Samples"
@@ -30,7 +30,7 @@
FontSize="14" FontSize="14"
FontStyle="Italic" FontStyle="Italic"
FontWeight="Bold" FontWeight="Bold"
TextWrapping="Wrap" Text="WPF NotifyIcon 1.0.6 - Samples"/> TextWrapping="Wrap" Text="{Binding Path=SampleTitle}"/>
<Button <Button
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="10,133,0,0" Margin="10,133,0,0"
@@ -38,8 +38,8 @@
Width="164" Width="164"
Height="27" Height="27"
Content="NotifyIcon Declaration" Content="NotifyIcon Declaration"
x:Name="btnDeclaration" x:Name="BtnDeclaration"
Click="btnDeclaration_Click" /> Click="BtnDeclaration_Click" />
<TextBlock <TextBlock
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="10,50,0,0" Margin="10,50,0,0"
@@ -67,8 +67,8 @@
Content="ToolTips - Inline Declaration" Content="ToolTips - Inline Declaration"
VerticalAlignment="Top" VerticalAlignment="Top"
Height="27" Height="27"
x:Name="btnInlineToolTip" x:Name="BtnInlineToolTip"
Click="btnInlineToolTip_Click" /> Click="BtnInlineToolTip_Click" />
<Button <Button
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="10,244,0,0" Margin="10,244,0,0"
@@ -76,8 +76,8 @@
Content="Popups" Content="Popups"
VerticalAlignment="Top" VerticalAlignment="Top"
Height="27" Height="27"
x:Name="btnPopups" x:Name="BtnPopups"
Click="btnPopups_Click" /> Click="BtnPopups_Click" />
<Button <Button
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="10,281,0,0" Margin="10,281,0,0"
@@ -85,8 +85,8 @@
Content="Context Menus" Content="Context Menus"
VerticalAlignment="Top" VerticalAlignment="Top"
Height="27" Height="27"
x:Name="btnContextMenus" x:Name="BtnContextMenus"
Click="btnContextMenus_Click" /> Click="BtnContextMenus_Click" />
<Button <Button
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="10,318,0,0" Margin="10,318,0,0"
@@ -94,8 +94,8 @@
Content="Balloon Tips" Content="Balloon Tips"
VerticalAlignment="Top" VerticalAlignment="Top"
Height="27" Height="27"
x:Name="btnBalloons" x:Name="BtnBalloons"
Click="btnBalloons_Click" /> Click="BtnBalloons_Click" />
<Button <Button
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="10,355,0,0" Margin="10,355,0,0"
@@ -103,8 +103,8 @@
Content="Commands" Content="Commands"
VerticalAlignment="Top" VerticalAlignment="Top"
Height="27" Height="27"
x:Name="btnCommands" x:Name="BtnCommands"
Click="btnCommands_Click" /> Click="BtnCommands_Click" />
<Button <Button
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="10,207,0,0" Margin="10,207,0,0"
@@ -112,8 +112,8 @@
Content="ToolTip User Control" Content="ToolTip User Control"
Height="27" Height="27"
VerticalAlignment="Top" VerticalAlignment="Top"
x:Name="btnToolTipControl" x:Name="BtnToolTipControl"
Click="btnToolTipControl_Click" /> Click="BtnToolTipControl_Click" />
<TextBlock <TextBlock
Margin="255.31,50,0,0" Margin="255.31,50,0,0"
VerticalAlignment="Top" VerticalAlignment="Top"
@@ -136,8 +136,8 @@
VerticalAlignment="Top" VerticalAlignment="Top"
Height="27" Height="27"
Content="Open Sample Window" Content="Open Sample Window"
x:Name="btnMainSample" x:Name="BtnMainSample"
Click="btnMainSample_Click" Click="BtnMainSample_Click"
Width="164" Width="164"
HorizontalAlignment="Left" /> HorizontalAlignment="Left" />
<Path <Path
@@ -207,8 +207,8 @@
Content="Events" Content="Events"
VerticalAlignment="Top" VerticalAlignment="Top"
Height="27" Height="27"
x:Name="btnEvents" x:Name="BtnEvents"
Click="btnEvents_Click" Width="164" HorizontalAlignment="Left" /> Click="BtnEvents_Click" Width="164" HorizontalAlignment="Left" />
<Button <Button
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="10,392,0,0" Margin="10,392,0,0"
@@ -216,8 +216,8 @@
Content="Data Binding" Content="Data Binding"
VerticalAlignment="Top" VerticalAlignment="Top"
Height="27" Height="27"
x:Name="btnDataBinding" x:Name="BtnDataBinding"
Click="btnDataBinding_Click" /> Click="BtnDataBinding_Click" />
<Button <Button
HorizontalAlignment="Left" HorizontalAlignment="Left"
Margin="10,429,0,0" Margin="10,429,0,0"
@@ -225,8 +225,8 @@
Content="MVVM" Content="MVVM"
VerticalAlignment="Top" VerticalAlignment="Top"
Height="27" Height="27"
x:Name="btnMvvm" x:Name="BtnMvvm"
Click="btnMvvm_Click" /> Click="BtnMvvm_Click" />
<Image Margin="562.24,-19,-41.24,440" Source="Images/Logo.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5" Opacity="0.235"> <Image Margin="562.24,-19,-41.24,440" Source="Images/Logo.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5" Opacity="0.235">
<Image.RenderTransform> <Image.RenderTransform>
<TransformGroup> <TransformGroup>

View File

@@ -1,16 +1,11 @@
using System.Diagnostics; using System;
using System.Diagnostics;
using System.Reflection;
using System.Windows; using System.Windows;
using Samples.Tutorials; using NotifyIconWpf.Sample.ShowCases.Showcase;
using Samples.Tutorials.Balloons; using NotifyIconWpf.Sample.ShowCases.Tutorials;
using Samples.Tutorials.Commands;
using Samples.Tutorials.ContextMenus;
using Samples.Tutorials.DataBinding;
using Samples.Tutorials.Events;
using Samples.Tutorials.MvvmSample;
using Samples.Tutorials.Popups;
using Samples.Tutorials.ToolTips;
namespace Samples namespace NotifyIconWpf.Sample.ShowCases
{ {
/// <summary> /// <summary>
/// Interaction logic for Main.xaml /// Interaction logic for Main.xaml
@@ -20,9 +15,9 @@ namespace Samples
public Main() public Main()
{ {
InitializeComponent(); InitializeComponent();
DataContext = this;
} }
/// <summary> /// <summary>
/// Sets <see cref="Window.WindowStartupLocation"/> and /// Sets <see cref="Window.WindowStartupLocation"/> and
/// <see cref="Window.Owner"/> properties of a dialog that /// <see cref="Window.Owner"/> properties of a dialog that
@@ -36,58 +31,79 @@ namespace Samples
window.ShowDialog(); window.ShowDialog();
} }
private void btnDeclaration_Click(object sender, RoutedEventArgs e) private static string Version
{
get
{
var executingAssembly = Assembly.GetExecutingAssembly();
// Use assembly version
string version = executingAssembly.GetName().Version.ToString();
// Use AssemblyFileVersion if available
var assemblyFileVersionAttribute = executingAssembly.GetCustomAttribute<AssemblyFileVersionAttribute>();
if (!string.IsNullOrEmpty(assemblyFileVersionAttribute?.Version))
{
var assemblyFileVersion = new Version(assemblyFileVersionAttribute.Version);
version = assemblyFileVersion.ToString(3);
}
return version.Replace("+", " - ");
}
}
public string SampleTitle { get; } = $"WPF NotifyIcon {Version} - Samples";
private void BtnDeclaration_Click(object sender, RoutedEventArgs e)
{ {
ShowDialog(new SimpleWindowWithNotifyIcon()); ShowDialog(new SimpleWindowWithNotifyIcon());
} }
private void BtnInlineToolTip_Click(object sender, RoutedEventArgs e)
private void btnInlineToolTip_Click(object sender, RoutedEventArgs e)
{ {
ShowDialog(new InlineToolTipWindow()); ShowDialog(new InlineToolTipWindow());
} }
private void btnToolTipControl_Click(object sender, RoutedEventArgs e) private void BtnToolTipControl_Click(object sender, RoutedEventArgs e)
{ {
ShowDialog(new UserControlToolTipWindow()); ShowDialog(new UserControlToolTipWindow());
} }
private void btnPopups_Click(object sender, RoutedEventArgs e) private void BtnPopups_Click(object sender, RoutedEventArgs e)
{ {
ShowDialog(new InlinePopupWindow()); ShowDialog(new InlinePopupWindow());
} }
private void btnContextMenus_Click(object sender, RoutedEventArgs e) private void BtnContextMenus_Click(object sender, RoutedEventArgs e)
{ {
ShowDialog(new InlineContextMenuWindow()); ShowDialog(new InlineContextMenuWindow());
} }
private void btnBalloons_Click(object sender, RoutedEventArgs e) private void BtnBalloons_Click(object sender, RoutedEventArgs e)
{ {
ShowDialog(new BalloonSampleWindow()); ShowDialog(new BalloonSampleWindow());
} }
private void btnCommands_Click(object sender, RoutedEventArgs e) private void BtnCommands_Click(object sender, RoutedEventArgs e)
{ {
ShowDialog(new CommandWindow()); ShowDialog(new CommandWindow());
} }
private void btnEvents_Click(object sender, RoutedEventArgs e) private void BtnEvents_Click(object sender, RoutedEventArgs e)
{ {
ShowDialog(new EventVisualizerWindow()); ShowDialog(new EventVisualizerWindow());
} }
private void btnDataBinding_Click(object sender, RoutedEventArgs e) private void BtnDataBinding_Click(object sender, RoutedEventArgs e)
{ {
ShowDialog(new DataBoundToolTipWindow()); ShowDialog(new DataBoundToolTipWindow());
} }
private void btnMvvm_Click(object sender, RoutedEventArgs e) private void BtnMvvm_Click(object sender, RoutedEventArgs e)
{ {
ShowDialog(new MvvmSampleWindow()); ShowDialog(new MvvmSampleWindow());
} }
private void btnMainSample_Click(object sender, RoutedEventArgs e) private void BtnMainSample_Click(object sender, RoutedEventArgs e)
{ {
var sampleWindow = new ShowcaseWindow var sampleWindow = new ShowcaseWindow
{ {

View File

@@ -1,15 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> <TargetFrameworks>net472;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<RootNamespace>Samples</RootNamespace> <GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<AssemblyTitle>Sample Project</AssemblyTitle> <ApplicationManifest>app.manifest</ApplicationManifest>
<Product>Sample Project</Product>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\NotifyIconWpf\NotifyIconWpf.csproj" /> <ProjectReference Include="..\NotifyIconWpf\NotifyIconWpf.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net45'">
<PackageReference Include="System.Resources.Extensions" Version="5.0.0" PrivateAssets="All"/>
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))"> <ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<Reference Include="PresentationFramework.Aero" /> <Reference Include="PresentationFramework.Aero" />
<Reference Include="System.Xaml" /> <Reference Include="System.Xaml" />

View File

@@ -1,4 +1,4 @@
<UserControl x:Class="Samples.FancyBalloon" <UserControl x:Class="NotifyIconWpf.Sample.ShowCases.Showcase.FancyBalloon"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"

View File

@@ -5,7 +5,7 @@ using System.Windows.Controls.Primitives;
using System.Windows.Input; using System.Windows.Input;
using Hardcodet.Wpf.TaskbarNotification; using Hardcodet.Wpf.TaskbarNotification;
namespace Samples namespace NotifyIconWpf.Sample.ShowCases.Showcase
{ {
/// <summary> /// <summary>
/// Interaction logic for FancyBalloon.xaml /// Interaction logic for FancyBalloon.xaml

View File

@@ -1,5 +1,5 @@
<UserControl <UserControl
x:Class="Samples.FancyPopup" x:Class="NotifyIconWpf.Sample.ShowCases.Showcase.FancyPopup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"

View File

@@ -1,7 +1,7 @@
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
namespace Samples namespace NotifyIconWpf.Sample.ShowCases.Showcase
{ {
/// <summary> /// <summary>
/// Interaction logic for FancyPopup.xaml /// Interaction logic for FancyPopup.xaml

View File

@@ -5,7 +5,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"
mc:Ignorable="d" mc:Ignorable="d"
x:Class="Samples.FancyToolTip" x:Class="NotifyIconWpf.Sample.ShowCases.Showcase.FancyToolTip"
x:Name="me" x:Name="me"
Width="285" Width="285"
Height="136"> Height="136">

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples namespace NotifyIconWpf.Sample.ShowCases.Showcase
{ {
/// <summary> /// <summary>
/// Interaction logic for FancyToolTip.xaml /// Interaction logic for FancyToolTip.xaml

View File

@@ -1,7 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Commands="clr-namespace:Samples.Commands" xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:tb="http://www.hardcodet.net/taskbar"> xmlns:commands="clr-namespace:NotifyIconWpf.Sample.ShowCases.Commands">
<LinearGradientBrush x:Key="MenuBackground" <LinearGradientBrush x:Key="MenuBackground"
EndPoint="0.5,1" EndPoint="0.5,1"
StartPoint="0.5,0"> StartPoint="0.5,0">
@@ -55,7 +55,7 @@
</MenuItem> </MenuItem>
<MenuItem Header="Show Showcase Window" <MenuItem Header="Show Showcase Window"
Command="{Commands:ShowSampleWindowCommand}" Command="{commands:ShowSampleWindowCommand}"
CommandParameter="{Binding}"> CommandParameter="{Binding}">
<MenuItem.Icon> <MenuItem.Icon>
<Image Width="16" <Image Width="16"
@@ -67,7 +67,7 @@
<Separator /> <Separator />
<MenuItem Header="Hide Showcase Window" <MenuItem Header="Hide Showcase Window"
Command="{Commands:HideSampleWindowCommand}" Command="{commands:HideSampleWindowCommand}"
CommandParameter="{Binding}"> CommandParameter="{Binding}">
<MenuItem.Icon> <MenuItem.Icon>
<Image Width="16" <Image Width="16"

View File

@@ -1,5 +1,5 @@
<Window <Window
x:Class="Samples.ShowcaseWindow" x:Class="NotifyIconWpf.Sample.ShowCases.Showcase.ShowcaseWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"
@@ -11,7 +11,8 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" mc:Ignorable="d"
xmlns:local="clr-namespace:Samples" xmlns:local="clr-namespace:Samples"
xmlns:Commands="clr-namespace:Samples.Commands" xmlns:commands="clr-namespace:NotifyIconWpf.Sample.ShowCases.Commands"
xmlns:showcase="clr-namespace:NotifyIconWpf.Sample.ShowCases.Showcase"
MinWidth="750" MinWidth="750"
MinHeight="800" MinHeight="800"
ResizeMode="NoResize"> ResizeMode="NoResize">
@@ -68,17 +69,17 @@
Visibility="{Binding Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=iconVisibility, Mode=Default}" Visibility="{Binding Path=IsChecked, Converter={StaticResource BooleanToVisibilityConverter}, ElementName=iconVisibility, Mode=Default}"
MenuActivation="{Binding Path=SelectedItem, ElementName=lstMenuTrigger, Mode=Default}" MenuActivation="{Binding Path=SelectedItem, ElementName=lstMenuTrigger, Mode=Default}"
PopupActivation="{Binding Path=SelectedItem, ElementName=lstPopupTrigger, Mode=Default}" PopupActivation="{Binding Path=SelectedItem, ElementName=lstPopupTrigger, Mode=Default}"
DoubleClickCommand="{Commands:ShowSampleWindowCommand}" DoubleClickCommand="{commands:ShowSampleWindowCommand}"
DoubleClickCommandParameter="{Binding RelativeSource={RelativeSource Self}}"> DoubleClickCommandParameter="{Binding RelativeSource={RelativeSource Self}}">
<tb:TaskbarIcon.TrayPopup> <tb:TaskbarIcon.TrayPopup>
<!-- the control will be put into a popup with an explicit DataContext --> <!-- the control will be put into a popup with an explicit DataContext -->
<local:FancyPopup /> <showcase:FancyPopup />
</tb:TaskbarIcon.TrayPopup> </tb:TaskbarIcon.TrayPopup>
<tb:TaskbarIcon.TrayToolTip> <tb:TaskbarIcon.TrayToolTip>
<!-- the control will be put into a tooltip with an explicit DataContext --> <!-- the control will be put into a tooltip with an explicit DataContext -->
<local:FancyToolTip <showcase:FancyToolTip
Opacity="0.85" Opacity="0.85"
InfoText="{Binding Path=ToolTipText}" /> InfoText="{Binding Path=ToolTipText}" />
</tb:TaskbarIcon.TrayToolTip> </tb:TaskbarIcon.TrayToolTip>

View File

@@ -4,7 +4,7 @@ using System.Windows.Controls.Primitives;
using System.Windows.Navigation; using System.Windows.Navigation;
using Hardcodet.Wpf.TaskbarNotification; using Hardcodet.Wpf.TaskbarNotification;
namespace Samples namespace NotifyIconWpf.Sample.ShowCases.Showcase
{ {
/// <summary> /// <summary>
/// Interaction logic for ShowcaseWindow.xaml /// Interaction logic for ShowcaseWindow.xaml

View File

@@ -1,5 +1,5 @@
<UserControl <UserControl
x:Class="Samples.WelcomeBalloon" x:Class="NotifyIconWpf.Sample.ShowCases.Showcase.WelcomeBalloon"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"

View File

@@ -1,6 +1,6 @@
using System.Windows.Controls; using System.Windows.Controls;
namespace Samples namespace NotifyIconWpf.Sample.ShowCases.Showcase
{ {
/// <summary> /// <summary>
/// Interaction logic for WelcomeBalloon.xaml /// Interaction logic for WelcomeBalloon.xaml

View File

@@ -1,5 +1,5 @@
<Window <Window
x:Class="Samples.Tutorials.SimpleWindowWithNotifyIcon" x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.SimpleWindowWithNotifyIcon"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples.Tutorials namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for SimpleWindowWithNotifyIcon.xaml /// Interaction logic for SimpleWindowWithNotifyIcon.xaml

View File

@@ -1,5 +1,5 @@
<Window <Window
x:Class="Samples.Tutorials.ToolTips.InlineToolTipWindow" x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.InlineToolTipWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples.Tutorials.ToolTips namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for Window1.xaml /// Interaction logic for Window1.xaml

View File

@@ -1,5 +1,5 @@
<UserControl <UserControl
x:Class="Samples.Tutorials.ToolTips.SimpleUserControl" x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.SimpleUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

View File

@@ -1,6 +1,6 @@
using System.Windows.Controls; using System.Windows.Controls;
namespace Samples.Tutorials.ToolTips namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for SimpleUserControl.xaml /// Interaction logic for SimpleUserControl.xaml

View File

@@ -1,9 +1,9 @@
<Window <Window
x:Class="Samples.Tutorials.ToolTips.UserControlToolTipWindow" x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.UserControlToolTipWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:local="clr-namespace:Samples.Tutorials.ToolTips" xmlns:tutorials="clr-namespace:NotifyIconWpf.Sample.ShowCases.Tutorials"
Height="300" Height="300"
Width="300"> Width="300">
<Grid> <Grid>
@@ -15,7 +15,7 @@
<!-- assign user control as ToolTip --> <!-- assign user control as ToolTip -->
<tb:TaskbarIcon.TrayToolTip> <tb:TaskbarIcon.TrayToolTip>
<local:SimpleUserControl /> <tutorials:SimpleUserControl />
</tb:TaskbarIcon.TrayToolTip> </tb:TaskbarIcon.TrayToolTip>
</tb:TaskbarIcon> </tb:TaskbarIcon>

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples.Tutorials.ToolTips namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for UserControlToolTipWindow.xaml /// Interaction logic for UserControlToolTipWindow.xaml

View File

@@ -1,9 +1,9 @@
<Window <Window
x:Class="Samples.Tutorials.Popups.InlinePopupWindow" x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.InlinePopupWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:commands="clr-namespace:Samples.Commands" xmlns:commands="clr-namespace:NotifyIconWpf.Sample.ShowCases.Commands"
Height="300" Height="300"
Width="300"> Width="300">
<Grid> <Grid>

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples.Tutorials.Popups namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for InlinePopupWindow.xaml /// Interaction logic for InlinePopupWindow.xaml

View File

@@ -1,8 +1,8 @@
<Window x:Class="Samples.Tutorials.ContextMenus.InlineContextMenuWindow" <Window x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.InlineContextMenuWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:commands="clr-namespace:Samples.Commands" xmlns:commands="clr-namespace:NotifyIconWpf.Sample.ShowCases.Commands"
Height="300" Height="300"
Width="300"> Width="300">
<Grid> <Grid>

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples.Tutorials.ContextMenus namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for InlineContextMenuWindow.xaml /// Interaction logic for InlineContextMenuWindow.xaml

View File

@@ -1,5 +1,5 @@
<Window <Window
x:Class="Samples.Tutorials.Balloons.BalloonSampleWindow" x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.BalloonSampleWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"

View File

@@ -1,7 +1,8 @@
using System.Windows; using System.Windows;
using System.Windows.Controls.Primitives; using System.Windows.Controls.Primitives;
using NotifyIconWpf.Sample.ShowCases.Showcase;
namespace Samples.Tutorials.Balloons namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for BalloonSampleWindow.xaml /// Interaction logic for BalloonSampleWindow.xaml

View File

@@ -1,19 +1,19 @@
<Window <Window
x:Class="Samples.Tutorials.Commands.CommandWindow" x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.CommandWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:local="clr-namespace:Samples.Tutorials.Commands"
Height="300" Height="300"
Width="300" Width="300"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:tutorials="clr-namespace:NotifyIconWpf.Sample.ShowCases.Tutorials"
mc:Ignorable="d"> mc:Ignorable="d">
<Grid> <Grid>
<!-- declare the command as a local resource --> <!-- declare the command as a local resource -->
<Grid.Resources> <Grid.Resources>
<local:ShowMessageCommand <tutorials:ShowMessageCommand
x:Key="MessageCommand" /> x:Key="MessageCommand" />
</Grid.Resources> </Grid.Resources>

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples.Tutorials.Commands namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for CommandWindow.xaml /// Interaction logic for CommandWindow.xaml

View File

@@ -2,7 +2,7 @@
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
namespace Samples.Tutorials.Commands namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// A simple command that displays the command parameter as /// A simple command that displays the command parameter as

View File

@@ -1,5 +1,5 @@
<Window <Window
x:Class="Samples.Tutorials.Events.EventVisualizerWindow" x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.EventVisualizerWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples.Tutorials.Events namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for EventVisualizerWindow.xaml /// Interaction logic for EventVisualizerWindow.xaml

View File

@@ -1,4 +1,4 @@
<Window x:Class="Samples.Tutorials.DataBinding.DataBoundToolTipWindow" <Window x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.DataBoundToolTipWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"
@@ -9,7 +9,7 @@
<!-- the ToolTipText property is bound to the TextBox below --> <!-- the ToolTipText property is bound to the TextBox below -->
<tb:TaskbarIcon x:Name="MyNotifyIcon1" <tb:TaskbarIcon x:Name="MyNotifyIcon1"
IconSource="/Icons/Error.ico" IconSource="/Icons/Error.ico"
ToolTipText="{Binding ElementName=txtToolTip, Path=Text}"> ToolTipText="{Binding ElementName=TxtToolTip, Path=Text}">
<!-- <!--
The TextBlock bound to the ToolTipText property of the NotifyIcon The TextBlock bound to the ToolTipText property of the NotifyIcon
@@ -36,7 +36,7 @@
<tb:TaskbarIcon x:Name="MyNotifyIcon2" <tb:TaskbarIcon x:Name="MyNotifyIcon2"
DataContext="WPF FTW " DataContext="WPF FTW "
IconSource="/Icons/Inactive.ico" IconSource="/Icons/Inactive.ico"
ToolTipText="{Binding ElementName=txtToolTip, Path=Text}"> ToolTipText="{Binding ElementName=TxtToolTip, Path=Text}">
<tb:TaskbarIcon.TrayToolTip> <tb:TaskbarIcon.TrayToolTip>
@@ -77,7 +77,7 @@
<TextBox Margin="26,0,24,10" <TextBox Margin="26,0,24,10"
Text="hello world" Text="hello world"
TextWrapping="Wrap" TextWrapping="Wrap"
x:Name="txtToolTip" x:Name="TxtToolTip"
Height="25" Height="25"
VerticalAlignment="Bottom" /> VerticalAlignment="Bottom" />
<TextBlock Margin="26,0,125,45" <TextBlock Margin="26,0,125,45"

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples.Tutorials.DataBinding namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for DataBoundToolTipWindow.xaml /// Interaction logic for DataBoundToolTipWindow.xaml

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -3,7 +3,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" mc:Ignorable="d"
x:Class="Samples.Tutorials.MvvmSample.ClockPopup" x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.ClockPopup"
x:Name="UserControl" x:Name="UserControl"
Height="141" Height="141"
Width="304"> Width="304">

View File

@@ -1,6 +1,6 @@
using System.Windows.Controls; using System.Windows.Controls;
namespace Samples.Tutorials.MvvmSample namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for ClockPopup.xaml /// Interaction logic for ClockPopup.xaml

View File

@@ -3,7 +3,7 @@ using System.ComponentModel;
using System.Windows; using System.Windows;
using System.Windows.Threading; using System.Windows.Threading;
namespace Samples.Tutorials.MvvmSample namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
public class MvvmSampleViewModel : INotifyPropertyChanged public class MvvmSampleViewModel : INotifyPropertyChanged
{ {

View File

@@ -1,13 +1,13 @@
<Window x:Class="Samples.Tutorials.MvvmSample.MvvmSampleWindow" <Window x:Class="NotifyIconWpf.Sample.ShowCases.Tutorials.MvvmSampleWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Samples.Tutorials.MvvmSample"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:tutorials="clr-namespace:NotifyIconWpf.Sample.ShowCases.Tutorials"
Title="MvvmSampleWindow" Title="MvvmSampleWindow"
Height="300" Height="300"
Width="300"> Width="300">
<Window.DataContext> <Window.DataContext>
<local:MvvmSampleViewModel /> <tutorials:MvvmSampleViewModel />
</Window.DataContext> </Window.DataContext>
<Grid> <Grid>
@@ -20,7 +20,7 @@
ToolTipText="{Binding Timestamp}"> ToolTipText="{Binding Timestamp}">
<tb:TaskbarIcon.TrayPopup > <tb:TaskbarIcon.TrayPopup >
<!-- the popup, here a custom user control, will also get the DataContext of the NotifyIcon --> <!-- the popup, here a custom user control, will also get the DataContext of the NotifyIcon -->
<local:ClockPopup Opacity="0.8" /> <tutorials:ClockPopup Opacity="0.8" />
</tb:TaskbarIcon.TrayPopup> </tb:TaskbarIcon.TrayPopup>
</tb:TaskbarIcon> </tb:TaskbarIcon>

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples.Tutorials.MvvmSample namespace NotifyIconWpf.Sample.ShowCases.Tutorials
{ {
/// <summary> /// <summary>
/// Interaction logic for MvvmSampleWindow.xaml /// Interaction logic for MvvmSampleWindow.xaml

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
</configuration>

View File

@@ -1,4 +1,4 @@
<Application x:Class="Windowless_Sample.App" <Application x:Class="NotifyIconWpf.Sample.Windowless.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
ShutdownMode="OnExplicitShutdown"> ShutdownMode="OnExplicitShutdown">

View File

@@ -1,7 +1,7 @@
using System.Windows; using System.Windows;
using Hardcodet.Wpf.TaskbarNotification; using Hardcodet.Wpf.TaskbarNotification;
namespace Windowless_Sample namespace NotifyIconWpf.Sample.Windowless
{ {
/// <summary> /// <summary>
/// Simple application. Check the XAML for comments. /// Simple application. Check the XAML for comments.

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Windows.Input; using System.Windows.Input;
namespace Windowless_Sample namespace NotifyIconWpf.Sample.Windowless
{ {
/// <summary> /// <summary>
/// Simplistic delegate command for the demo. /// Simplistic delegate command for the demo.

View File

@@ -1,4 +1,4 @@
<Window x:Class="Windowless_Sample.MainWindow" <Window x:Class="NotifyIconWpf.Sample.Windowless.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525"> Title="MainWindow" Height="350" Width="525">

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Windowless_Sample namespace NotifyIconWpf.Sample.Windowless
{ {
/// <summary> /// <summary>
/// Interaction logic for MainWindow.xaml /// Interaction logic for MainWindow.xaml

View File

@@ -1,7 +1,7 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"
xmlns:local="clr-namespace:Windowless_Sample"> xmlns:local="clr-namespace:NotifyIconWpf.Sample.Windowless">
<!-- The taskbar context menu - the first row is a dummy to show off simple data binding --> <!-- The taskbar context menu - the first row is a dummy to show off simple data binding -->
<!-- <!--

View File

@@ -1,7 +1,7 @@
using System.Windows; using System.Windows;
using System.Windows.Input; using System.Windows.Input;
namespace Windowless_Sample namespace NotifyIconWpf.Sample.Windowless
{ {
/// <summary> /// <summary>
/// Provides bindable properties and commands for the NotifyIcon. In this sample, the /// Provides bindable properties and commands for the NotifyIcon. In this sample, the

View File

@@ -1,15 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFrameworks>net45;net472;netcoreapp3.1</TargetFrameworks> <TargetFrameworks>net45;net472;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<RootNamespace>Windowless_Sample</RootNamespace> <GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<AssemblyTitle>Windowless Sample</AssemblyTitle> <ApplicationManifest>app.manifest</ApplicationManifest>
<Product>Windowless Sample</Product>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\NotifyIconWpf\NotifyIconWpf.csproj" /> <ProjectReference Include="..\NotifyIconWpf\NotifyIconWpf.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net45'">
<PackageReference Include="System.Resources.Extensions" Version="5.0.0" PrivateAssets="All"/>
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))"> <ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
</configuration>

View File

@@ -1,5 +1,5 @@
<UserControl <UserControl
x:Class="Samples.FancyPopup" x:Class="NotifyIconWpf.Sample.WindowsForms.FancyPopup"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:tb="http://www.hardcodet.net/taskbar" xmlns:tb="http://www.hardcodet.net/taskbar"

View File

@@ -1,6 +1,6 @@
using System.Windows; using System.Windows;
namespace Samples namespace NotifyIconWpf.Sample.WindowsForms
{ {
/// <summary> /// <summary>
/// Interaction logic for FancyPopup.xaml /// Interaction logic for FancyPopup.xaml

View File

@@ -1,4 +1,4 @@
namespace WindowsFormsSample namespace NotifyIconWpf.Sample.WindowsForms
{ {
partial class Form1 partial class Form1
{ {

View File

@@ -2,10 +2,9 @@
using System.Windows; using System.Windows;
using System.Windows.Forms; using System.Windows.Forms;
using Hardcodet.Wpf.TaskbarNotification; using Hardcodet.Wpf.TaskbarNotification;
using Samples; using NotifyIconWpf.Sample.WindowsForms.Properties;
using WindowsFormsSample.Properties;
namespace WindowsFormsSample namespace NotifyIconWpf.Sample.WindowsForms
{ {
public partial class Form1 : Form public partial class Form1 : Form
{ {

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View File

@@ -1,16 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> <Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
<PropertyGroup> <PropertyGroup>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<TargetFrameworks>net472;netcoreapp3.1</TargetFrameworks> <TargetFrameworks>net472;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<StartupObject>WindowsFormsSample.Program</StartupObject> <GenerateResourceUsePreserializedResources>true</GenerateResourceUsePreserializedResources>
<AssemblyTitle>WindowsFormsSample</AssemblyTitle> <ApplicationManifest>app.manifest</ApplicationManifest>
<Product>WindowsFormsSample</Product>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\NotifyIconWpf\NotifyIconWpf.csproj" /> <ProjectReference Include="..\NotifyIconWpf\NotifyIconWpf.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net45'">
<PackageReference Include="System.Resources.Extensions" Version="5.0.0" PrivateAssets="All"/>
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))"> <ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<Reference Include="PresentationCore" /> <Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" /> <Reference Include="PresentationFramework" />

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Windows.Forms; using System.Windows.Forms;
namespace WindowsFormsSample namespace NotifyIconWpf.Sample.WindowsForms
{ {
internal static class Program internal static class Program
{ {

View File

@@ -8,10 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace WindowsFormsSample.Properties { namespace NotifyIconWpf.Sample.WindowsForms.Properties {
using System;
/// <summary> /// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc. /// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary> /// </summary>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<System.Windows.Forms.ApplicationConfigurationSection>
<add key="DpiAwareness" value="PerMonitorV2" />
</System.Windows.Forms.ApplicationConfigurationSection>
</configuration>

View File

@@ -14,11 +14,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotifyIconWpf", "NotifyIconWpf\NotifyIconWpf.csproj", "{7AC63864-7638-41C4-969C-D3197EF2BED9}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotifyIconWpf", "NotifyIconWpf\NotifyIconWpf.csproj", "{7AC63864-7638-41C4-969C-D3197EF2BED9}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample Project", "Sample Project\Sample Project.csproj", "{71C74F29-F1C2-49C5-969F-C25AC4CDFCCC}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotifyIconWpf.Sample.ShowCases", "NotifyIconWpf.Sample.ShowCases\NotifyIconWpf.Sample.ShowCases.csproj", "{71C74F29-F1C2-49C5-969F-C25AC4CDFCCC}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WindowsFormsSample", "WindowsFormsSample\WindowsFormsSample.csproj", "{F6DC0A6D-D1CE-4AD2-92ED-08FFF0AD4FA8}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotifyIconWpf.Sample.WindowsForms", "NotifyIconWpf.Sample.WindowsForms\NotifyIconWpf.Sample.WindowsForms.csproj", "{F6DC0A6D-D1CE-4AD2-92ED-08FFF0AD4FA8}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Windowless Sample", "Windowless Sample\Windowless Sample.csproj", "{964EBFBE-A600-49B2-BDD8-422B46F1D544}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NotifyIconWpf.Sample.Windowless", "NotifyIconWpf.Sample.Windowless\NotifyIconWpf.Sample.Windowless.csproj", "{964EBFBE-A600-49B2-BDD8-422B46F1D544}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@@ -4,16 +4,9 @@
<AssemblyName>Hardcodet.NotifyIcon.Wpf</AssemblyName> <AssemblyName>Hardcodet.NotifyIcon.Wpf</AssemblyName>
<AssemblyTitle>NotifyIcon for WPF</AssemblyTitle> <AssemblyTitle>NotifyIcon for WPF</AssemblyTitle>
<Product>NotifyIcon WPF</Product> <Product>NotifyIcon WPF</Product>
<TargetFrameworks>net45;net472;netcoreapp3.1</TargetFrameworks> <TargetFrameworks>net45;net472;netcoreapp3.1;net5.0-windows</TargetFrameworks>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>NotifyIconWpf.snk</AssemblyOriginatorKeyFile>
<DelaySign>false</DelaySign>
</PropertyGroup> </PropertyGroup>
<ItemGroup Condition="!$(TargetFramework.StartsWith('net4'))">
<PackageReference Include="System.Resources.Extensions" Version="4.7.1" />
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))"> <ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<Reference Include="System.Xaml" /> <Reference Include="System.Xaml" />
<Reference Include="WindowsBase" /> <Reference Include="WindowsBase" />

View File

@@ -1,6 +1,6 @@
{ {
"sdk": { "sdk": {
"version": "3.1.100", "version": "5.0.0",
"rollForward": "latestMajor", "rollForward": "latestMajor",
"allowPrerelease": true "allowPrerelease": true
} }

View File

@@ -1,8 +1,8 @@
{ {
"$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", "$schema": "https://raw.githubusercontent.com/AArnott/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json",
"version": "1.0.9-preview", "version": "1.0.9",
"publicReleaseRefSpec": [ "publicReleaseRefSpec": [
"^refs/heads/release/v\\d+\\.\\d+" ".*/master$"
], ],
"nugetPackageVersion": { "nugetPackageVersion": {
"semVer": 2 "semVer": 2