1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
<Window x:Class="WpfAppChart.plotChart2D"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Chart2D Coordinate System"
Height="420" Width="360">
<Viewbox Stretch="Uniform">
<StackPanel Height="420" Width="360">
<Canvas x:Name="plotCanvas" ClipToBounds="True"
Width="300" Height="250"
Margin="30,30,30,30">
<Rectangle x:Name="plotArea"
Width="300" Height="250"
Stroke="Black"
StrokeThickness="1"/>
</Canvas>
<Grid Width="340" Height="100"
HorizontalAlignment="Left"
VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" />
<ColumnDefinition Width="110" />
<ColumnDefinition Width="60"/>
<ColumnDefinition Width="110" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Column="0" Grid.Row="0"
Margin="25,5,10,5">XMin</TextBlock>
<TextBox Name="tbXMin" Grid.Column="1"
Grid.Row="0"
TextAlignment="Center">0</TextBox>
<TextBlock Grid.Column="2" Grid.Row="0"
Margin="25,5,10,5">XMax</TextBlock>
<TextBox Name="tbXMax" Grid.Column="3"
Grid.Row="0"
TextAlignment="Center">10</TextBox>
<TextBlock Grid.Column="0" Grid.Row="1"
Margin="25,5,10,5">YMin</TextBlock>
<TextBox Name="tbYMin" Grid.Column="1"
Grid.Row="1"
TextAlignment="Center" >0</TextBox>
<TextBlock Grid.Column="2" Grid.Row="1"
Margin="25,5,10,5">YMax</TextBlock>
<TextBox Name="tbYMax" Grid.Column="3"
Grid.Row="1"
TextAlignment="Center">10</TextBox>
<Button Click="btnApply_Click"
Margin="40,20,20,0"
Height="25" Grid.ColumnSpan="2"
Grid.Column="0" Grid.Row="2">Apply
</Button>
<Button Click="btnClose_Click"
Margin="40,20,20,0"
Height="25" Grid.ColumnSpan="2"
Grid.Column="2" Grid.Row="2">Close
</Button>
</Grid>
</StackPanel>
</Viewbox>
</Window> |
Partager