src/FingersDance.Views/TimelineAnnotationView.xaml
author cavaliet
Thu, 22 Oct 2009 14:48:43 +0200
changeset 167 206f07a8d887
parent 166 33c2e634df13
child 225 b60e13ed75c8
permissions -rw-r--r--
Annotation's scale is now still visually at one, whatever the timeline's scale.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     1
<UserControl
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     2
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     3
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     4
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     5
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     6
	xmlns:Custom="http://schemas.microsoft.com/surface/2008"
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     7
	mc:Ignorable="d"
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
     8
	x:Class="FingersDance.Views.TimelineAnnotationView"
71
31900a35e162 We can set a margin to an annotation.
cavaliet
parents: 70
diff changeset
     9
    xmlns:vw="clr-namespace:FingersDance.Views"
167
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    10
	x:Name="myTAV"
166
33c2e634df13 update drag and drop for dragged annotation to be well displayed and avoid DnD problems
cavaliet
parents: 150
diff changeset
    11
	d:DesignWidth="640" d:DesignHeight="480" Width="850" Height="40">
71
31900a35e162 We can set a margin to an annotation.
cavaliet
parents: 70
diff changeset
    12
    <UserControl.Resources>
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 74
diff changeset
    13
        <vw:ThicknessSingleValueConverter x:Name="myThicknessSingleValueConverter" x:Key="myThicknessSingleValueConverter"/>
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 74
diff changeset
    14
        <vw:VisibilityConverter x:Name="myVisibilityConverter" x:Key="myVisibilityConverter"/>
150
569925b65604 Annotations are now colored with the same color as the pivot's button
cavaliet
parents: 146
diff changeset
    15
        <vw:ColorConverter x:Name="myColorConverter" x:Key="myColorConverter"/>
71
31900a35e162 We can set a margin to an annotation.
cavaliet
parents: 70
diff changeset
    16
    </UserControl.Resources>
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 74
diff changeset
    17
    <Custom:SurfaceUserControl x:Name="LayoutRoot" Margin="{Binding Path=MarginLeft, Converter={StaticResource myThicknessSingleValueConverter}}"
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 74
diff changeset
    18
                               >
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 74
diff changeset
    19
        <Grid>
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 74
diff changeset
    20
            <Rectangle Fill="Black" HorizontalAlignment="Left" VerticalAlignment="Top" Width="{Binding Path=Dur}" Height="40" Opacity="0.0"/>
167
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    21
            <TextBox HorizontalAlignment="Left" Text="{Binding Path=GestureType}" Width="40" Margin="0,20,0,0" Visibility="{Binding Path=Dur, Converter={StaticResource myVisibilityConverter}}">
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    22
                <TextBox.RenderTransform>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    23
                    <ScaleTransform ScaleX="{Binding Path=ScaleX}"/>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    24
                </TextBox.RenderTransform>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    25
            </TextBox>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    26
            <Ellipse Stroke="{Binding Path=Color, Converter={StaticResource myColorConverter}}" Fill="{x:Null}" Margin="-3,16,0,0" Height="8" VerticalAlignment="Top"
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    27
                     HorizontalAlignment="Left" Width="8" RenderTransformOrigin="0.5,0.5">
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    28
                <Ellipse.RenderTransform>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    29
                    <ScaleTransform ScaleX="{Binding Path=ScaleX}"/>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    30
                </Ellipse.RenderTransform>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    31
            </Ellipse>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    32
            <Ellipse Fill="{Binding Path=Color, Converter={StaticResource myColorConverter}}" Margin="-2,17,0,0" Height="6" VerticalAlignment="Top" HorizontalAlignment="Left"
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    33
                     Width="6" Visibility="{Binding Path=Dur, Converter={StaticResource myVisibilityConverter}}" RenderTransformOrigin="0.5,0.5" >
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    34
                <Ellipse.RenderTransform>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    35
                    <ScaleTransform ScaleX="{Binding Path=ScaleX}"/>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    36
                </Ellipse.RenderTransform>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    37
            </Ellipse>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    38
            <Rectangle Fill="{Binding Path=Color, Converter={StaticResource myColorConverter}}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="2" Height="17"
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    39
                       RenderTransformOrigin="0.5,0.5">
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    40
                <Rectangle.RenderTransform>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    41
                    <ScaleTransform ScaleX="{Binding Path=ScaleX}"/>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    42
                </Rectangle.RenderTransform>
206f07a8d887 Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents: 166
diff changeset
    43
            </Rectangle>
150
569925b65604 Annotations are now colored with the same color as the pivot's button
cavaliet
parents: 146
diff changeset
    44
            <Rectangle Fill="{Binding Path=Color, Converter={StaticResource myColorConverter}}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="{Binding Path=Dur}" Height="2"/>
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 74
diff changeset
    45
        </Grid>
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 74
diff changeset
    46
    </Custom:SurfaceUserControl>
55
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
    47
</UserControl>