|
<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>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
WPF and MVVM fan, I practice C # in all its forms from the beginning of the NET Framework without mentioning C ++ / MFC and other software packages such as databases, ASP, WCF, Web & Windows services, Application, and now Core and UWP.
In my wasted hours, I am guilty of having fathered C.B.R. and its cousins C.B.R. for WinRT and UWP on the Windows store.
But apart from that, I am a great handyman ... the house, a rocket stove to heat the jacuzzi and the last one: a wood oven for pizza, bread, and everything that goes inside
https://guillaumewaser.wordpress.com/
https://fouretcompagnie.wordpress.com/