BindableLayout\BindableLayout.cs (21)
50 public static void SetItemsSource(BindableObject b, IEnumerable value)
56 public static IEnumerable GetItemsSource(BindableObject b)
62 public static void SetItemTemplate(BindableObject b, DataTemplate value)
68 public static DataTemplate GetItemTemplate(BindableObject b)
74 public static void SetItemTemplateSelector(BindableObject b, DataTemplateSelector value)
80 public static DataTemplateSelector GetItemTemplateSelector(BindableObject b)
86 public static object GetEmptyView(BindableObject b)
92 public static void SetEmptyView(BindableObject b, object value)
98 public static DataTemplate GetEmptyViewTemplate(BindableObject b)
104 public static void SetEmptyViewTemplate(BindableObject b, DataTemplate value)
109 internal static BindableLayoutController GetBindableLayoutController(BindableObject b)
114 static void SetBindableLayoutController(BindableObject b, BindableLayoutController value)
119 static void OnControllerChanged(BindableObject b, BindableLayoutController oldC, BindableLayoutController newC)
220 static DataTemplate GetBindableLayoutTemplate(BindableObject b)
228 static void SetBindableLayoutTemplate(BindableObject b, DataTemplate value)
469 if (child is BindableObject bindable)
471 bindable.ClearValue(BindableObject.BindingContextProperty);
478 return _itemTemplate ?? _itemTemplateSelector?.SelectTemplate(item, layout as BindableObject) ?? DefaultItemTemplate;
557 if (child is BindableObject bindable && GetBindableLayoutTemplate(bindable) == template)
582 if (child is BindableObject bindable && bindable.IsSet(BindableLayoutTemplateProperty))
584 bindable.ClearValue(BindableObject.BindingContextProperty);
BindableObject.cs (16)
18 /// <remarks>The <see cref="BindableObject" /> class provides a data storage mechanism that enables the application developer to synchronize data between objects in response to changes, for example, between the View and View Model in the MVVM design pattern. All of the visual elements in the <c>Microsoft.Maui.Controls</c> namespace inherit from <see cref="BindableObject" /> class, so they can all be used to bind the data behind their user interface.</remarks>
32 /// Initializes a new instance of the <see cref="BindableObject"/> class.
48 BindableProperty.Create(nameof(BindingContext), typeof(object), typeof(BindableObject), default(object),
52 /// Gets or sets an object that contains the properties that will be targeted by the bound properties that belong to this <see cref="BindableObject" />.
89 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot set the BindableProperty \"{property.PropertyName}\" because it is readonly.");
103 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot set the BindableProperty \"{property.PropertyName}\" because it is readonly.");
180 internal LocalValueEnumerator(BindableObject bindableObject) => _propertiesEnumerator = bindableObject._properties.GetEnumerator();
298 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot set the a OneWay Binding \"{targetProperty.PropertyName}\" because it is readonly.");
345 public static void SetInheritedBindingContext(BindableObject bindable, object value)
493 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot set the BindableProperty \"{property.PropertyName}\" because it is readonly.");
521 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot set the BindableProperty \"{property.PropertyName}\" because it is readonly.");
562 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Cannot convert {value} to type '{property.ReturnType}'");
568 Application.Current?.FindMauiContext()?.CreateLogger<BindableObject>()?.LogWarning($"Value is an invalid value for {property.PropertyName}");
719 static void BindingContextPropertyBindingChanging(BindableObject bindable, BindingBase oldBindingBase, BindingBase newBindingBase)
731 static void BindingContextPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
BindableObjectExtensions.cs (16)
14 internal static void RefreshPropertyValue(this BindableObject self, BindableProperty property, object value)
22 if (!ctx.Attributes.HasFlag(BindableObject.BindableContextAttributes.IsBeingSet))
32 internal static void PropagateBindingContext<T>(this BindableObject self, IEnumerable<T> children)
33 => PropagateBindingContext(self, children, BindableObject.SetInheritedBindingContext);
35 internal static void PropagateBindingContext<T>(this BindableObject self, IEnumerable<T> children, Action<BindableObject, object> setChildBindingContext)
44 var bo = child as BindableObject;
54 public static void SetBinding(this BindableObject self, BindableProperty targetProperty, string path, BindingMode mode = BindingMode.Default, IValueConverter converter = null,
130 this BindableObject self,
150 public static T GetPropertyIfSet<T>(this BindableObject bindableObject, BindableProperty bindableProperty, T returnIfNotSet)
162 this BindableObject bindableObject,
176 internal static void AddRemoveLogicalChildren(this BindableObject bindable, object oldValue, object newValue)
189 this BindableObject self,
212 public static void SetAppTheme<T>(this BindableObject self, BindableProperty targetProperty, T light, T dark) => self.SetBinding(targetProperty, new AppThemeBinding { Light = light, Dark = dark });
215 public static void SetAppThemeColor(this BindableObject self, BindableProperty targetProperty, Color light, Color dark)
BindableProperty.cs (11)
23 public delegate void BindingPropertyChangedDelegate(BindableObject bindable, object oldValue, object newValue);
25 public delegate void BindingPropertyChangedDelegate<in TPropertyType>(BindableObject bindable, TPropertyType oldValue, TPropertyType newValue);
27 public delegate void BindingPropertyChangingDelegate(BindableObject bindable, object oldValue, object newValue);
29 public delegate void BindingPropertyChangingDelegate<in TPropertyType>(BindableObject bindable, TPropertyType oldValue, TPropertyType newValue);
31 public delegate object CoerceValueDelegate(BindableObject bindable, object value);
33 public delegate TPropertyType CoerceValueDelegate<TPropertyType>(BindableObject bindable, TPropertyType value);
35 public delegate object CreateDefaultValueDelegate(BindableObject bindable);
39 public delegate bool ValidateValueDelegate(BindableObject bindable, object value);
41 public delegate bool ValidateValueDelegate<in TPropertyType>(BindableObject bindable, TPropertyType value);
200 internal object GetDefaultValue(BindableObject bindable)
249 internal delegate void BindablePropertyBindingChanging(BindableObject bindable, BindingBase oldValue, BindingBase newValue);
BindingExpression.cs (14)
28 WeakReference<BindableObject> _weakTarget;
53 if (!_weakTarget.TryGetTarget(out BindableObject target))
66 internal void Apply(object sourceObject, BindableObject target, BindableProperty property, SetterSpecificity specificity)
85 if (_weakTarget != null && _weakTarget.TryGetTarget(out BindableObject prevTarget) && !ReferenceEquals(prevTarget, target))
92 _weakTarget = new WeakReference<BindableObject>(target);
121 void ApplyCore(object sourceObject, BindableObject target, BindableProperty property, bool fromTarget, SetterSpecificity specificity)
179 target.SetValueCore(property, value, SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted, specificity);
511 BindableObject target = null;
535 BindableObject target = null;
594 if (source is BindableObject bo)
604 if (source is BindableObject bo)
620 OnPropertyChanged(sender, new PropertyChangedEventArgs(nameof(BindableObject.BindingContext)));
711 if (_expression._weakTarget is not null && _expression._weakTarget.TryGetTarget(out BindableObject obj))
Internals\CellExtensions.cs (10)
14 public static bool GetIsGroupHeader<TView, [DynamicallyAccessedMembers(ItemTypeMembers)] TItem>(this TItem cell) where TView : BindableObject, ITemplatedItemsView<TItem> where TItem : BindableObject
19 public static void SetIsGroupHeader<TView, [DynamicallyAccessedMembers(ItemTypeMembers)] TItem>(this TItem cell, bool value) where TView : BindableObject, ITemplatedItemsView<TItem> where TItem : BindableObject
24 public static TItem GetGroupHeaderContent<TView, [DynamicallyAccessedMembers(ItemTypeMembers)] TItem>(this TItem cell) where TView : BindableObject, ITemplatedItemsView<TItem> where TItem : BindableObject
30 public static int GetIndex<TView, [DynamicallyAccessedMembers(ItemTypeMembers)] TItem>(this TItem cell) where TView : BindableObject, ITemplatedItemsView<TItem> where TItem : BindableObject
35 public static ITemplatedItemsList<TItem> GetGroup<TView, [DynamicallyAccessedMembers(ItemTypeMembers)] TItem>(this TItem cell) where TView : BindableObject, ITemplatedItemsView<TItem> where TItem : BindableObject
Layout\FlexLayout.cs (40)
116 public static int GetOrder(BindableObject bindable)
120 public static void SetOrder(BindableObject bindable, int value)
124 public static float GetGrow(BindableObject bindable)
128 public static void SetGrow(BindableObject bindable, float value)
132 public static float GetShrink(BindableObject bindable)
136 public static void SetShrink(BindableObject bindable, float value)
140 public static FlexAlignSelf GetAlignSelf(BindableObject bindable)
144 public static void SetAlignSelf(BindableObject bindable, FlexAlignSelf value)
148 public static FlexBasis GetBasis(BindableObject bindable)
152 public static void SetBasis(BindableObject bindable, FlexBasis value)
159 static Flex.Item GetFlexItem(BindableObject bindable)
162 static void OnOrderPropertyChanged(BindableObject bindable, object oldValue, object newValue)
170 static void OnGrowPropertyChanged(BindableObject bindable, object oldValue, object newValue)
178 static void OnShrinkPropertyChanged(BindableObject bindable, object oldValue, object newValue)
186 static void OnAlignSelfPropertyChanged(BindableObject bindable, object oldValue, object newValue)
194 static void OnBasisPropertyChanged(BindableObject bindable, object oldValue, object newValue)
202 static void OnDirectionPropertyChanged(BindableObject bindable, object oldValue, object newValue)
211 static void OnJustifyContentPropertyChanged(BindableObject bindable, object oldValue, object newValue)
220 static void OnAlignContentPropertyChanged(BindableObject bindable, object oldValue, object newValue)
229 static void OnAlignItemsPropertyChanged(BindableObject bindable, object oldValue, object newValue)
238 static void OnPositionPropertyChanged(BindableObject bindable, object oldValue, object newValue)
247 static void OnWrapPropertyChanged(BindableObject bindable, object oldValue, object newValue)
272 BindableObject bo => (int)bo.GetValue(OrderProperty),
281 case BindableObject bo:
294 BindableObject bo => (float)bo.GetValue(GrowProperty),
303 case BindableObject bo:
316 BindableObject bo => (float)bo.GetValue(ShrinkProperty),
325 case BindableObject bo:
338 BindableObject bo => (FlexAlignSelf)bo.GetValue(AlignSelfProperty),
347 case BindableObject bo:
360 BindableObject bo => (FlexBasis)bo.GetValue(BasisProperty),
369 case BindableObject bo:
382 BindableObject bo => (Flex.Item)bo.GetValue(FlexItemProperty),
391 case BindableObject bo:
404 BindableObject bo => (Thickness)bo.GetValue(MarginProperty),
413 BindableObject bo => (double)bo.GetValue(WidthRequestProperty),
422 BindableObject bo => (double)bo.GetValue(HeightRequestProperty),
431 BindableObject bo => (bool)bo.GetValue(IsVisibleProperty),
487 if (child is not BindableObject)
545 case BindableObject bo:
Layout\Grid.cs (21)
65 public static int GetColumn(BindableObject bindable)
71 public static int GetColumnSpan(BindableObject bindable)
77 public static int GetRow(BindableObject bindable)
83 public static int GetRowSpan(BindableObject bindable)
89 public static void SetColumn(BindableObject bindable, int value)
95 public static void SetColumnSpan(BindableObject bindable, int value)
101 public static void SetRow(BindableObject bindable, int value)
107 public static void SetRowSpan(BindableObject bindable, int value)
153 BindableObject bo => (int)bo.GetValue(ColumnProperty),
162 BindableObject bo => (int)bo.GetValue(ColumnSpanProperty),
171 BindableObject bo => (int)bo.GetValue(RowProperty),
180 BindableObject bo => (int)bo.GetValue(RowSpanProperty),
199 case BindableObject bo:
213 case BindableObject bo:
227 case BindableObject bo:
241 case BindableObject bo:
253 if (view is not BindableObject)
275 if (view is not BindableObject)
287 if (view is not BindableObject)
297 static void UpdateSizeChangedHandlers(BindableObject bindable, object oldValue, object newValue)
322 static void Invalidate(BindableObject bindable, object oldValue, object newValue)
LegacyLayouts\FlexLayout.cs (27)
114 static Flex.Item GetFlexItem(BindableObject bindable)
117 static void SetFlexItem(BindableObject bindable, Flex.Item node)
120 public static int GetOrder(BindableObject bindable)
123 public static void SetOrder(BindableObject bindable, int value)
126 public static float GetGrow(BindableObject bindable)
129 public static void SetGrow(BindableObject bindable, float value)
132 public static float GetShrink(BindableObject bindable)
135 public static void SetShrink(BindableObject bindable, float value)
138 public static FlexAlignSelf GetAlignSelf(BindableObject bindable)
141 public static void SetAlignSelf(BindableObject bindable, FlexAlignSelf value)
144 public static FlexBasis GetBasis(BindableObject bindable)
147 public static void SetBasis(BindableObject bindable, FlexBasis value)
150 static void OnOrderPropertyChanged(BindableObject bindable, object oldValue, object newValue)
158 static void OnGrowPropertyChanged(BindableObject bindable, object oldValue, object newValue)
166 static void OnShrinkPropertyChanged(BindableObject bindable, object oldValue, object newValue)
174 static void OnAlignSelfPropertyChanged(BindableObject bindable, object oldValue, object newValue)
182 static void OnBasisPropertyChanged(BindableObject bindable, object oldValue, object newValue)
190 static void OnDirectionPropertyChanged(BindableObject bindable, object oldValue, object newValue)
199 static void OnJustifyContentPropertyChanged(BindableObject bindable, object oldValue, object newValue)
208 static void OnAlignContentPropertyChanged(BindableObject bindable, object oldValue, object newValue)
217 static void OnAlignItemsPropertyChanged(BindableObject bindable, object oldValue, object newValue)
226 static void OnPositionPropertyChanged(BindableObject bindable, object oldValue, object newValue)
235 static void OnWrapPropertyChanged(BindableObject bindable, object oldValue, object newValue)
365 var item = (sender as FlexLayout)?._root ?? GetFlexItem((BindableObject)sender);
376 var item = (sender as FlexLayout)?._root ?? GetFlexItem((BindableObject)sender);
390 var item = (sender as FlexLayout)?._root ?? GetFlexItem((BindableObject)sender);
404 var item = (sender as FlexLayout)?._root ?? GetFlexItem((BindableObject)sender);
ListView\ListView.cs (9)
620 static void OnFooterChanged(BindableObject bindable, object oldValue, object newValue)
626 static void OnFooterTemplateChanged(BindableObject bindable, object oldValue, object newValue)
632 static void OnGroupDisplayBindingChanged(BindableObject bindable, BindingBase oldValue, BindingBase newValue)
642 static void OnGroupHeaderTemplateChanged(BindableObject bindable, object oldvalue, object newValue)
652 static void OnHeaderChanged(BindableObject bindable, object oldValue, object newValue)
700 static void OnHeaderTemplateChanged(BindableObject bindable, object oldValue, object newValue)
706 static void OnRefreshCommandChanged(BindableObject bindable, object oldValue, object newValue)
739 static void OnSelectedItemChanged(BindableObject bindable, object oldValue, object newValue)
742 static bool ValidateHeaderFooterTemplate(BindableObject bindable, object value)
MultiBinding.cs (8)
18 BindableObject _targetObject;
19 BindableObject _proxyObject;
108 _targetObject.SetValueCore(_targetProperty, value, SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted, specificity: SetterSpecificity.FromBinding);
136 internal override void Apply(object context, BindableObject targetObject, BindableProperty targetProperty, bool fromBindingContextChanged, SetterSpecificity specificity)
181 _targetObject.SetValueCore(_targetProperty, value, SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted, specificity);
227 void OnBindingChanged(BindableObject bindable, object oldValue, object newValue)
PaddingElement.cs (6)
12 static void OnPaddingPropertyChanged(BindableObject bindable, object oldValue, object newValue)
17 static object PaddingDefaultValueCreator(BindableObject bindable)
27 static void OnPaddingLeftChanged(BindableObject bindable, object oldValue, object newValue)
39 static void OnPaddingTopChanged(BindableObject bindable, object oldValue, object newValue)
51 static void OnPaddingRightChanged(BindableObject bindable, object oldValue, object newValue)
63 static void OnPaddingBottomChanged(BindableObject bindable, object oldValue, object newValue)
PlatformConfiguration\iOSSpecific\VisualElement.cs (17)
22 public static BlurEffectStyle GetBlurEffect(BindableObject element)
32 public static void SetBlurEffect(BindableObject element, BlurEffectStyle value)
74 static void OnIsShadowEnabledChanged(BindableObject bindable, object oldValue, object newValue)
100 public static bool GetIsShadowEnabled(BindableObject element)
110 public static void SetIsShadowEnabled(BindableObject element, bool value)
147 public static Color GetShadowColor(BindableObject element)
157 public static void SetShadowColor(BindableObject element, Color value)
194 public static double GetShadowRadius(BindableObject element)
204 public static void SetShadowRadius(BindableObject element, double value)
241 public static Size GetShadowOffset(BindableObject element)
251 public static void SetShadowOffset(BindableObject element, Size value)
288 public static double GetShadowOpacity(BindableObject element)
298 public static void SetShadowOpacity(BindableObject element, double value)
339 public static bool GetIsLegacyColorModeEnabled(BindableObject element)
349 public static void SetIsLegacyColorModeEnabled(BindableObject element, bool value)
387 public static bool GetCanBecomeFirstResponder(BindableObject element)
397 public static void SetCanBecomeFirstResponder(BindableObject element, bool value)
PlatformConfiguration\TizenSpecific\VisualElement.cs (21)
52 public static string GetStyle(BindableObject element)
62 public static void SetStyle(BindableObject element, string value)
94 public static bool? IsFocusAllowed(BindableObject element)
104 public static void SetFocusAllowed(BindableObject element, bool value)
137 public static string GetNextFocusDirection(BindableObject element)
148 public static void SetNextFocusDirection(BindableObject element, string value)
248 public static View GetNextFocusUpView(BindableObject element)
258 public static void SetNextFocusUpView(BindableObject element, View value)
290 public static View GetNextFocusDownView(BindableObject element)
300 public static void SetNextFocusDownView(BindableObject element, View value)
332 public static View GetNextFocusLeftView(BindableObject element)
342 public static void SetNextFocusLeftView(BindableObject element, View value)
374 public static View GetNextFocusRightView(BindableObject element)
384 public static void SetNextFocusRightView(BindableObject element, View value)
416 public static View GetNextFocusBackView(BindableObject element)
426 public static void SetNextFocusBackView(BindableObject element, View value)
458 public static View GetNextFocusForwardView(BindableObject element)
468 public static void SetNextFocusForwardView(BindableObject element, View value)
495 static void OnNextFocusDirectionPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
505 public static string GetToolTip(BindableObject element)
515 public static void SetToolTip(BindableObject element, string value)
RelativeBindingSource.cs (4)
74 internal async Task Apply(BindingExpression expression, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity)
80 internal async Task Apply(TypedBindingBase binding, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity)
201 BindableObject target,
218 BindableObject target,
Shell\SearchHandler.cs (7)
33 static void OnIsFocusedPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
608 static void OnClearPlaceholderCommandChanged(BindableObject bindable, object oldValue, object newValue)
616 static void OnClearPlaceholderCommandParameterChanged(BindableObject bindable, object oldValue, object newValue)
621 static void OnCommandChanged(BindableObject bindable, object oldValue, object newValue)
629 static void OnCommandParameterChanged(BindableObject bindable, object oldValue, object newValue)
644 static void OnItemsSourceChanged(BindableObject bindable, object oldValue, object newValue)
653 static void OnQueryChanged(BindableObject bindable, object oldValue, object newValue)
Shell\Shell.cs (68)
40 static void OnBackButonBehaviorPropertyChanged(BindableObject bindable, object oldValue, object newValue)
71 private static void OnNavBarIsVisibleChanged(BindableObject bindable, object oldValue, object newValue)
96 static void OnSearchHandlerPropertyChanged(BindableObject bindable, object oldValue, object newValue)
110 public static bool GetFlyoutItemIsVisible(BindableObject obj) => (bool)obj.GetValue(FlyoutItemIsVisibleProperty);
118 public static void SetFlyoutItemIsVisible(BindableObject obj, bool isVisible) => obj.SetValue(FlyoutItemIsVisibleProperty, isVisible);
120 static void OnFlyoutItemIsVisibleChanged(BindableObject bindable, object oldValue, object newValue)
157 public static DataTemplate GetMenuItemTemplate(BindableObject obj) => (DataTemplate)obj.GetValue(MenuItemTemplateProperty);
168 public static void SetMenuItemTemplate(BindableObject obj, DataTemplate menuItemTemplate) => obj.SetValue(MenuItemTemplateProperty, menuItemTemplate);
181 public static DataTemplate GetItemTemplate(BindableObject obj) => (DataTemplate)obj.GetValue(ItemTemplateProperty);
188 public static void SetItemTemplate(BindableObject obj, DataTemplate itemTemplate) => obj.SetValue(ItemTemplateProperty, itemTemplate);
191 public static BackButtonBehavior GetBackButtonBehavior(BindableObject obj) => (BackButtonBehavior)obj.GetValue(BackButtonBehaviorProperty);
201 public static void SetBackButtonBehavior(BindableObject obj, BackButtonBehavior behavior) => obj.SetValue(BackButtonBehaviorProperty, behavior);
208 public static PresentationMode GetPresentationMode(BindableObject obj) => (PresentationMode)obj.GetValue(PresentationModeProperty);
215 public static void SetPresentationMode(BindableObject obj, PresentationMode presentationMode) => obj.SetValue(PresentationModeProperty, presentationMode);
222 public static FlyoutBehavior GetFlyoutBehavior(BindableObject obj) => (FlyoutBehavior)obj.GetValue(FlyoutBehaviorProperty);
233 public static void SetFlyoutBehavior(BindableObject obj, FlyoutBehavior value) => obj.SetValue(FlyoutBehaviorProperty, value);
240 public static double GetFlyoutWidth(BindableObject obj) => (double)obj.GetValue(FlyoutWidthProperty);
248 public static void SetFlyoutWidth(BindableObject obj, double value) => obj.SetValue(FlyoutWidthProperty, value);
255 public static double GetFlyoutHeight(BindableObject obj) => (double)obj.GetValue(FlyoutHeightProperty);
266 public static void SetFlyoutHeight(BindableObject obj, double value) => obj.SetValue(FlyoutHeightProperty, value);
273 public static bool GetNavBarIsVisible(BindableObject obj) => (bool)obj.GetValue(NavBarIsVisibleProperty);
281 public static void SetNavBarIsVisible(BindableObject obj, bool value) => obj.SetValue(NavBarIsVisibleProperty, value);
288 public static bool GetNavBarHasShadow(BindableObject obj) => (bool)obj.GetValue(NavBarHasShadowProperty);
296 public static void SetNavBarHasShadow(BindableObject obj, bool value) => obj.SetValue(NavBarHasShadowProperty, value);
303 public static SearchHandler GetSearchHandler(BindableObject obj) => (SearchHandler)obj.GetValue(SearchHandlerProperty);
311 public static void SetSearchHandler(BindableObject obj, SearchHandler handler) => obj.SetValue(SearchHandlerProperty, handler);
318 public static bool GetTabBarIsVisible(BindableObject obj) => (bool)obj.GetValue(TabBarIsVisibleProperty);
329 public static void SetTabBarIsVisible(BindableObject obj, bool value) => obj.SetValue(TabBarIsVisibleProperty, value);
336 public static View GetTitleView(BindableObject obj) => (View)obj.GetValue(TitleViewProperty);
343 public static void SetTitleView(BindableObject obj, View value) => obj.SetValue(TitleViewProperty, value);
345 static void OnFlyoutBehaviorChanged(BindableObject bindable, object oldValue, object newValue)
454 public static Color GetBackgroundColor(BindableObject obj) => (Color)obj.GetValue(BackgroundColorProperty);
462 public static void SetBackgroundColor(BindableObject obj, Color value) => obj.SetValue(BackgroundColorProperty, value);
469 public static Color GetDisabledColor(BindableObject obj) => (Color)obj.GetValue(DisabledColorProperty);
476 public static void SetDisabledColor(BindableObject obj, Color value) => obj.SetValue(DisabledColorProperty, value);
483 public static Color GetForegroundColor(BindableObject obj) => (Color)obj.GetValue(ForegroundColorProperty);
491 public static void SetForegroundColor(BindableObject obj, Color value) => obj.SetValue(ForegroundColorProperty, value);
498 public static Color GetTabBarBackgroundColor(BindableObject obj) => (Color)obj.GetValue(TabBarBackgroundColorProperty);
506 public static void SetTabBarBackgroundColor(BindableObject obj, Color value) => obj.SetValue(TabBarBackgroundColorProperty, value);
513 public static Color GetTabBarDisabledColor(BindableObject obj) => (Color)obj.GetValue(TabBarDisabledColorProperty);
521 public static void SetTabBarDisabledColor(BindableObject obj, Color value) => obj.SetValue(TabBarDisabledColorProperty, value);
528 public static Color GetTabBarForegroundColor(BindableObject obj) => (Color)obj.GetValue(TabBarForegroundColorProperty);
536 public static void SetTabBarForegroundColor(BindableObject obj, Color value) => obj.SetValue(TabBarForegroundColorProperty, value);
543 public static Color GetTabBarTitleColor(BindableObject obj) => (Color)obj.GetValue(TabBarTitleColorProperty);
551 public static void SetTabBarTitleColor(BindableObject obj, Color value) => obj.SetValue(TabBarTitleColorProperty, value);
558 public static Color GetTabBarUnselectedColor(BindableObject obj) => (Color)obj.GetValue(TabBarUnselectedColorProperty);
566 public static void SetTabBarUnselectedColor(BindableObject obj, Color value) => obj.SetValue(TabBarUnselectedColorProperty, value);
573 public static Color GetTitleColor(BindableObject obj) => (Color)obj.GetValue(TitleColorProperty);
580 public static void SetTitleColor(BindableObject obj, Color value) => obj.SetValue(TitleColorProperty, value);
587 public static Color GetUnselectedColor(BindableObject obj) => (Color)obj.GetValue(UnselectedColorProperty);
594 public static void SetUnselectedColor(BindableObject obj, Color value) => obj.SetValue(UnselectedColorProperty, value);
601 public static Brush GetFlyoutBackdrop(BindableObject obj) => (Brush)obj.GetValue(FlyoutBackdropProperty);
608 public static void SetFlyoutBackdrop(BindableObject obj, Brush value) => obj.SetValue(FlyoutBackdropProperty, value);
610 static void OnShellAppearanceValueChanged(BindableObject bindable, object oldValue, object newValue)
636 internal static BindableObject GetBindableObjectWithFlyoutItemTemplate(BindableObject bo)
649 DataTemplate IShellController.GetFlyoutItemDataTemplate(BindableObject bo)
652 var bindableObjectWithTemplate = GetBindableObjectWithFlyoutItemTemplate(bo);
898 (sender as BindableObject).PropertyChanged -= OnShellItemPropertyChanged;
1639 static void OnCurrentItemChanged(BindableObject bindable, object oldValue, object newValue)
1670 static void OnCurrentItemChanging(BindableObject bindable, object oldValue, object newValue)
1728 static void OnFlyoutHeaderChanging(BindableObject bindable, object oldValue, object newValue)
1734 static void OnFlyoutFooterChanging(BindableObject bindable, object oldValue, object newValue)
1740 static void OnFlyoutHeaderTemplateChanging(BindableObject bindable, object oldValue, object newValue)
1746 static void OnFlyoutFooterTemplateChanging(BindableObject bindable, object oldValue, object newValue)
1752 static void OnTitleViewChanged(BindableObject bindable, object oldValue, object newValue) =>
2065 static void OnFlyoutContentChanging(BindableObject bindable, object oldValue, object newValue)
2071 static void OnFlyoutContentTemplateChanging(BindableObject bindable, object oldValue, object newValue)
Style.cs (10)
19 readonly ConditionalWeakTable<BindableObject, object> _targets = new();
67 foreach (var target in (IEnumerable<KeyValuePair<BindableObject, object>>)(object)_targets)
93 void IStyle.Apply(BindableObject bindable, SetterSpecificity specificity)
113 void IStyle.UnApply(BindableObject bindable)
140 foreach (var target in (IEnumerable<KeyValuePair<BindableObject, object>>)(object)_targets)
147 Style GetBasedOnResource(BindableObject bindable) => (Style)bindable.GetValue(_basedOnResourceProperty);
149 static void OnBasedOnResourceChanged(BindableObject bindable, object oldValue, object newValue)
161 ConditionalWeakTable<BindableObject, object> specificities = new();
163 void ApplyCore(BindableObject bindable, Style basedOn, SetterSpecificity specificity)
182 void UnApplyCore(BindableObject bindable, Style basedOn)
TitleBar\TitleBar.cs (6)
74 static void OnLeadingChanged(BindableObject bindable, object oldValue, object newValue)
88 static void OnIconChanged(BindableObject bindable, object oldValue, object newValue)
102 static void OnTitleChanged(BindableObject bindable, object oldValue, object newValue)
115 static void OnSubtitleChanged(BindableObject bindable, object oldValue, object newValue)
128 static void OnContentChanged(BindableObject bindable, object oldValue, object newValue)
142 static void OnTrailingContentChanged(BindableObject bindable, object oldValue, object newValue)
TypedBinding.cs (13)
70 internal abstract void ApplyToResolvedSource(object sourceObject, BindableObject target, BindableProperty property, bool fromTarget, SetterSpecificity specificity);
144 readonly WeakReference<BindableObject> _weakTarget = new WeakReference<BindableObject>(null);
155 BindableObject target;
171 internal override void Apply(object context, BindableObject bindObj, BindableProperty targetProperty, bool fromBindingContextChanged, SetterSpecificity specificity)
205 RelativeBindingSource relativeSource, Element relativeSourceTarget, BindableObject targetObject, BindableProperty targetProperty, SetterSpecificity specificity)
234 internal override void ApplyToResolvedSource(object source, BindableObject target, BindableProperty targetProperty, bool fromBindingContextChanged, SetterSpecificity specificity)
288 internal void ApplyCore(object sourceObject, BindableObject target, BindableProperty property, bool fromTarget, SetterSpecificity specificity)
325 target.SetValueCore(property, value, SetValueFlags.ClearDynamicResource, BindableObject.SetValuePrivateFlags.Default | BindableObject.SetValuePrivateFlags.Converted, specificity);
405 BindableObject target = null;
428 BindableObject target = null;
505 IDispatcher dispatcher = (sender as BindableObject)?.Dispatcher;
View\View.cs (6)
18 /// Because <see cref="View" /> ultimately inherits from <see cref="BindableObject" />, application developers can use the Model-View-ViewModel architecture, as well as XAML, to develop portable user interfaces.
45 static void OnMarginLeftPropertyChanged(BindableObject bindable, object oldValue, object newValue)
56 static void OnMarginTopPropertyChanged(BindableObject bindable, object oldValue, object newValue)
67 static void OnMarginRightPropertyChanged(BindableObject bindable, object oldValue, object newValue)
79 static void OnMarginBottomPropertyChanged(BindableObject bindable, object oldValue, object newValue)
266 static void MarginPropertyChanged(BindableObject bindable, object oldValue, object newValue)
VisualElement\VisualElement.cs (13)
207 static void OnTransformChanged(BindableObject bindable, object oldValue, object newValue)
1633 static void OnVisualChanged(BindableObject bindable, object oldValue, object newValue)
1646 static void FlowDirectionChanging(BindableObject bindable, object oldValue, object newValue)
1661 static void FlowDirectionChanged(BindableObject bindable, object oldValue, object newValue)
1666 static object CoerceIsEnabledProperty(BindableObject bindable, object value)
1677 static void OnIsEnabledPropertyChanged(BindableObject bindable, object oldValue, object newValue)
1689 static object CoerceInputTransparentProperty(BindableObject bindable, object value)
1700 static object CoerceIsVisibleProperty(BindableObject bindable, object value)
1711 static void OnInputTransparentPropertyChanged(BindableObject bindable, object oldValue, object newValue)
1716 static void OnIsFocusedPropertyChanged(BindableObject bindable, object oldvalue, object newvalue)
1738 static void OnRequestChanged(BindableObject bindable, object oldvalue, object newvalue)
1927 static void ZIndexPropertyChanged(BindableObject bindable, object oldValue, object newValue)
2351 static void OnWindowChanged(BindableObject bindable, object? oldValue, object? newValue)