-
Notifications
You must be signed in to change notification settings - Fork 0
/
Mark.cs
30 lines (26 loc) · 949 Bytes
/
Mark.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System.Windows;
namespace MediaMarkInImage
{
class Mark : DependencyObject
{
public static string GetMark(DependencyObject obj)
{
return (string)obj.GetValue(Mediapath);
}
public static void SetMark(DependencyObject obj, string value)
{
obj.SetValue(Mediapath, value);
}
public static readonly DependencyProperty Mediapath =
DependencyProperty.RegisterAttached("Mediapath", typeof(string), typeof(Mark), new PropertyMetadata("", OnMarkChanged));
private static void OnMarkChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
{
var element = obj as UIElement;
if (element != null)
{
//element.RenderTransformOrigin = new Point(0.5, 0.5);
//element.RenderTransform = new RotateTransform((double)e.NewValue);
}
}
}
}