1 Star 0 Fork 8

zilin_zhang/fnsync

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
WindowDeviceMananger.xaml 3.49 KB
一键复制 编辑 原始数据 按行查看 历史
holmium 提交于 2020-11-08 09:32 . Adds file management
<Window x:Class="FnSync.WindowDeviceMananger"
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:FnSync"
mc:Ignorable="d"
Title="{DynamicResource DeviceManager}"
Background="{DynamicResource {x:Static SystemColors.MenuBarBrushKey}}"
WindowStartupLocation="CenterScreen" Icon="Resources/icon.ico" Width="650" Height="350"
>
<Window.Resources>
</Window.Resources>
<Grid HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<DataGrid Grid.Row="0" x:Name="DeviceList" Margin="4" AutoGenerateColumns="False" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" SelectionChanged="DeviceList_SelectionChanged">
<DataGrid.Resources>
<ContextMenu x:Key="Menu" DataContext="{Binding PlacementTarget.DataContext, RelativeSource={RelativeSource Self}}">
<MenuItem Header="{DynamicResource Delete}" Click="Menu_Delete_Click"/>
</ContextMenu>
</DataGrid.Resources>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow" >
<Setter Property="ContextMenu" Value="{StaticResource Menu}" />
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTextColumn Header="{DynamicResource Name}" Binding="{Binding Name, Mode=TwoWay}"/>
<DataGridCheckBoxColumn Header="{DynamicResource IsOnline}" IsReadOnly="True" Binding="{Binding Alive, Mode=OneWay}"/>
<DataGridTextColumn Header="{DynamicResource FirstConnectedAt}" IsReadOnly="True" Binding="{Binding FirstConnectedTime, Mode=OneWay}"/>
</DataGrid.Columns>
</DataGrid>
<GridSplitter Width="4"/>
<TabControl x:Name="DeviceInfoTabs" Grid.Column="1" Grid.Row="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,4,4,4" SelectionChanged="DeviceInfoTabs_SelectionChanged">
<TabItem x:Name="TabStatus" Header="{DynamicResource Status}">
<local:ControlDeviceInfomation x:Name="Info"/>
</TabItem>
<TabItem x:Name="TabNotificationHistory" Header="{DynamicResource History}">
<local:ControlHistory x:Name="History"/>
</TabItem>
</TabControl>
<Label x:Name="PromptToSelectDevice" Visibility="Collapsed" Grid.Column="1" Grid.Row="0" Content="{DynamicResource SelectADevice}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" Background="{DynamicResource {x:Static SystemColors.MenuBrushKey}}"/>
<StatusBar Grid.Row="1" Grid.ColumnSpan="2">
<StatusBarItem>
<TextBlock Text="{DynamicResource DeviceCount}"/>
</StatusBarItem>
<StatusBarItem>
<TextBlock x:Name="Count" Text="{Binding Count}"/>
</StatusBarItem>
</StatusBar>
</Grid>
</Window>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/zilin__zhang/fnsync.git
git@gitee.com:zilin__zhang/fnsync.git
zilin__zhang
fnsync
fnsync
master

搜索帮助