Files
shgxtzcjhoudaosaomadayinwpf/RIZO_Application/Modules/RIZO_Application.Modules.ModuleName/Views/ScanControl.xaml

40 lines
1.9 KiB
Plaintext
Raw Normal View History

<UserControl x:Class="RIZO_Application.Modules.ModuleName.Views.ScanControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:RIZO_Application.Modules.ModuleName.Views"
xmlns:prism="http://prismlibrary.com/"
xmlns:hc="https://handyorg.github.io/handycontrol"
prism:ViewModelLocator.AutoWireViewModel="True">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<!-- 状态指示灯 -->
<Ellipse Width="24" Height="24" Margin="0,0,20,0">
<Ellipse.Style>
<Style TargetType="Ellipse">
<Setter Property="Fill" Value="Red"/>
<Style.Triggers>
<DataTrigger Binding="{Binding IsConnected}" Value="True">
<Setter Property="Fill" Value="Green"/>
</DataTrigger>
</Style.Triggers>
</Style>
</Ellipse.Style>
</Ellipse>
<!-- 状态文字描述 -->
<TextBlock Text="{Binding ConnectionStatusText}"
VerticalAlignment="Center"
Foreground="{Binding ConnectionStatusForeground}"
FontSize="24"/>
</StackPanel>
</Grid>
</UserControl>