PrimitiveProps editing via context menu was added

This commit is contained in:
Evgeny Redikultsev
2023-02-27 08:34:51 +05:00
parent 8fecfb931f
commit b29d7bfd58
37 changed files with 578 additions and 91 deletions

View File

@@ -14,11 +14,12 @@ namespace StructureHelper.Infrastructure.UI.DataContexts
{
ICirclePrimitive primitive;
public double Diameter
{ get
{
get
{
return primitive.Diameter;
}
set
set
{
primitive.Diameter = value;
RefreshPlacement();

View File

@@ -7,7 +7,6 @@
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:mouseEventTriggers="clr-namespace:StructureHelper.Infrastructure.UI.Triggers.MouseEventTriggers"
xmlns:dataContexts="clr-namespace:StructureHelper.Infrastructure.UI.DataContexts"
xmlns:userControls="clr-namespace:StructureHelper.Infrastructure.UI.UserControls"
mc:Ignorable="d">
<StackPanel>
<Ellipse Style="{StaticResource EllipseStyle}" d:DataContext="{d:DesignInstance dataContexts:PointViewPrimitive}" Tag ="{Binding}">

View File

@@ -7,7 +7,6 @@
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
xmlns:infrastructure="clr-namespace:StructureHelper.Infrastructure"
xmlns:mouseEventTriggers="clr-namespace:StructureHelper.Infrastructure.UI.Triggers.MouseEventTriggers"
xmlns:userControls="clr-namespace:StructureHelper.Infrastructure.UI.UserControls"
xmlns:dataContexts="clr-namespace:StructureHelper.Infrastructure.UI.DataContexts"
mc:Ignorable="d"
d:DataContext="{d:DesignInstance dataContexts:RectangleViewPrimitive}">

View File

@@ -18,4 +18,19 @@
<TextBox Grid.Row="1" Grid.Column="1" Margin="1" Text="{Binding Height, Converter={StaticResource LengthConverter}, ValidatesOnDataErrors=True}"/>
</Grid>
</DataTemplate>
<DataTemplate x:Key="CircleShapeEdit">
<DataTemplate.Resources>
</DataTemplate.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="22"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Text="Diameter"/>
<TextBox Grid.Row="0" Grid.Column="1" Margin="1" Style="{StaticResource ValidatedError}" Text="{Binding Diameter, Converter={StaticResource LengthConverter}, ValidatesOnDataErrors=True}"/>
</Grid>
</DataTemplate>
</ResourceDictionary>