123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <UserControl x:Class="ProximaAnalizer.Views.Dialog.LinePicker"
- 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:ProximaAnalizer.Views.Dialog"
- mc:Ignorable="d"
-
- d:DesignHeight="450" d:DesignWidth="800">
- <Grid Margin="16">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="auto"/>
- <ColumnDefinition Width="16"/>
- <ColumnDefinition Width="auto"/>
- </Grid.ColumnDefinitions>
- <GroupBox Background="Transparent" BorderBrush="{StaticResource DarkBorderColor}" Header="添加左侧坐标轴">
- <ItemsControl ItemsSource="{Binding LineCollection.LinesSolid}" Margin="8">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Button Width="140" Height="24" Margin="4" Background="Transparent" IsEnabled="{Binding IsEnable}"
- Command="{Binding RelativeSource={RelativeSource AncestorType=local:LinePicker, Mode=FindAncestor}, Path=DataContext.SelectLeftLineCommand}"
- CommandParameter="{Binding}">
- <Line X1="0" Y1="0" X2="100" Y2="0" Margin="8,0" Stretch="Fill" Stroke="{Binding Brush}" StrokeDashArray="{Binding DashArray}" StrokeThickness="3"/>
- </Button>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </GroupBox>
-
- <GroupBox Grid.Column="2" Background="Transparent" BorderBrush="{StaticResource DarkBorderColor}" Header="添加右侧坐标轴">
- <ItemsControl ItemsSource="{Binding LineCollection.LinesDash}" Margin="8">
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <Button Width="140" Height="24" Margin="4" Background="Transparent" IsEnabled="{Binding IsEnable}"
- Command="{Binding RelativeSource={RelativeSource AncestorType=local:LinePicker, Mode=FindAncestor}, Path=DataContext.SelectRightLineCommand}"
- CommandParameter="{Binding}">
- <Line X1="0" Y1="0" X2="100" Y2="0" Margin="8,0" Stretch="Fill" Stroke="{Binding Brush}" StrokeDashArray="{Binding DashArray}" StrokeThickness="3"/>
- </Button>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- </GroupBox>
- </Grid>
- </UserControl>
|