src/FingersDance.Views/TimelineAnnotationView.xaml
author cavaliet
Fri, 09 Oct 2009 11:33:35 +0200
changeset 136 8b513df1b446
parent 129 1f37ef03ebee
child 146 dd8ed4d3beb6
permissions -rw-r--r--
First step of deleting annotations from timeline by drag and drop
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"
55
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
    10
	x:Name="UserControl"
128
90c29e979ef4 Drag and drop of annotations from timeline, first step
cavaliet
parents: 126
diff changeset
    11
	d:DesignWidth="640" d:DesignHeight="480" Width="300" Height="40">
71
31900a35e162 We can set a margin to an annotation.
cavaliet
parents: 70
diff changeset
    12
    <UserControl.Resources>
125
fab494cd9da7 Now to define an annotation we define its begin then its end.
cavaliet
parents: 74
diff changeset
    13
        <vw:ThicknessSingleValueConverter x:Name="myThicknessSingleValueConverter" x:Key="myThicknessSingleValueConverter"/>
fab494cd9da7 Now to define an annotation we define its begin then its end.
cavaliet
parents: 74
diff changeset
    14
        <vw:VisibilityConverter x:Name="myVisibilityConverter" x:Key="myVisibilityConverter"/>
71
31900a35e162 We can set a margin to an annotation.
cavaliet
parents: 70
diff changeset
    15
    </UserControl.Resources>
129
1f37ef03ebee scale change improved and now annotations can not recover any of them.
cavaliet
parents: 128
diff changeset
    16
    <Custom:SurfaceUserControl x:Name="LayoutRoot" Margin="{Binding Path=MarginLeft, Converter={StaticResource myThicknessSingleValueConverter}}"
128
90c29e979ef4 Drag and drop of annotations from timeline, first step
cavaliet
parents: 126
diff changeset
    17
                               >
125
fab494cd9da7 Now to define an annotation we define its begin then its end.
cavaliet
parents: 74
diff changeset
    18
        <Grid>
128
90c29e979ef4 Drag and drop of annotations from timeline, first step
cavaliet
parents: 126
diff changeset
    19
            <Rectangle Fill="Black" HorizontalAlignment="Left" VerticalAlignment="Top" Width="{Binding Path=Dur}" Height="40" Opacity="0.0"/>
125
fab494cd9da7 Now to define an annotation we define its begin then its end.
cavaliet
parents: 74
diff changeset
    20
            <TextBox HorizontalAlignment="Left" Text="{Binding Path=GestureType}" Width="40" Margin="0,20,0,0" Visibility="{Binding Path=Dur, Converter={StaticResource myVisibilityConverter}}"/>
126
5561c6ab9bb2 Annotation's horizontal stroke closer to the timeline.
cavaliet
parents: 125
diff changeset
    21
            <Ellipse Stroke="Green" Fill="{x:Null}" Margin="-3,16,0,0" Height="8" VerticalAlignment="Top" HorizontalAlignment="Left" Width="8"/>
5561c6ab9bb2 Annotation's horizontal stroke closer to the timeline.
cavaliet
parents: 125
diff changeset
    22
            <Ellipse Fill="Green" Margin="-2,17,0,0" Height="6" VerticalAlignment="Top" HorizontalAlignment="Left" Width="6" Visibility="{Binding Path=Dur, Converter={StaticResource myVisibilityConverter}}" />
5561c6ab9bb2 Annotation's horizontal stroke closer to the timeline.
cavaliet
parents: 125
diff changeset
    23
            <Rectangle Fill="Green" HorizontalAlignment="Left" VerticalAlignment="Top" Width="2" Height="17"/>
5561c6ab9bb2 Annotation's horizontal stroke closer to the timeline.
cavaliet
parents: 125
diff changeset
    24
            <Rectangle Fill="Green" HorizontalAlignment="Left" VerticalAlignment="Top" Width="{Binding Path=Dur}" Height="2"/>
125
fab494cd9da7 Now to define an annotation we define its begin then its end.
cavaliet
parents: 74
diff changeset
    25
        </Grid>
fab494cd9da7 Now to define an annotation we define its begin then its end.
cavaliet
parents: 74
diff changeset
    26
    </Custom:SurfaceUserControl>
55
1ec0ef228158 data, viewmodel and view added
cavaliet
parents:
diff changeset
    27
</UserControl>