<Window x:Class="Correlator.Dialog.SoundSpeedDialog" 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:i="http://schemas.microsoft.com/expression/2010/interactivity" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" Title="SoundSpeedDialog" Width="900" Height="600" AllowsTransparency="True" Background="Transparent" DataContext="{Binding SoundSpeed, Source={StaticResource Locator}}" Loaded="SoundSpeedDialog_OnLoaded" ResizeMode="NoResize" ShowInTaskbar="False" WindowStartupLocation="CenterOwner" WindowStyle="None" mc:Ignorable="d"> <Border Margin="5" Background="White" CornerRadius="10"> <Border.Effect> <DropShadowEffect BlurRadius="5" Direction="0" Opacity="0.5" ShadowDepth="0" Color="Gray" /> </Border.Effect> <Grid Margin="10"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="7*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <Grid Grid.Row="0"> <StackPanel Orientation="Horizontal"> <Button x:Name="GoBackButton" Width="80" Height="40" Margin="10,0"> <StackPanel Orientation="Horizontal"> <Image Width="18" Height="18" Margin="0,0,5,0" Source="/Correlator;component/Image/return_g.png" /> <TextBlock FontSize="14" Foreground="#949494" Text="返回" /> </StackPanel> </Button> <Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <TextBlock VerticalAlignment="Bottom" FontSize="22" Foreground="#6c6c6c" Text="自定义声速编辑" /> <TextBlock Grid.Row="1" VerticalAlignment="Top" FontSize="16" Foreground="#cecece" Text="User - defined list of materials" /> </Grid> </StackPanel> <StackPanel Margin="20,0,0,0" HorizontalAlignment="Right" Orientation="Horizontal"> <Button Width="80" Height="40" Margin="10,0" HorizontalAlignment="Right" Command="{Binding DeleteSpeedCommand}"> <StackPanel Orientation="Horizontal"> <Image Width="18" Height="18" Margin="0,0,5,0" Source="/Correlator;component/Image/tubiao_46.png" /> <TextBlock FontSize="14" Foreground="#595959" Text="删除" /> </StackPanel> </Button> <Button Width="80" Height="40" Margin="10,0" HorizontalAlignment="Right" Command="{Binding AddSpeedCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"> <StackPanel Orientation="Horizontal"> <Image Width="18" Height="18" Margin="0,0,5,0" Source="/Correlator;component/Image/tubiao_49.png" /> <TextBlock FontSize="14" Foreground="#595959" Text="新建" /> </StackPanel> </Button> <Button Width="80" Height="40" Margin="10,0" HorizontalAlignment="Right" Command="{Binding EditSpeedCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"> <StackPanel Orientation="Horizontal"> <Image Width="18" Height="18" Margin="0,0,5,0" Source="/Correlator;component/Image/tubiao_47.png" /> <TextBlock FontSize="14" Foreground="#595959" Text="编辑" /> </StackPanel> </Button> </StackPanel> </Grid> <ListView Grid.Row="1" Margin="10" FontSize="16" ItemsSource="{Binding VelocityCollection}"> <i:Interaction.Triggers> <i:EventTrigger EventName="SelectionChanged"> <i:InvokeCommandAction Command="{Binding ItemSelectedCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=ListView}}" /> </i:EventTrigger> </i:Interaction.Triggers> <ListView.View> <GridView> <GridViewColumn Width="120" DisplayMemberBinding="{Binding Id}" Header="ID" /> <GridViewColumn Width="240" DisplayMemberBinding="{Binding LowDiameter}" Header="最小直径(mm)" /> <GridViewColumn Width="240" DisplayMemberBinding="{Binding HighDiameter}" Header="最大直径(mm)" /> <GridViewColumn DisplayMemberBinding="{Binding Velocity}" Header="声速(m/s)" /> </GridView> </ListView.View> </ListView> <Button Grid.Row="2" Width="120" Height="40" Margin="10,0" HorizontalAlignment="Right" Command="{Binding NextStepCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"> <StackPanel Orientation="Horizontal"> <Image Width="18" Height="18" Margin="0,0,5,0"> <Image.Source> <BitmapImage Rotation="Rotate180" UriSource="/Correlator;component/Image/return_g.png" /> </Image.Source> </Image> <TextBlock FontSize="14" Foreground="#595959" Text="下一步" /> </StackPanel> </Button> </Grid> </Border> </Window>