# HG changeset patch # User cavaliet # Date 1253122346 -7200 # Node ID 31900a35e162f74c22f23935085be9c663a4e8b9 # Parent 4a2f4b9e971ae9a4144749e31045f0dc7e2c914a We can set a margin to an annotation. diff -r 4a2f4b9e971a -r 31900a35e162 src/FingersDance.Views/TimelineAnnotationView.xaml --- a/src/FingersDance.Views/TimelineAnnotationView.xaml Wed Sep 16 17:46:19 2009 +0200 +++ b/src/FingersDance.Views/TimelineAnnotationView.xaml Wed Sep 16 19:32:26 2009 +0200 @@ -6,9 +6,13 @@ xmlns:Custom="http://schemas.microsoft.com/surface/2008" mc:Ignorable="d" x:Class="FingersDance.Views.TimelineAnnotationView" + xmlns:vw="clr-namespace:FingersDance.Views" x:Name="UserControl" d:DesignWidth="640" d:DesignHeight="480"> - + + + + diff -r 4a2f4b9e971a -r 31900a35e162 src/FingersDance.Views/TimelineAnnotationView.xaml.cs --- a/src/FingersDance.Views/TimelineAnnotationView.xaml.cs Wed Sep 16 17:46:19 2009 +0200 +++ b/src/FingersDance.Views/TimelineAnnotationView.xaml.cs Wed Sep 16 19:32:26 2009 +0200 @@ -24,4 +24,20 @@ InitializeComponent(); } } + + public class ThicknessSingleValueConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) + { + ThicknessConverter myThicknessConverter = new ThicknessConverter(); + Thickness th1 = (Thickness)myThicknessConverter.ConvertFrom(value); + th1.Top = th1.Top; + return th1; + } + public object ConvertBack(object value, Type targetTypes, object parameter, System.Globalization.CultureInfo culture) + { + Thickness thickness = (Thickness)value; + return thickness.Left; + } + } }