mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-22 14:22:23 +00:00
76 lines
3.7 KiB
XML
76 lines
3.7 KiB
XML
<Window x:Class="WinUI.ToolbarItem"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:local="clr-namespace:WinUI"
|
|
xmlns:tb="http://www.hardcodet.net/taskbar"
|
|
xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
|
mc:Ignorable="d"
|
|
Height="300" Width="300" Visibility="Hidden" Name="Toolbar">
|
|
|
|
<Window.Resources>
|
|
<CollectionViewSource Source="{Binding ElementName=Toolbar, Path=NetworkCollection}" x:Key="KnownNetworks">
|
|
<CollectionViewSource.SortDescriptions>
|
|
<scm:SortDescription PropertyName="Header" Direction="Ascending"/>
|
|
</CollectionViewSource.SortDescriptions>
|
|
</CollectionViewSource>
|
|
</Window.Resources>
|
|
|
|
<Grid>
|
|
<tb:TaskbarIcon x:Name="MyNotifyIcon"
|
|
IconSource="ZeroTierIcon.ico"
|
|
ToolTipText="ZeroTier One">
|
|
<tb:TaskbarIcon.ContextMenu>
|
|
<ContextMenu>
|
|
<ContextMenu.ItemsSource>
|
|
<CompositeCollection>
|
|
<MenuItem Header="Node ID: unknown"
|
|
Click="ToolbarItem_NodeIDClicked"
|
|
x:Name="nodeIdMenuItem"/>
|
|
<Separator/>
|
|
<MenuItem Header="Join Network..."
|
|
Click="ToolbarItem_JoinNetworkClicked"/>
|
|
<MenuItem Header="Show Networks..."
|
|
Click="ToolbarItem_ShowNetworksClicked"/>
|
|
<Separator/>
|
|
|
|
<CollectionContainer Collection="{Binding Source={StaticResource KnownNetworks}}">
|
|
|
|
</CollectionContainer>
|
|
|
|
<Separator/>
|
|
<MenuItem Header="About..."
|
|
Click="ToolbarItem_AboutClicked"/>
|
|
<MenuItem Header="Preferences..."
|
|
Click="ToolbarItem_PreferencesClicked"/>
|
|
<Separator/>
|
|
<MenuItem Header="Quit"
|
|
Click="ToolbarItem_QuitClicked"/>
|
|
|
|
</CompositeCollection>
|
|
</ContextMenu.ItemsSource>
|
|
|
|
<!--<MenuItem Header="Networks">
|
|
<MenuItem.ItemsSource>
|
|
<CompositeCollection>
|
|
<CollectionContainer Collection="{Binding Source={StaticResource KnownNetworks}}"/>
|
|
</CompositeCollection>
|
|
</MenuItem.ItemsSource>
|
|
<MenuItem.ItemContainerStyle>
|
|
<Style>
|
|
<Setter Property="MenuItem.Header" Value="{Binding Title}"/>
|
|
--><!-- <Setter Property="MenuItem.IsCheckable" Value="True"/> --><!--
|
|
<Setter Property="MenuItem.IsChecked" Value="{Binding IsConnected}"/>
|
|
<EventSetter Event="MenuItem.Click" Handler="ToolbarItem_NetworkClicked"/>
|
|
</Style>
|
|
</MenuItem.ItemContainerStyle>
|
|
</MenuItem>-->
|
|
|
|
</ContextMenu>
|
|
</tb:TaskbarIcon.ContextMenu>
|
|
|
|
</tb:TaskbarIcon>
|
|
</Grid>
|
|
</Window>
|