src/FingersDance.GestureControl/Themes/Generic.xaml
author cavaliet
Wed, 04 Nov 2009 16:28:01 +0100
changeset 186 83615722dbab
parent 174 45c9e55fcf23
child 193 96374d03e714
permissions -rw-r--r--
Debug data management for others panels to redisplay.

<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>