author | cavaliet |
Thu, 17 Sep 2009 13:06:22 +0200 | |
changeset 74 | 7ce946833eae |
parent 71 | 31900a35e162 |
child 125 | fab494cd9da7 |
child 143 | 9f157d9c725b |
permissions | -rw-r--r-- |
55 | 1 |
using System; |
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Windows; |
|
6 |
using System.Windows.Controls; |
|
7 |
using System.Windows.Data; |
|
8 |
using System.Windows.Documents; |
|
9 |
using System.Windows.Input; |
|
10 |
using System.Windows.Media; |
|
11 |
using System.Windows.Media.Imaging; |
|
12 |
using System.Windows.Navigation; |
|
13 |
using System.Windows.Shapes; |
|
14 |
||
15 |
namespace FingersDance.Views |
|
16 |
{ |
|
17 |
/// <summary> |
|
18 |
/// Interaction logic for TimelineAnnotationView.xaml |
|
19 |
/// </summary> |
|
20 |
public partial class TimelineAnnotationView : UserControl |
|
21 |
{ |
|
22 |
public TimelineAnnotationView() |
|
23 |
{ |
|
24 |
InitializeComponent(); |
|
25 |
} |
|
26 |
} |
|
71 | 27 |
|
28 |
public class ThicknessSingleValueConverter : IValueConverter |
|
29 |
{ |
|
30 |
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) |
|
31 |
{ |
|
32 |
ThicknessConverter myThicknessConverter = new ThicknessConverter(); |
|
33 |
Thickness th1 = (Thickness)myThicknessConverter.ConvertFrom(value); |
|
74
7ce946833eae
First step of data binding where we can add an annotation by clicking on the timeline
cavaliet
parents:
71
diff
changeset
|
34 |
th1.Top = 0; |
7ce946833eae
First step of data binding where we can add an annotation by clicking on the timeline
cavaliet
parents:
71
diff
changeset
|
35 |
th1.Bottom = th1.Right = 0; |
71 | 36 |
return th1; |
37 |
} |
|
38 |
public object ConvertBack(object value, Type targetTypes, object parameter, System.Globalization.CultureInfo culture) |
|
39 |
{ |
|
40 |
Thickness thickness = (Thickness)value; |
|
41 |
return thickness.Left; |
|
42 |
} |
|
43 |
} |
|
55 | 44 |
} |