49 lines
3.4 KiB
XML
49 lines
3.4 KiB
XML
<UserControl x:Class="StructureHelper.Infrastructure.UI.DataTemplates.RectangleTemplate"
|
|
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:StructureHelper"
|
|
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:Rectangle}">
|
|
<StackPanel>
|
|
<Grid>
|
|
<Rectangle Style="{StaticResource RectangleStyle}">
|
|
<i:Interaction.Triggers>
|
|
<!--<i:EventTrigger EventName="PreviewMouseDown">
|
|
<i:InvokeCommandAction Command="{Binding PrimitiveLeftButtonDown}" CommandParameter="{Binding}"/>
|
|
</i:EventTrigger>
|
|
<i:EventTrigger EventName="PreviewMouseUp">
|
|
<i:InvokeCommandAction Command="{Binding PrimitiveLeftButtonUp}" CommandParameter="{Binding}"/>
|
|
</i:EventTrigger>
|
|
<i:EventTrigger EventName="PreviewMouseMove">
|
|
<i:InvokeCommandAction Command="{Binding PreviewMouseMove}" CommandParameter="{Binding}"/>
|
|
</i:EventTrigger>-->
|
|
<!--<mouseEventTriggers:DoubleClickEventTrigger EventName="MouseDown">
|
|
<i:InvokeCommandAction Command="{Binding PrimitiveDoubleClick}" CommandParameter="{Binding}"/>
|
|
</mouseEventTriggers:DoubleClickEventTrigger>-->
|
|
</i:Interaction.Triggers>
|
|
</Rectangle>
|
|
<Rectangle Cursor="SizeNWSE" Fill="{Binding Brush}" VerticalAlignment="Bottom" HorizontalAlignment="Right">
|
|
<i:Interaction.Triggers>
|
|
<i:EventTrigger EventName="PreviewMouseDown">
|
|
<i:InvokeCommandAction Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.LeftButtonDown}" CommandParameter="{Binding}"/>
|
|
</i:EventTrigger>
|
|
<i:EventTrigger EventName="PreviewMouseUp">
|
|
<i:InvokeCommandAction Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.LeftButtonUp}" CommandParameter="{Binding}"/>
|
|
</i:EventTrigger>
|
|
<i:EventTrigger EventName="PreviewMouseMove">
|
|
<i:InvokeCommandAction Command="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.PreviewMouseMove}" CommandParameter="{Binding}"/>
|
|
</i:EventTrigger>
|
|
</i:Interaction.Triggers>
|
|
</Rectangle>
|
|
</Grid>
|
|
<userControls:PrimitivePopup IsOpen="{Binding ParamsPanelVisibilty}"/>
|
|
</StackPanel>
|
|
</UserControl>
|