<UserControl x:Class="PipeGallery.View.AuditionView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:converter="clr-namespace:PipeGallery.Converter" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="768" d:DesignWidth="1366" Background="#224f86" mc:Ignorable="d"> <UserControl.Resources> <converter:SignalIntensityImageConverter x:Key="signalIntensityImageConverter" /> </UserControl.Resources> <Grid> <Viewbox> <Grid Width="1366" Height="768"> <Grid Margin="10,36,10,10" Background="White"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="3.2*" /> <RowDefinition Height="3.8*" /> </Grid.RowDefinitions> <Grid> <StackPanel Margin="20,0,0,0" Orientation="Horizontal"> <Button x:Name="btnReturn" Margin="10,0,20,0" Style="{StaticResource BtnReturnStyle}" /> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="0.9*" /> </Grid.RowDefinitions> <TextBlock Margin="0,20,0,0" VerticalAlignment="Top" FontSize="24" Foreground="#6c6c6c" Text="听音" /> <TextBlock Grid.Row="1" VerticalAlignment="Top" FontSize="16" Foreground="#cecece" Text="Sound of hearing" /> </Grid> </StackPanel> </Grid> <Grid Grid.Row="1"> <Grid Width="1100" Height="250" VerticalAlignment="Bottom"> <Canvas x:Name="canvasCoordinates" Width="{Binding ElementName=gridChart, Path=ActualWidth}" Height="{Binding ElementName=gridContainer, Path=ActualHeight}" /> </Grid> <Grid x:Name="gridContainer" Width="1120" Height="250" VerticalAlignment="Bottom"> <Border Width="1120" Height="230" VerticalAlignment="Top"> <Border.Background> <ImageBrush ImageSource="/PipeGallery;component/Image/background_03.png" /> </Border.Background> </Border> <Grid x:Name="gridChart" Width="1100" Height="200" VerticalAlignment="Top"> <Grid.Clip> <PathGeometry> <PathFigure IsClosed="False" StartPoint="15,0"> <LineSegment Point="1085,0" /> <ArcSegment Point="1100,15" Size="15,15" SweepDirection="Clockwise" /> <LineSegment Point="1100,185" /> <ArcSegment Point="1085,200" Size="15,15" SweepDirection="Clockwise" /> <LineSegment Point="15,200" /> <ArcSegment Point="0,185" Size="15,15" SweepDirection="Clockwise" /> <LineSegment Point="0,15" /> <ArcSegment Point="15,0" Size="15,15" SweepDirection="Clockwise" /> </PathFigure> </PathGeometry> </Grid.Clip> <Grid x:Name="gridAudiochart"> <Grid x:Name="gridChartContainer" /> </Grid> </Grid> </Grid> </Grid> <Grid Grid.Row="2"> <Border Margin="55,30" BorderBrush="#cecece" BorderThickness="1" CornerRadius="10"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <CheckBox x:Name="btnRed" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding SensorAIsEnable}"> <CheckBox.Template> <ControlTemplate TargetType="{x:Type CheckBox}"> <Viewbox x:Name="vb" Width="104" Height="110"> <StackPanel Orientation="Vertical"> <Grid> <Image x:Name="img" Width="104" Height="94" Source="{Binding SensorASignalIntensity, Converter={StaticResource signalIntensityImageConverter}, ConverterParameter=6}" /> <Image x:Name="img2" Width="104" Height="94" Source="{Binding SensorASignalIntensity, Converter={StaticResource signalIntensityImageConverter}, ConverterParameter=8}" Visibility="Collapsed" /> </Grid> <TextBlock x:Name="txt" Margin="0" HorizontalAlignment="Left" FontSize="14" Foreground="#8e8e8e" Text="传感器" /> </StackPanel> </Viewbox> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="img" Property="Visibility" Value="Collapsed" /> <Setter TargetName="img2" Property="Visibility" Value="Visible" /> <Setter TargetName="vb" Property="Width" Value="156" /> <Setter TargetName="vb" Property="Height" Value="165" /> <Setter TargetName="txt" Property="HorizontalAlignment" Value="Center" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </CheckBox.Template> </CheckBox> <CheckBox x:Name="btnBlue" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" IsEnabled="{Binding SensorBIsEnable}"> <CheckBox.Template> <ControlTemplate TargetType="{x:Type CheckBox}"> <Viewbox x:Name="vb" Width="104" Height="110"> <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical"> <Grid> <Image x:Name="img" Width="104" Height="94" Source="{Binding SensorBSignalIntensity, Converter={StaticResource signalIntensityImageConverter}, ConverterParameter=7}" /> <Image x:Name="img2" Width="104" Height="94" Source="{Binding SensorASignalIntensity, Converter={StaticResource signalIntensityImageConverter}, ConverterParameter=9}" Visibility="Collapsed" /> </Grid> <TextBlock x:Name="txt" Margin="0" HorizontalAlignment="Left" FontSize="14" Foreground="#8e8e8e" Text="传感器" /> </StackPanel> </Viewbox> <ControlTemplate.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter TargetName="img" Property="Visibility" Value="Collapsed" /> <Setter TargetName="img2" Property="Visibility" Value="Visible" /> <Setter TargetName="vb" Property="Width" Value="156" /> <Setter TargetName="vb" Property="Height" Value="165" /> <Setter TargetName="txt" Property="HorizontalAlignment" Value="Center" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </CheckBox.Template> </CheckBox> <CheckBox x:Name="btnMute" Grid.Column="2" HorizontalAlignment="Center" Content="静音" Style="{StaticResource ChkMuteStyle}" Tag="1" /> <StackPanel Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical" /> </Grid> </Border> </Grid> </Grid> </Grid> </Viewbox> </Grid> </UserControl>