@@ -9,108 +9,108 @@ namespace ICSharpCode.WpfDesign.XamlDom
99 /// <summary>
1010 /// Helper Class for the Design Time Properties used by VS and Blend
1111 /// </summary>
12- public class DesignTimeProperties : FrameworkElement
13- {
14- #region IsHidden
15-
16- public static bool GetIsHidden ( DependencyObject obj )
17- {
18- return ( bool ) obj . GetValue ( IsHiddenProperty ) ;
19- }
20-
21- public static void SetIsHidden ( DependencyObject obj , bool value )
22- {
23- obj . SetValue ( IsHiddenProperty , value ) ;
24- }
25-
26- public static readonly DependencyProperty IsHiddenProperty =
27- DependencyProperty . RegisterAttached ( "IsHidden" , typeof ( bool ) , typeof ( DesignTimeProperties ) ) ;
28-
29- #endregion
30-
31- #region IsLocked
32-
33- public static bool GetIsLocked ( DependencyObject obj )
34- {
35- return ( bool ) obj . GetValue ( IsLockedProperty ) ;
36- }
37-
38- public static void SetIsLocked ( DependencyObject obj , bool value )
39- {
40- obj . SetValue ( IsLockedProperty , value ) ;
41- }
42-
43- public static readonly DependencyProperty IsLockedProperty =
44- DependencyProperty . RegisterAttached ( "IsLocked" , typeof ( bool ) , typeof ( DesignTimeProperties ) ) ;
45-
46- #endregion
47-
48- #region DataContext
49-
50- public static object GetDataContext ( DependencyObject obj )
51- {
52- return ( object ) obj . GetValue ( DataContextProperty ) ;
53- }
54-
55- public static void SetDataContext ( DependencyObject obj , bool value )
56- {
57- obj . SetValue ( DataContextProperty , value ) ;
58- }
59-
60- public static readonly DependencyProperty DataContextProperty =
61- DependencyProperty . RegisterAttached ( "DataContext" , typeof ( object ) , typeof ( DesignTimeProperties ) ) ;
62-
63- #endregion
64-
65- #region DesignSource
66-
67- public static object GetDesignSource ( DependencyObject obj )
68- {
69- return ( object ) obj . GetValue ( DesignSourceProperty ) ;
70- }
71-
72- public static void SetDesignSource ( DependencyObject obj , bool value )
73- {
74- obj . SetValue ( DesignSourceProperty , value ) ;
75- }
76-
77- public static readonly DependencyProperty DesignSourceProperty =
78- DependencyProperty . RegisterAttached ( "DesignSource" , typeof ( object ) , typeof ( DesignTimeProperties ) ) ;
79-
80- #endregion
81-
82- #region DesignWidth
83-
84- public static double GetDesignWidth ( DependencyObject obj )
85- {
86- return ( double ) obj . GetValue ( DesignWidthProperty ) ;
87- }
88-
89- public static void SetDesignWidth ( DependencyObject obj , double value )
90- {
91- obj . SetValue ( DesignWidthProperty , value ) ;
92- }
93-
94- public static readonly DependencyProperty DesignWidthProperty =
95- DependencyProperty . RegisterAttached ( "DesignWidth" , typeof ( double ) , typeof ( DesignTimeProperties ) ) ;
96-
97- #endregion
98-
99- #region DesignHeight
100-
101- public static double GetDesignHeight ( DependencyObject obj )
102- {
103- return ( double ) obj . GetValue ( DesignHeightProperty ) ;
104- }
105-
106- public static void SetDesignHeight ( DependencyObject obj , double value )
107- {
108- obj . SetValue ( DesignHeightProperty , value ) ;
109- }
110-
111- public static readonly DependencyProperty DesignHeightProperty =
112- DependencyProperty . RegisterAttached ( "DesignHeight" , typeof ( double ) , typeof ( DesignTimeProperties ) ) ;
113-
114- #endregion
115- }
12+ public class DesignTimeProperties : FrameworkElement
13+ {
14+ #region IsHidden
15+
16+ public static bool GetIsHidden ( DependencyObject obj )
17+ {
18+ return ( bool ) obj . GetValue ( IsHiddenProperty ) ;
19+ }
20+
21+ public static void SetIsHidden ( DependencyObject obj , bool value )
22+ {
23+ obj . SetValue ( IsHiddenProperty , value ) ;
24+ }
25+
26+ public static readonly DependencyProperty IsHiddenProperty =
27+ DependencyProperty . RegisterAttached ( "IsHidden" , typeof ( bool ) , typeof ( DesignTimeProperties ) ) ;
28+
29+ #endregion
30+
31+ #region IsLocked
32+
33+ public static bool GetIsLocked ( DependencyObject obj )
34+ {
35+ return ( bool ) obj . GetValue ( IsLockedProperty ) ;
36+ }
37+
38+ public static void SetIsLocked ( DependencyObject obj , bool value )
39+ {
40+ obj . SetValue ( IsLockedProperty , value ) ;
41+ }
42+
43+ public static readonly DependencyProperty IsLockedProperty =
44+ DependencyProperty . RegisterAttached ( "IsLocked" , typeof ( bool ) , typeof ( DesignTimeProperties ) ) ;
45+
46+ #endregion
47+
48+ #region DataContext
49+
50+ public static object GetDataContext ( DependencyObject obj )
51+ {
52+ return ( object ) obj . GetValue ( DataContextProperty ) ;
53+ }
54+
55+ public static void SetDataContext ( DependencyObject obj , bool value )
56+ {
57+ obj . SetValue ( DataContextProperty , value ) ;
58+ }
59+
60+ public static readonly DependencyProperty DataContextProperty =
61+ DependencyProperty . RegisterAttached ( "DataContext" , typeof ( object ) , typeof ( DesignTimeProperties ) ) ;
62+
63+ #endregion
64+
65+ #region DesignSource
66+
67+ public static object GetDesignSource ( DependencyObject obj )
68+ {
69+ return ( object ) obj . GetValue ( DesignSourceProperty ) ;
70+ }
71+
72+ public static void SetDesignSource ( DependencyObject obj , bool value )
73+ {
74+ obj . SetValue ( DesignSourceProperty , value ) ;
75+ }
76+
77+ public static readonly DependencyProperty DesignSourceProperty =
78+ DependencyProperty . RegisterAttached ( "DesignSource" , typeof ( object ) , typeof ( DesignTimeProperties ) ) ;
79+
80+ #endregion
81+
82+ #region DesignWidth
83+
84+ public static double GetDesignWidth ( DependencyObject obj )
85+ {
86+ return ( double ) obj . GetValue ( DesignWidthProperty ) ;
87+ }
88+
89+ public static void SetDesignWidth ( DependencyObject obj , double value )
90+ {
91+ obj . SetValue ( DesignWidthProperty , value ) ;
92+ }
93+
94+ public static readonly DependencyProperty DesignWidthProperty =
95+ DependencyProperty . RegisterAttached ( "DesignWidth" , typeof ( double ) , typeof ( DesignTimeProperties ) ) ;
96+
97+ #endregion
98+
99+ #region DesignHeight
100+
101+ public static double GetDesignHeight ( DependencyObject obj )
102+ {
103+ return ( double ) obj . GetValue ( DesignHeightProperty ) ;
104+ }
105+
106+ public static void SetDesignHeight ( DependencyObject obj , double value )
107+ {
108+ obj . SetValue ( DesignHeightProperty , value ) ;
109+ }
110+
111+ public static readonly DependencyProperty DesignHeightProperty =
112+ DependencyProperty . RegisterAttached ( "DesignHeight" , typeof ( double ) , typeof ( DesignTimeProperties ) ) ;
113+
114+ #endregion
115+ }
116116}
0 commit comments