src/FingersDance.GestureControl/Themes/Generic.xaml
changeset 174 45c9e55fcf23
child 193 96374d03e714
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/FingersDance.GestureControl/Themes/Generic.xaml	Mon Oct 26 09:27:23 2009 +0100
@@ -0,0 +1,33 @@
+<ResourceDictionary
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:s="http://schemas.microsoft.com/surface/2008"
+    xmlns:local="clr-namespace:GestureControl">
+    
+    <local:DoubleHalfConverter x:Key="DoubleHalfConverter" />
+    
+    <Style TargetType="{x:Type local:GestureControl}">
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type local:GestureControl}">
+                    <Border Background="Transparent"
+                            BorderBrush="{TemplateBinding BorderBrush}"
+                            Width="{Binding ElementName=CC,Path=ActualWidth}"
+                            Height="{Binding ElementName=CC,Path=ActualHeight}">
+                            <!-- BorderThickness="{TemplateBinding BorderThickness}">  -->
+                        <Grid>
+                            <ContentControl x:Name="CC" BorderBrush="red" BorderThickness="3" Content="{TemplateBinding Content}"></ContentControl>
+                           <s:SurfaceInkCanvas Width="{Binding ElementName=CC,Path=ActualWidth,Converter={StaticResource DoubleHalfConverter}}" Height="{Binding ElementName=CC,Path=ActualHeight,Converter={StaticResource DoubleHalfConverter}}" x:Name="InkArea">
+                                <s:SurfaceInkCanvas.DefaultDrawingAttributes >
+                                    <DrawingAttributes 
+                                    Color = "Blue" Width = "4" />
+                                </s:SurfaceInkCanvas.DefaultDrawingAttributes>
+                            </s:SurfaceInkCanvas>
+                            <!-- <s:SurfaceTextBox Width="100" Height="50" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Gesture}" /> -->
+                        </Grid>
+                    </Border>  
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+</ResourceDictionary>