@@ -117,7 +117,135 @@ public static Task<bool> AnimateBarTextColorTo<T>(this T self, Color value, uint
117
117
var callback = ( Color actValue ) => { self . BarTextColor = actValue ; } ;
118
118
return Transformations . AnimateAsync < Color > ( self , "AnimateBarTextColorTo" , transform , callback , length , easing ) ;
119
119
}
120
-
120
+
121
+ public static T HasBackButton < T > ( this T self ,
122
+ bool hasBackButton )
123
+ where T : Microsoft . Maui . Controls . NavigationPage
124
+ {
125
+ self . SetValue ( Microsoft . Maui . Controls . NavigationPage . HasBackButtonProperty , hasBackButton ) ;
126
+ return self ;
127
+ }
128
+
129
+ public static T HasBackButton < T > ( this T self , Func < PropertyContext < bool > , IPropertyBuilder < bool > > configure )
130
+ where T : Microsoft . Maui . Controls . NavigationPage
131
+ {
132
+ var context = new PropertyContext < bool > ( self , Microsoft . Maui . Controls . NavigationPage . HasBackButtonProperty ) ;
133
+ configure ( context ) . Build ( ) ;
134
+ return self ;
135
+ }
136
+
137
+ public static SettersContext < T > HasBackButton < T > ( this SettersContext < T > self ,
138
+ bool hasBackButton )
139
+ where T : Microsoft . Maui . Controls . NavigationPage
140
+ {
141
+ self . XamlSetters . Add ( new Setter { Property = Microsoft . Maui . Controls . NavigationPage . HasBackButtonProperty , Value = hasBackButton } ) ;
142
+ return self ;
143
+ }
144
+
145
+ public static SettersContext < T > HasBackButton < T > ( this SettersContext < T > self , Func < PropertySettersContext < bool > , IPropertySettersBuilder < bool > > configure )
146
+ where T : Microsoft . Maui . Controls . NavigationPage
147
+ {
148
+ var context = new PropertySettersContext < bool > ( self . XamlSetters , Microsoft . Maui . Controls . NavigationPage . HasBackButtonProperty ) ;
149
+ configure ( context ) . Build ( ) ;
150
+ return self ;
151
+ }
152
+
153
+ public static T TitleIconImageSource < T > ( this T self ,
154
+ Microsoft . Maui . Controls . ImageSource titleIconImageSource )
155
+ where T : Microsoft . Maui . Controls . NavigationPage
156
+ {
157
+ self . SetValue ( Microsoft . Maui . Controls . NavigationPage . TitleIconImageSourceProperty , titleIconImageSource ) ;
158
+ return self ;
159
+ }
160
+
161
+ public static T TitleIconImageSource < T > ( this T self , Func < PropertyContext < Microsoft . Maui . Controls . ImageSource > , IPropertyBuilder < Microsoft . Maui . Controls . ImageSource > > configure )
162
+ where T : Microsoft . Maui . Controls . NavigationPage
163
+ {
164
+ var context = new PropertyContext < Microsoft . Maui . Controls . ImageSource > ( self , Microsoft . Maui . Controls . NavigationPage . TitleIconImageSourceProperty ) ;
165
+ configure ( context ) . Build ( ) ;
166
+ return self ;
167
+ }
168
+
169
+ public static SettersContext < T > TitleIconImageSource < T > ( this SettersContext < T > self ,
170
+ Microsoft . Maui . Controls . ImageSource titleIconImageSource )
171
+ where T : Microsoft . Maui . Controls . NavigationPage
172
+ {
173
+ self . XamlSetters . Add ( new Setter { Property = Microsoft . Maui . Controls . NavigationPage . TitleIconImageSourceProperty , Value = titleIconImageSource } ) ;
174
+ return self ;
175
+ }
176
+
177
+ public static SettersContext < T > TitleIconImageSource < T > ( this SettersContext < T > self , Func < PropertySettersContext < Microsoft . Maui . Controls . ImageSource > , IPropertySettersBuilder < Microsoft . Maui . Controls . ImageSource > > configure )
178
+ where T : Microsoft . Maui . Controls . NavigationPage
179
+ {
180
+ var context = new PropertySettersContext < Microsoft . Maui . Controls . ImageSource > ( self . XamlSetters , Microsoft . Maui . Controls . NavigationPage . TitleIconImageSourceProperty ) ;
181
+ configure ( context ) . Build ( ) ;
182
+ return self ;
183
+ }
184
+
185
+ public static T IconColor < T > ( this T self ,
186
+ Microsoft . Maui . Graphics . Color iconColor )
187
+ where T : Microsoft . Maui . Controls . NavigationPage
188
+ {
189
+ self . SetValue ( Microsoft . Maui . Controls . NavigationPage . IconColorProperty , iconColor ) ;
190
+ return self ;
191
+ }
192
+
193
+ public static T IconColor < T > ( this T self , Func < PropertyContext < Microsoft . Maui . Graphics . Color > , IPropertyBuilder < Microsoft . Maui . Graphics . Color > > configure )
194
+ where T : Microsoft . Maui . Controls . NavigationPage
195
+ {
196
+ var context = new PropertyContext < Microsoft . Maui . Graphics . Color > ( self , Microsoft . Maui . Controls . NavigationPage . IconColorProperty ) ;
197
+ configure ( context ) . Build ( ) ;
198
+ return self ;
199
+ }
200
+
201
+ public static SettersContext < T > IconColor < T > ( this SettersContext < T > self ,
202
+ Microsoft . Maui . Graphics . Color iconColor )
203
+ where T : Microsoft . Maui . Controls . NavigationPage
204
+ {
205
+ self . XamlSetters . Add ( new Setter { Property = Microsoft . Maui . Controls . NavigationPage . IconColorProperty , Value = iconColor } ) ;
206
+ return self ;
207
+ }
208
+
209
+ public static SettersContext < T > IconColor < T > ( this SettersContext < T > self , Func < PropertySettersContext < Microsoft . Maui . Graphics . Color > , IPropertySettersBuilder < Microsoft . Maui . Graphics . Color > > configure )
210
+ where T : Microsoft . Maui . Controls . NavigationPage
211
+ {
212
+ var context = new PropertySettersContext < Microsoft . Maui . Graphics . Color > ( self . XamlSetters , Microsoft . Maui . Controls . NavigationPage . IconColorProperty ) ;
213
+ configure ( context ) . Build ( ) ;
214
+ return self ;
215
+ }
216
+
217
+ public static T TitleView < T > ( this T self ,
218
+ Microsoft . Maui . Controls . View titleView )
219
+ where T : Microsoft . Maui . Controls . NavigationPage
220
+ {
221
+ self . SetValue ( Microsoft . Maui . Controls . NavigationPage . TitleViewProperty , titleView ) ;
222
+ return self ;
223
+ }
224
+
225
+ public static T TitleView < T > ( this T self , Func < PropertyContext < Microsoft . Maui . Controls . View > , IPropertyBuilder < Microsoft . Maui . Controls . View > > configure )
226
+ where T : Microsoft . Maui . Controls . NavigationPage
227
+ {
228
+ var context = new PropertyContext < Microsoft . Maui . Controls . View > ( self , Microsoft . Maui . Controls . NavigationPage . TitleViewProperty ) ;
229
+ configure ( context ) . Build ( ) ;
230
+ return self ;
231
+ }
232
+
233
+ public static SettersContext < T > TitleView < T > ( this SettersContext < T > self ,
234
+ Microsoft . Maui . Controls . View titleView )
235
+ where T : Microsoft . Maui . Controls . NavigationPage
236
+ {
237
+ self . XamlSetters . Add ( new Setter { Property = Microsoft . Maui . Controls . NavigationPage . TitleViewProperty , Value = titleView } ) ;
238
+ return self ;
239
+ }
240
+
241
+ public static SettersContext < T > TitleView < T > ( this SettersContext < T > self , Func < PropertySettersContext < Microsoft . Maui . Controls . View > , IPropertySettersBuilder < Microsoft . Maui . Controls . View > > configure )
242
+ where T : Microsoft . Maui . Controls . NavigationPage
243
+ {
244
+ var context = new PropertySettersContext < Microsoft . Maui . Controls . View > ( self . XamlSetters , Microsoft . Maui . Controls . NavigationPage . TitleViewProperty ) ;
245
+ configure ( context ) . Build ( ) ;
246
+ return self ;
247
+ }
248
+
121
249
public static T OnPopped < T > ( this T self , EventHandler < NavigationEventArgs > handler )
122
250
where T : NavigationPage
123
251
{
0 commit comments