author | cavaliet |
Mon, 23 Nov 2009 15:21:17 +0100 | |
changeset 217 | 6cfd723a1378 |
parent 167 | 206f07a8d887 |
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.Media; |
|
10 |
using System.Windows.Media.Imaging; |
|
11 |
using System.Windows.Navigation; |
|
12 |
using System.Windows.Shapes; |
|
13 |
||
143 | 14 |
using FingersDance.Data; |
15 |
using FingersDance.ViewModels; |
|
16 |
using FingersDance.Views; |
|
17 |
||
55 | 18 |
namespace FingersDance.Views |
19 |
{ |
|
20 |
/// <summary> |
|
21 |
/// Interaction logic for TimelineView.xaml |
|
22 |
/// </summary> |
|
23 |
public partial class TimelineView : UserControl |
|
24 |
{ |
|
143 | 25 |
|
55 | 26 |
public TimelineView() |
27 |
{ |
|
28 |
InitializeComponent(); |
|
29 |
} |
|
143 | 30 |
|
167
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
31 |
public Double ScaleX |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
32 |
{ |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
33 |
get { return ((ScaleTransform)listview.RenderTransform).ScaleX; } |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
34 |
set{ |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
35 |
// We set the scale to the list view |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
36 |
listview.RenderTransform = new ScaleTransform(value, 1); |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
37 |
// We inform each annotation that scale has been changed |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
38 |
foreach (AnnotationViewModel a in listview.Items) |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
39 |
{ |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
40 |
//Console.WriteLine("a = " + a); |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
41 |
a.ScaleX = 1 / value; |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
42 |
} |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
43 |
} |
206f07a8d887
Annotation's scale is now still visually at one, whatever the timeline's scale.
cavaliet
parents:
150
diff
changeset
|
44 |
} |
143 | 45 |
|
55 | 46 |
} |
47 |
} |