@@ -30,18 +30,110 @@ public static TTarget FrameNavigatorExtensions_NavigatorInstance<TTarget>(this T
30
30
}
31
31
}
32
32
33
- namespace CSharpMarkup . WinUI . Uno . Extensions . Navigation // Navigation
33
+ namespace CSharpMarkup . WinUI . Uno . Extensions . Navigation // FrameView
34
34
{
35
- public static partial class NavigationExtensions
35
+ public static partial class Helpers
36
36
{
37
- /// <summary>Set <see cref="UnoExtensionsNavigation.UI.Navigation.Request"/></summary>
38
- public static TTarget Navigation_Request < TTarget > ( this TTarget target , string value ) where TTarget : FrameworkElement
39
- { UnoExtensionsNavigation . UI . Navigation . SetRequest ( target . UI , value ) ; return target ; }
37
+ /// <summary>Create a <see cref="UnoExtensionsNavigation.UI.Controls.FrameView"/></summary>
38
+ public static FrameView FrameView ( UIObject Content )
39
+ {
40
+ var ui = new UnoExtensionsNavigation . UI . Controls . FrameView ( ) ;
41
+ if ( Content != null ) ui . Content = Content . UI ;
42
+ return CSharpMarkup . WinUI . Uno . Extensions . Navigation . FrameView . StartChain ( ui ) ;
43
+ }
40
44
41
- /// <summary>Bind (or set enum value of) <see cref="UnoExtensionsNavigation.UI.Navigation.Request"/></summary>
42
- public static DependencyProperty < TTarget , string > Navigation_Request < TTarget > ( this TTarget target ) where TTarget : FrameworkElement
43
- => DependencyProperty < TTarget , string > . Get ( target , UnoExtensionsNavigation . UI . Navigation . RequestProperty ) ;
45
+ /// <summary>Create a <see cref="UnoExtensionsNavigation.UI.Controls.FrameView"/></summary>
46
+ public static FrameView FrameView ( )
47
+ {
48
+ var ui = new UnoExtensionsNavigation . UI . Controls . FrameView ( ) ;
49
+ return CSharpMarkup . WinUI . Uno . Extensions . Navigation . FrameView . StartChain ( ui ) ;
50
+ }
51
+ }
52
+
53
+ public partial class FrameView : UserControl , IUI < UnoExtensionsNavigation . UI . Controls . FrameView >
54
+ {
55
+ static FrameView instance ;
56
+
57
+ internal static FrameView StartChain ( UnoExtensionsNavigation . UI . Controls . FrameView ui )
58
+ {
59
+ if ( instance == null ) instance = new FrameView ( ) ;
60
+ instance . UI = ui ;
61
+ return instance ;
62
+ }
63
+
64
+ UnoExtensionsNavigation . UI . Controls . FrameView ui ;
65
+
66
+ public new UnoExtensionsNavigation . UI . Controls . FrameView UI
67
+ {
68
+ get => ui ;
69
+ protected set => base . UI = ui = value ;
70
+ }
71
+
72
+ public static implicit operator Xaml . UIElement ( FrameView view ) => view ? . UI ;
73
+
74
+ public static implicit operator UnoExtensionsNavigation . UI . Controls . FrameView ( FrameView view ) => view ? . UI ;
75
+
76
+ public static implicit operator FrameView ( UnoExtensionsNavigation . UI . Controls . FrameView ui ) => FrameView . StartChain ( ui ) ;
77
+
78
+ public FrameView Invoke ( Action < UnoExtensionsNavigation . UI . Controls . FrameView > action ) { action ? . Invoke ( UI ) ; return this ; }
79
+
80
+ protected FrameView ( ) { }
81
+ }
82
+ }
83
+
84
+ namespace CSharpMarkup . WinUI . Uno . Extensions . Navigation // NavigationFlyout
85
+ {
86
+ public static partial class Helpers
87
+ {
88
+ /// <summary>Create a <see cref="UnoExtensionsNavigation.UI.Controls.NavigationFlyout"/></summary>
89
+ public static NavigationFlyout NavigationFlyout ( Xaml . UIElement Content )
90
+ {
91
+ var ui = new UnoExtensionsNavigation . UI . Controls . NavigationFlyout ( ) ;
92
+ if ( Content != null ) ui . Content = Content ;
93
+ return CSharpMarkup . WinUI . Uno . Extensions . Navigation . NavigationFlyout . StartChain ( ui ) ;
94
+ }
95
+
96
+ /// <summary>Create a <see cref="UnoExtensionsNavigation.UI.Controls.NavigationFlyout"/></summary>
97
+ public static NavigationFlyout NavigationFlyout ( )
98
+ {
99
+ var ui = new UnoExtensionsNavigation . UI . Controls . NavigationFlyout ( ) ;
100
+ return CSharpMarkup . WinUI . Uno . Extensions . Navigation . NavigationFlyout . StartChain ( ui ) ;
101
+ }
102
+ }
103
+
104
+ public partial class NavigationFlyout : Flyout , IUI < UnoExtensionsNavigation . UI . Controls . NavigationFlyout >
105
+ {
106
+ static NavigationFlyout instance ;
107
+
108
+ internal static NavigationFlyout StartChain ( UnoExtensionsNavigation . UI . Controls . NavigationFlyout ui )
109
+ {
110
+ if ( instance == null ) instance = new NavigationFlyout ( ) ;
111
+ instance . UI = ui ;
112
+ return instance ;
113
+ }
114
+
115
+ UnoExtensionsNavigation . UI . Controls . NavigationFlyout ui ;
116
+
117
+ public new UnoExtensionsNavigation . UI . Controls . NavigationFlyout UI
118
+ {
119
+ get => ui ;
120
+ protected set => base . UI = ui = value ;
121
+ }
122
+
123
+ public static implicit operator UnoExtensionsNavigation . UI . Controls . NavigationFlyout ( NavigationFlyout view ) => view ? . UI ;
124
+
125
+ public static implicit operator NavigationFlyout ( UnoExtensionsNavigation . UI . Controls . NavigationFlyout ui ) => NavigationFlyout . StartChain ( ui ) ;
126
+
127
+ public NavigationFlyout Invoke ( Action < UnoExtensionsNavigation . UI . Controls . NavigationFlyout > action ) { action ? . Invoke ( UI ) ; return this ; }
128
+
129
+ protected NavigationFlyout ( ) { }
130
+ }
131
+ }
44
132
133
+ namespace CSharpMarkup . WinUI . Uno . Extensions . Navigation // Navigation
134
+ {
135
+ public static partial class NavigationExtensions
136
+ {
45
137
/// <summary>Set <see cref="UnoExtensionsNavigation.UI.Navigation.Data"/></summary>
46
138
public static TTarget Navigation_Data < TTarget > ( this TTarget target , object ? value ) where TTarget : FrameworkElement
47
139
{ UnoExtensionsNavigation . UI . Navigation . SetData ( target . UI , value ) ; return target ; }
@@ -50,19 +142,27 @@ public static TTarget Navigation_Data<TTarget>(this TTarget target, object? valu
50
142
public static DependencyProperty < TTarget , object ? > Navigation_Data < TTarget > ( this TTarget target ) where TTarget : FrameworkElement
51
143
=> DependencyProperty < TTarget , object ? > . Get ( target , UnoExtensionsNavigation . UI . Navigation . DataProperty ) ;
52
144
145
+ /// <summary>Set <see cref="UnoExtensionsNavigation.UI.Navigation.Request"/></summary>
146
+ public static TTarget Navigation_Request < TTarget > ( this TTarget target , string value ) where TTarget : FrameworkElement
147
+ { UnoExtensionsNavigation . UI . Navigation . SetRequest ( target . UI , value ) ; return target ; }
148
+
149
+ /// <summary>Bind (or set enum value of) <see cref="UnoExtensionsNavigation.UI.Navigation.Request"/></summary>
150
+ public static DependencyProperty < TTarget , string > Navigation_Request < TTarget > ( this TTarget target ) where TTarget : FrameworkElement
151
+ => DependencyProperty < TTarget , string > . Get ( target , UnoExtensionsNavigation . UI . Navigation . RequestProperty ) ;
152
+
53
153
/// <summary>Set <see cref="UnoExtensionsNavigation.UI.Navigation"/> attached properties</summary>
54
154
public static TTarget Navigation < TTarget > ( this TTarget target
55
155
56
- , string Request = default
57
-
58
156
, object ? Data = default
59
157
158
+ , string Request = default
159
+
60
160
) where TTarget : FrameworkElement
61
161
{
62
- if ( Request is not null ) UnoExtensionsNavigation . UI . Navigation . SetRequest ( target . UI , Request ) ;
63
-
64
162
if ( Data is not null ) UnoExtensionsNavigation . UI . Navigation . SetData ( target . UI , Data ) ;
65
163
164
+ if ( Request is not null ) UnoExtensionsNavigation . UI . Navigation . SetRequest ( target . UI , Request ) ;
165
+
66
166
return target ;
67
167
}
68
168
}
@@ -72,14 +172,6 @@ namespace CSharpMarkup.WinUI.Uno.Extensions.Navigation // Region
72
172
{
73
173
public static partial class RegionExtensions
74
174
{
75
- /// <summary>Set <see cref="UnoExtensionsNavigation.UI.Region.Instance"/></summary>
76
- public static TTarget Region_Instance < TTarget > ( this TTarget target , UnoExtensionsNavigation . Regions . IRegion ? value ) where TTarget : DependencyObject
77
- { UnoExtensionsNavigation . UI . Region . SetInstance ( target . UI , value ) ; return target ; }
78
-
79
- /// <summary>Bind (or set enum value of) <see cref="UnoExtensionsNavigation.UI.Region.Instance"/></summary>
80
- public static DependencyProperty < TTarget , UnoExtensionsNavigation . Regions . IRegion ? > Region_Instance < TTarget > ( this TTarget target ) where TTarget : DependencyObject
81
- => DependencyProperty < TTarget , UnoExtensionsNavigation . Regions . IRegion ? > . Get ( target , UnoExtensionsNavigation . UI . Region . InstanceProperty ) ;
82
-
83
175
/// <summary>Set <see cref="UnoExtensionsNavigation.UI.Region.Attached"/></summary>
84
176
public static TTarget Region_Attached < TTarget > ( this TTarget target , bool value ) where TTarget : DependencyObject
85
177
{ UnoExtensionsNavigation . UI . Region . SetAttached ( target . UI , value ) ; return target ; }
@@ -88,6 +180,14 @@ public static TTarget Region_Attached<TTarget>(this TTarget target, bool value)
88
180
public static DependencyProperty < TTarget , bool > Region_Attached < TTarget > ( this TTarget target ) where TTarget : DependencyObject
89
181
=> DependencyProperty < TTarget , bool > . Get ( target , UnoExtensionsNavigation . UI . Region . AttachedProperty ) ;
90
182
183
+ /// <summary>Set <see cref="UnoExtensionsNavigation.UI.Region.Instance"/></summary>
184
+ public static TTarget Region_Instance < TTarget > ( this TTarget target , UnoExtensionsNavigation . Regions . IRegion ? value ) where TTarget : DependencyObject
185
+ { UnoExtensionsNavigation . UI . Region . SetInstance ( target . UI , value ) ; return target ; }
186
+
187
+ /// <summary>Bind (or set enum value of) <see cref="UnoExtensionsNavigation.UI.Region.Instance"/></summary>
188
+ public static DependencyProperty < TTarget , UnoExtensionsNavigation . Regions . IRegion ? > Region_Instance < TTarget > ( this TTarget target ) where TTarget : DependencyObject
189
+ => DependencyProperty < TTarget , UnoExtensionsNavigation . Regions . IRegion ? > . Get ( target , UnoExtensionsNavigation . UI . Region . InstanceProperty ) ;
190
+
91
191
/// <summary>Set <see cref="UnoExtensionsNavigation.UI.Region.Parent"/></summary>
92
192
public static TTarget Region_Parent < TTarget > ( this TTarget target , Xaml . FrameworkElement value ) where TTarget : DependencyObject
93
193
{ UnoExtensionsNavigation . UI . Region . SetParent ( target . UI , value ) ; return target ; }
@@ -107,20 +207,20 @@ public static DependencyProperty<TTarget, IServiceProvider> Region_ServiceProvid
107
207
/// <summary>Set <see cref="UnoExtensionsNavigation.UI.Region"/> attached properties</summary>
108
208
public static TTarget Region < TTarget > ( this TTarget target
109
209
110
- , UnoExtensionsNavigation . Regions . IRegion ? Instance = default
111
-
112
210
, bool ? Attached = default
113
211
212
+ , UnoExtensionsNavigation . Regions . IRegion ? Instance = default
213
+
114
214
, Xaml . FrameworkElement Parent = default
115
215
116
216
, IServiceProvider ServiceProvider = default
117
217
118
218
) where TTarget : DependencyObject
119
219
{
120
- if ( Instance is not null ) UnoExtensionsNavigation . UI . Region . SetInstance ( target . UI , Instance ) ;
121
-
122
220
if ( Attached is not null ) UnoExtensionsNavigation . UI . Region . SetAttached ( target . UI , Attached . Value ) ;
123
221
222
+ if ( Instance is not null ) UnoExtensionsNavigation . UI . Region . SetInstance ( target . UI , Instance ) ;
223
+
124
224
if ( Parent is not null ) UnoExtensionsNavigation . UI . Region . SetParent ( target . UI , Parent ) ;
125
225
126
226
if ( ServiceProvider is not null ) UnoExtensionsNavigation . UI . Region . SetServiceProvider ( target . UI , ServiceProvider ) ;
@@ -162,106 +262,6 @@ public static TTarget Region<TTarget>(this TTarget target
162
262
}
163
263
}
164
264
165
- namespace CSharpMarkup . WinUI . Uno . Extensions . Navigation // FrameView
166
- {
167
- public static partial class Helpers
168
- {
169
- /// <summary>Create a <see cref="UnoExtensionsNavigation.UI.Controls.FrameView"/></summary>
170
- public static FrameView FrameView ( UIObject Content )
171
- {
172
- var ui = new UnoExtensionsNavigation . UI . Controls . FrameView ( ) ;
173
- if ( Content != null ) ui . Content = Content . UI ;
174
- return CSharpMarkup . WinUI . Uno . Extensions . Navigation . FrameView . StartChain ( ui ) ;
175
- }
176
-
177
- /// <summary>Create a <see cref="UnoExtensionsNavigation.UI.Controls.FrameView"/></summary>
178
- public static FrameView FrameView ( )
179
- {
180
- var ui = new UnoExtensionsNavigation . UI . Controls . FrameView ( ) ;
181
- return CSharpMarkup . WinUI . Uno . Extensions . Navigation . FrameView . StartChain ( ui ) ;
182
- }
183
- }
184
-
185
- public partial class FrameView : UserControl , IUI < UnoExtensionsNavigation . UI . Controls . FrameView >
186
- {
187
- static FrameView instance ;
188
-
189
- internal static FrameView StartChain ( UnoExtensionsNavigation . UI . Controls . FrameView ui )
190
- {
191
- if ( instance == null ) instance = new FrameView ( ) ;
192
- instance . UI = ui ;
193
- return instance ;
194
- }
195
-
196
- UnoExtensionsNavigation . UI . Controls . FrameView ui ;
197
-
198
- public new UnoExtensionsNavigation . UI . Controls . FrameView UI
199
- {
200
- get => ui ;
201
- protected set => base . UI = ui = value ;
202
- }
203
-
204
- public static implicit operator Xaml . UIElement ( FrameView view ) => view ? . UI ;
205
-
206
- public static implicit operator UnoExtensionsNavigation . UI . Controls . FrameView ( FrameView view ) => view ? . UI ;
207
-
208
- public static implicit operator FrameView ( UnoExtensionsNavigation . UI . Controls . FrameView ui ) => FrameView . StartChain ( ui ) ;
209
-
210
- public FrameView Invoke ( Action < UnoExtensionsNavigation . UI . Controls . FrameView > action ) { action ? . Invoke ( UI ) ; return this ; }
211
-
212
- protected FrameView ( ) { }
213
- }
214
- }
215
-
216
- namespace CSharpMarkup . WinUI . Uno . Extensions . Navigation // NavigationFlyout
217
- {
218
- public static partial class Helpers
219
- {
220
- /// <summary>Create a <see cref="UnoExtensionsNavigation.UI.Controls.NavigationFlyout"/></summary>
221
- public static NavigationFlyout NavigationFlyout ( Xaml . UIElement Content )
222
- {
223
- var ui = new UnoExtensionsNavigation . UI . Controls . NavigationFlyout ( ) ;
224
- if ( Content != null ) ui . Content = Content ;
225
- return CSharpMarkup . WinUI . Uno . Extensions . Navigation . NavigationFlyout . StartChain ( ui ) ;
226
- }
227
-
228
- /// <summary>Create a <see cref="UnoExtensionsNavigation.UI.Controls.NavigationFlyout"/></summary>
229
- public static NavigationFlyout NavigationFlyout ( )
230
- {
231
- var ui = new UnoExtensionsNavigation . UI . Controls . NavigationFlyout ( ) ;
232
- return CSharpMarkup . WinUI . Uno . Extensions . Navigation . NavigationFlyout . StartChain ( ui ) ;
233
- }
234
- }
235
-
236
- public partial class NavigationFlyout : Flyout , IUI < UnoExtensionsNavigation . UI . Controls . NavigationFlyout >
237
- {
238
- static NavigationFlyout instance ;
239
-
240
- internal static NavigationFlyout StartChain ( UnoExtensionsNavigation . UI . Controls . NavigationFlyout ui )
241
- {
242
- if ( instance == null ) instance = new NavigationFlyout ( ) ;
243
- instance . UI = ui ;
244
- return instance ;
245
- }
246
-
247
- UnoExtensionsNavigation . UI . Controls . NavigationFlyout ui ;
248
-
249
- public new UnoExtensionsNavigation . UI . Controls . NavigationFlyout UI
250
- {
251
- get => ui ;
252
- protected set => base . UI = ui = value ;
253
- }
254
-
255
- public static implicit operator UnoExtensionsNavigation . UI . Controls . NavigationFlyout ( NavigationFlyout view ) => view ? . UI ;
256
-
257
- public static implicit operator NavigationFlyout ( UnoExtensionsNavigation . UI . Controls . NavigationFlyout ui ) => NavigationFlyout . StartChain ( ui ) ;
258
-
259
- public NavigationFlyout Invoke ( Action < UnoExtensionsNavigation . UI . Controls . NavigationFlyout > action ) { action ? . Invoke ( UI ) ; return this ; }
260
-
261
- protected NavigationFlyout ( ) { }
262
- }
263
- }
264
-
265
265
266
266
#endif
267
267
// End of generated C# Markup API for Uno.WinUI
0 commit comments