<Window x:Class="Flyad7_WPF.WdConvolution" 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:Flyad7_WPF" xmlns:Chr="clr-namespace:System.Windows.Forms.DataVisualization.Charting;assembly=System.Windows.Forms.DataVisualization" mc:Ignorable="d" d:DataContext="{d:DesignInstance local:WdConvolutionVm}" Title="WdConvolution" Height="450" Width="800"> <Window.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="WdConvolutionStyle.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Window.Resources> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="auto"/> <ColumnDefinition/> </Grid.ColumnDefinitions> <StackPanel Orientation="Horizontal"> <StackPanel Margin="5"> <TextBlock Style="{StaticResource TextBlockStyle_title}" > R=<Run Text="{Binding R,StringFormat={}{0:F4}}"/> <LineBreak/> </TextBlock> <GroupBox Header="支架"> <StackPanel> <Button Style="{StaticResource ButtonStyle_normal}" Content="创建支架" Command="{Binding CreateHolderCmd}"/> <StackPanel Orientation="Horizontal"> <TextBlock Style="{StaticResource TextBlockStyle_title}" Text="支架宽度(mm)"/> <TextBox Style="{StaticResource TextBoxStyle_input}" Text="{Binding HolderWidth}"/> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock Style="{StaticResource TextBlockStyle_title}" Text="mm/脉冲"/> <TextBox Style="{StaticResource TextBoxStyle_input}" Text="{Binding Mmpp}"/> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock Style="{StaticResource TextBlockStyle_title}" Text="支架中心(grid)"/> <TextBox Style="{StaticResource TextBoxStyle_input}" Text="{Binding HolderMidGrid}"/> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock Style="{StaticResource TextBlockStyle_title}" Text="空气AD"/> <TextBox Style="{StaticResource TextBoxStyle_input}" Text="{Binding AirAd}"/> </StackPanel> <TextBlock Style="{StaticResource TextBlockStyle_title}"> HolderR=<Run Text="{Binding HolderR,StringFormat={}{0:F6}}"/> </TextBlock> </StackPanel> </GroupBox> <GroupBox Header="卷积计算"> <StackPanel> <Button Style="{StaticResource ButtonStyle_normal}" Content="卷积计算" Command="{Binding UpdateConvCmd}"/> <Button Style="{StaticResource ButtonStyle_normal}" Content="计算卷积核" Command="{Binding CalConvCmd}"/> <Button Style="{StaticResource ButtonStyle_normal}" Content="计算卷积核2" Command="{Binding CalConv2Cmd}"/> <StackPanel Orientation="Horizontal"> <TextBlock Style="{StaticResource TextBlockStyle_title}" Text="卷积核长度(grid)"/> <TextBox Style="{StaticResource TextBoxStyle_input}" Text="{Binding CoreLen}"/> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock Style="{StaticResource TextBlockStyle_title}" Text="支架开始(grid)"/> <TextBox Style="{StaticResource TextBoxStyle_input}" Text="{Binding HolderBeginGrid}"/> </StackPanel> <StackPanel Orientation="Horizontal"> <TextBlock Style="{StaticResource TextBlockStyle_title}" Text="支架结束(grid)"/> <TextBox Style="{StaticResource TextBoxStyle_input}" Text="{Binding HolderEndGrid}"/> </StackPanel> <TextBlock Style="{StaticResource TextBlockStyle_title}"> HolderLenGrid=<Run Text="{Binding HolderLenGrid,Mode=OneWay}"/> </TextBlock> </StackPanel> </GroupBox> </StackPanel> <DataGrid AutoGenerateColumns="False" ItemsSource="{Binding ConvCore}" MinWidth="100" TextBlock.FontSize="18" TextBlock.FontWeight="Normal"> <DataGrid.Columns> <DataGridTextColumn Header="Value" Binding="{Binding Value}" Width="100"/> </DataGrid.Columns> </DataGrid> </StackPanel> <Grid Grid.Column="1"> <Grid.RowDefinitions> <RowDefinition/> <RowDefinition/> <RowDefinition/> </Grid.RowDefinitions> <WindowsFormsHost Grid.Row="0"> <Chr:Chart x:Name="chart0" /> </WindowsFormsHost> <WindowsFormsHost Grid.Row="1"> <Chr:Chart x:Name="chart1" /> </WindowsFormsHost> <WindowsFormsHost Grid.Row="2"> <Chr:Chart x:Name="chart2" /> </WindowsFormsHost> </Grid> </Grid> </Window>