Update MainView.axaml
This commit is contained in:
Родитель
0ef56743bd
Коммит
889d867d29
|
@ -5,31 +5,34 @@
|
||||||
xmlns:controls="clr-namespace:ReactiveHistorySample.Controls"
|
xmlns:controls="clr-namespace:ReactiveHistorySample.Controls"
|
||||||
xmlns:views="clr-namespace:ReactiveHistorySample.Views"
|
xmlns:views="clr-namespace:ReactiveHistorySample.Views"
|
||||||
xmlns:vm="clr-namespace:ReactiveHistorySample.ViewModels"
|
xmlns:vm="clr-namespace:ReactiveHistorySample.ViewModels"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="1100" d:DesignHeight="450"
|
||||||
x:Class="ReactiveHistorySample.Views.MainView">
|
x:Class="ReactiveHistorySample.Views.MainView">
|
||||||
<UserControl.DataTemplates>
|
<UserControl.DataTemplates>
|
||||||
<DataTemplate DataType="vm:PointShapeViewModel">
|
<DataTemplate DataType="vm:PointShapeViewModel">
|
||||||
<views:PointShapeView/>
|
<views:PointShapeView />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
<DataTemplate DataType="vm:LineShapeViewModel">
|
<DataTemplate DataType="vm:LineShapeViewModel">
|
||||||
<views:LineShapeView/>
|
<views:LineShapeView />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</UserControl.DataTemplates>
|
</UserControl.DataTemplates>
|
||||||
<Grid Margin="4" ColumnDefinitions="150,150,*" RowDefinitions="Auto,*">
|
<Grid Margin="4" ColumnDefinitions="180,200,*" RowDefinitions="Auto,*">
|
||||||
<Grid Grid.Column="0" Grid.Row="0" ColumnDefinitions="*,*,*">
|
<Grid Grid.Column="0" Grid.Row="0" ColumnDefinitions="*,*,*">
|
||||||
<Button Grid.Column="0" Content="Undo" Command="{Binding UndoCommand}"/>
|
<Button Grid.Column="0" Content="Undo" Command="{Binding UndoCommand}" />
|
||||||
<Button Grid.Column="1" Content="Clear" Command="{Binding ClearCommand}"/>
|
<Button Grid.Column="1" Content="Clear" Command="{Binding ClearCommand}" />
|
||||||
<Button Grid.Column="2" Content="Redo" Command="{Binding RedoCommand}"/>
|
<Button Grid.Column="2" Content="Redo" Command="{Binding RedoCommand}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
<ListBox Grid.Column="0" Grid.Row="1" Name="shapes" Items="{Binding Shapes}">
|
<ListBox Grid.Column="0" Grid.Row="1" Name="shapes" Items="{Binding Shapes}">
|
||||||
<ListBox.DataTemplates>
|
<ListBox.DataTemplates>
|
||||||
<DataTemplate DataType="vm:LineShapeViewModel">
|
<DataTemplate DataType="vm:LineShapeViewModel">
|
||||||
<TextBlock Text="{Binding Name.Value}"/>
|
<TextBlock Text="{Binding Name.Value}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.DataTemplates>
|
</ListBox.DataTemplates>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
<ContentControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Content="{Binding #shapes.SelectedItem, Mode=OneWay}" HorizontalContentAlignment="Stretch"/>
|
<ContentControl Grid.Column="1" Grid.Row="0" Grid.RowSpan="2"
|
||||||
<controls:LayerCanvas Grid.Column="2" Grid.Row="0" Grid.RowSpan="2" Name="layerCanvas" Background="LightGray" Width="600" Height="500"/>
|
Content="{Binding #shapes.SelectedItem, Mode=OneWay}"
|
||||||
|
HorizontalContentAlignment="Stretch" />
|
||||||
|
<controls:LayerCanvas Grid.Column="2" Grid.Row="0" Grid.RowSpan="2"
|
||||||
|
Name="layerCanvas" Background="LightGray"
|
||||||
|
Width="600" Height="500" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче