代码拉取完成,页面将自动刷新
<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>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。