/CBR/CBR/Resources/XAML/Controls/DesignerItem.xaml
XAML | 72 lines | 69 code | 3 blank | 0 comment | 0 complexity | 7fb5e21b8dec771e9ab1d3acd2488b65 MD5 | raw file
- <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:s="clr-namespace:CBR.Components.Designer" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
-
- <ResourceDictionary.MergedDictionaries>
- <ResourceDictionary Source="ResizeChrome.xaml" />
- </ResourceDictionary.MergedDictionaries>
-
- <ControlTemplate x:Key="MoveThumbTemplate"
- TargetType="{x:Type s:MoveThumb}">
- <Rectangle Fill="Transparent" />
- </ControlTemplate>
-
- <Style TargetType="{x:Type s:DesignerItem}">
- <Setter Property="SnapsToDevicePixels"
- Value="true" />
- <Setter Property="Template">
- <Setter.Value>
- <ControlTemplate TargetType="{x:Type s:DesignerItem}">
- <Grid DataContext="{Binding ., RelativeSource={RelativeSource TemplatedParent}}" d:DesignWidth="300" d:DesignHeight="296.5">
- <s:MoveThumb x:Name="PART_MoveThumb"
- Cursor="SizeAll"
- Template="{StaticResource MoveThumbTemplate}" />
- <ContentPresenter x:Name="PART_ContentPresenter" Margin="{TemplateBinding Padding}">
- <ContentPresenter.Content>
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stroke="Black" StrokeThickness="2" Grid.ColumnSpan="2" />
- <Grid Margin="5" ShowGridLines="True">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Rectangle RadiusX="20" RadiusY="20" Fill="#FFD8D8D8" StrokeThickness="4" Stroke="DarkGray" />
- <Grid Margin="10" DataContext="{Binding DataContext}">
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition Width="*"/>
- </Grid.ColumnDefinitions>
- <Rectangle Grid.ColumnSpan="2" Fill="#FFA3A3A3" Stroke="Black" RadiusX="10" RadiusY="10"></Rectangle>
- <Label Grid.ColumnSpan="2">Frame definition</Label>
- <Label Grid.Row="1">Order</Label>
- <TextBox Grid.Row="1" Grid.Column="1" TextWrapping="Wrap" Text="{Binding OrderNum, Mode=TwoWay}" HorizontalAlignment="Stretch" VerticalAlignment="center" />
- <Label Grid.Row="2">Delay (ms)</Label>
- <TextBox Grid.Row="2" Grid.Column="1" TextWrapping="Wrap" Text="{Binding Duration, Mode=TwoWay}" HorizontalAlignment="Stretch" VerticalAlignment="center" />
- </Grid>
- </Grid>
- </Grid>
- </ContentPresenter.Content>
- </ContentPresenter>
- <s:ResizeDecorator x:Name="PART_DesignerItemDecorator" />
- </Grid>
- <ControlTemplate.Triggers>
- <Trigger Property="IsSelected"
- Value="True">
- <Setter TargetName="PART_DesignerItemDecorator"
- Property="ShowDecorator"
- Value="True" />
- </Trigger>
- </ControlTemplate.Triggers>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </ResourceDictionary>