src/FingersDance.GestureControl/Themes/Generic.xaml
author cavaliet
Tue, 24 Nov 2009 22:08:57 +0100
changeset 229 05aba5def1fc
parent 198 37c16056c45b
permissions -rw-r--r--
add an attribute Color to a Cutting, save it in ldt xml file and redisplay it in the pivot's button. Make ColorFactory truly static.

<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  x:Name="InkArea">
                               <!--Width="{Binding ElementName=CC,Path=ActualWidth,Converter={StaticResource DoubleHalfConverter}}" Height="{Binding ElementName=CC,Path=ActualHeight,Converter={StaticResource DoubleHalfConverter}}"-->
                                <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>