equal
deleted
inserted
replaced
|
1 <ResourceDictionary |
|
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
4 xmlns:s="http://schemas.microsoft.com/surface/2008" |
|
5 xmlns:local="clr-namespace:GestureControl"> |
|
6 |
|
7 <local:DoubleHalfConverter x:Key="DoubleHalfConverter" /> |
|
8 |
|
9 <Style TargetType="{x:Type local:GestureControl}"> |
|
10 <Setter Property="Template"> |
|
11 <Setter.Value> |
|
12 <ControlTemplate TargetType="{x:Type local:GestureControl}"> |
|
13 <Border Background="Transparent" |
|
14 BorderBrush="{TemplateBinding BorderBrush}" |
|
15 Width="{Binding ElementName=CC,Path=ActualWidth}" |
|
16 Height="{Binding ElementName=CC,Path=ActualHeight}"> |
|
17 <!-- BorderThickness="{TemplateBinding BorderThickness}"> --> |
|
18 <Grid> |
|
19 <ContentControl x:Name="CC" BorderBrush="red" BorderThickness="3" Content="{TemplateBinding Content}"></ContentControl> |
|
20 <s:SurfaceInkCanvas Width="{Binding ElementName=CC,Path=ActualWidth,Converter={StaticResource DoubleHalfConverter}}" Height="{Binding ElementName=CC,Path=ActualHeight,Converter={StaticResource DoubleHalfConverter}}" x:Name="InkArea"> |
|
21 <s:SurfaceInkCanvas.DefaultDrawingAttributes > |
|
22 <DrawingAttributes |
|
23 Color = "Blue" Width = "4" /> |
|
24 </s:SurfaceInkCanvas.DefaultDrawingAttributes> |
|
25 </s:SurfaceInkCanvas> |
|
26 <!-- <s:SurfaceTextBox Width="100" Height="50" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Gesture}" /> --> |
|
27 </Grid> |
|
28 </Border> |
|
29 </ControlTemplate> |
|
30 </Setter.Value> |
|
31 </Setter> |
|
32 </Style> |
|
33 </ResourceDictionary> |