2 types derived from VisualElement
Microsoft.Maui.Controls (2)
Page\Page.cs (1)
23 public partial class Page : VisualElement, ILayout, IPageController, IElementConfiguration<Page>, IPaddingElement, ISafeAreaView, ISafeAreaView2, IView, ITitledElement, IToolbarElement
View\View.cs (1)
20 public partial class View : VisualElement, IViewController, IGestureController, IGestureRecognizers, IView, IPropertyMapperView, IHotReloadableView, IControlsView
747 references to VisualElement
Microsoft.Maui.Controls (506)
AdaptiveTrigger.cs (1)
9 VisualElement? _visualElement;
AppThemeBinding.cs (1)
157 target is VisualElement ve &&
AutomationProperties.cs (5)
21 public static readonly BindableProperty LabeledByProperty = BindableProperty.Create("LabeledBy", typeof(VisualElement), typeof(AutomationProperties), default(VisualElement)); 48 public static VisualElement GetLabeledBy(BindableObject bindable) 51 return (VisualElement)bindable.GetValue(LabeledByProperty); 83 public static void SetLabeledBy(BindableObject bindable, VisualElement value)
BindablePropertyConverter.cs (2)
139 if (parents[3] is VisualElement vsTarget) 145 if (parents[4] is VisualElement veTarget)
Border\Border.cs (2)
65 if (strokeShape is VisualElement visualElement) 85 if (strokeShape is VisualElement visualElement)
Button\Button.cs (2)
150 /// <remarks>This property has no effect if <see cref="IBorderElement.BorderWidth" /> is set to 0. On Android this property will not have an effect unless <see cref="VisualElement.BackgroundColor" /> is set to a non-default color.</remarks> 189 /// <remarks>This property is used to associate a command with an instance of a button. This property is most often set in the MVVM pattern to bind callbacks back into the ViewModel. <see cref="VisualElement.IsEnabled" /> is controlled by the <see cref="Command.CanExecute(object)"/> if set.</remarks>
Button\ButtonElement.cs (3)
35 public static void ElementClicked(VisualElement visualElement, IButtonElement ButtonElementManager) 50 public static void ElementPressed(VisualElement visualElement, IButtonElement ButtonElementManager) 66 public static void ElementReleased(VisualElement visualElement, IButtonElement ButtonElementManager)
Cells\Cell.cs (8)
46 var ve = (Parent as VisualElement); 48 OnPropertyChanged(VisualElement.FlowDirectionProperty.PropertyName); 62 OnPropertyChanged(VisualElement.VisualProperty.PropertyName); 82 OnPropertyChanged(VisualElement.WindowProperty.PropertyName); 151 double IFlowDirectionController.Width => (Parent as VisualElement)?.Width ?? 0; 292 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName || 293 e.PropertyName == VisualElement.VisualProperty.PropertyName)
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (6)
20 VisualElement _element; 78 public VisualElement Element => _viewHandlerWrapper.Element ?? _element; 92 public void SetElement(VisualElement element) 363 else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || e.PropertyName == VisualElement.BackgroundProperty.PropertyName) 835 SetElement((VisualElement)view);
Compatibility\Handlers\iOS\DisposeHelpers.cs (2)
13 if (child is VisualElement ve) 22 if (view is VisualElement visualElement)
Compatibility\Handlers\iOS\FrameRenderer.cs (3)
16 [VisualElement.BackgroundColorProperty.PropertyName] = (h, _) => h.SetupLayer(), 17 [VisualElement.BackgroundProperty.PropertyName] = (h, _) => h.SetupLayer(), 21 [VisualElement.IsVisibleProperty.PropertyName] = (h, _) => h.SetupLayer(),
Compatibility\Handlers\iOS\VisualElementRenderer.cs (21)
44 if (e.PropertyName == VisualElement.XProperty.PropertyName || 45 e.PropertyName == VisualElement.YProperty.PropertyName || 46 e.PropertyName == VisualElement.WidthProperty.PropertyName || 47 e.PropertyName == VisualElement.HeightProperty.PropertyName || 48 e.PropertyName == VisualElement.AnchorXProperty.PropertyName || 49 e.PropertyName == VisualElement.AnchorYProperty.PropertyName || 50 e.PropertyName == VisualElement.TranslationXProperty.PropertyName || 51 e.PropertyName == VisualElement.TranslationYProperty.PropertyName || 52 e.PropertyName == VisualElement.ScaleProperty.PropertyName || 53 e.PropertyName == VisualElement.ScaleXProperty.PropertyName || 54 e.PropertyName == VisualElement.ScaleYProperty.PropertyName || 55 e.PropertyName == VisualElement.RotationProperty.PropertyName || 56 e.PropertyName == VisualElement.RotationXProperty.PropertyName || 57 e.PropertyName == VisualElement.RotationYProperty.PropertyName || 58 e.PropertyName == VisualElement.IsVisibleProperty.PropertyName || 59 e.PropertyName == VisualElement.IsEnabledProperty.PropertyName || 60 e.PropertyName == VisualElement.InputTransparentProperty.PropertyName || 61 e.PropertyName == VisualElement.OpacityProperty.PropertyName || 73 if (e.OldElement is VisualElement oldVe) 80 if (e.NewElement is VisualElement newVe) 87 void OnBatchCommitted(object? sender, Internals.EventArg<VisualElement> e)
Compatibility\Handlers\ListView\iOS\CellRenderer.cs (1)
128 if (cell.RealParent is VisualElement element && element.BackgroundColor != null)
Compatibility\Handlers\ListView\iOS\EntryCellRenderer.cs (1)
81 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName)
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (12)
190 var headerView = ListView?.HeaderElement as VisualElement; 195 var footerView = ListView?.FooterElement as VisualElement; 207 var headerView = (VisualElement)listView.HeaderElement; 211 var footerView = (VisualElement)listView.FooterElement; 467 ((VisualElement)_footerRenderer.VirtualView).MeasureInvalidated -= OnFooterMeasureInvalidated; 489 ((VisualElement)_footerRenderer.VirtualView).MeasureInvalidated -= OnFooterMeasureInvalidated; 506 ((VisualElement)_headerRenderer.VirtualView).MeasureInvalidated -= OnHeaderMeasureInvalidated; 528 ((VisualElement)_headerRenderer.VirtualView).MeasureInvalidated -= OnHeaderMeasureInvalidated;
Compatibility\Handlers\ListView\iOS\SwitchCellRenderer.cs (1)
80 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName)
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (5)
53 WeakReference<VisualElement> _element; 77 public VisualElement Element { get => _viewHandlerWrapper.Element ?? _element?.GetTargetOrDefault(); } 94 public void SetElement(VisualElement element) 494 else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName) 1817 _element = view is VisualElement v ? new(v) : null;
Compatibility\Handlers\Shell\iOS\SearchHandlerAppearanceTracker.cs (1)
74 void SearchHandlerFocusChangeRequested(object sender, VisualElement.FocusRequestArgs e)
Compatibility\Handlers\Shell\iOS\ShellFlyoutContentRenderer.cs (1)
56 else if (e.Is(VisualElement.FlowDirectionProperty))
Compatibility\Handlers\Shell\iOS\ShellFlyoutRenderer.cs (1)
275 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName)
Compatibility\Handlers\Shell\iOS\ShellPageRendererTracker.cs (3)
90 if (e.Is(VisualElement.FlowDirectionProperty)) 121 else if (e.IsOneOf(Shell.TitleViewProperty, VisualElement.HeightProperty, VisualElement.WidthProperty))
Compatibility\Handlers\Shell\iOS\ShellRenderer.cs (4)
118 public VisualElement Element { get; private set; } 123 public void SetElement(VisualElement element) 257 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName) 407 SetElement((VisualElement)view);
Compatibility\Handlers\Shell\iOS\ShellSectionRenderer.cs (1)
294 if (e.Is(VisualElement.FlowDirectionProperty))
Compatibility\Handlers\Shell\iOS\ShellSectionRootRenderer.cs (1)
311 if (e.Is(VisualElement.FlowDirectionProperty))
Compatibility\Handlers\TabbedPage\iOS\TabbedRenderer.cs (5)
30 WeakReference<VisualElement> _element; 61 public VisualElement Element => _viewHandlerWrapper.Element ?? _element?.GetTargetOrDefault(); 73 public void SetElement(VisualElement element) 414 if (Tabbed == null || TabBar == null || Element is not VisualElement element) 567 SetElement((VisualElement)view);
Compatibility\Handlers\TableView\iOS\TableViewRenderer.cs (2)
103 else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || e.PropertyName == VisualElement.BackgroundProperty.PropertyName)
Compatibility\Handlers\ViewHandlerDelegator.cs (2)
110 e.OldElement as VisualElement, 111 e.NewElement as VisualElement));
Compatibility\Handlers\VisualElementRenderer.cs (2)
35 [nameof(VisualElement.BackgroundColor)] = MapBackgroundColor, 220 VisualElement.MapAutomationPropertiesIsInAccessibleTree(this, element);
ContentPage\HideSoftInputOnTappedChanged\HideSoftInputOnTappedChangedManager.Platform.cs (1)
70 if (_view is not VisualElement ve)
Editor\Editor.Mapper.cs (1)
19 EditorHandler.Mapper.AppendToMapping(nameof(VisualElement.IsFocused), InputView.MapIsFocused);
Element\Element.cs (4)
27 /// <term><see cref="VisualElement" /></term> 37 /// <description> A <see cref= "VisualElement"/> that occupies most or all of the screen and contains a single child.</description> 814 var child = children[i] as VisualElement;
Embedding\EmbeddingExtensions.cs (3)
93 /// Only if the window is an embedded window and the element is a <see cref="VisualElement"/> will the element 100 if (wndProvider is not null && wndProvider.Window is EmbeddedWindow wnd && element is VisualElement visual) 115 /// Only if the window is an embedded window and the element is a <see cref="VisualElement"/> will the element
Entry\Entry.Mapper.cs (1)
24 EntryHandler.Mapper.AppendToMapping(nameof(VisualElement.IsFocused), InputView.MapIsFocused);
FocusEventArgs.cs (2)
10 public FocusEventArgs(VisualElement visualElement, bool isFocused) 23 public VisualElement VisualElement { get; private set; }
Foldable\IFoldableService.cs (1)
18 Point? GetLocationOnScreen(VisualElement visualElement);
Handlers\Items\iOS\CarouselViewController.cs (2)
71 var element = (cell as TemplatedCell)?.PlatformHandler?.VirtualView as VisualElement;
Handlers\Items\iOS\ItemsViewController.cs (5)
45 VisualElement _emptyViewFormsElement; 545 protected void RemeasureLayout(VisualElement formsElement) 561 if (sender is VisualElement formsElement) 567 protected virtual void HandleFormsElementMeasureInvalidated(VisualElement formsElement) 572 internal void UpdateView(object view, DataTemplate viewTemplate, ref UIView uiView, ref VisualElement formsElement)
Handlers\Items\iOS\StructuredItemsViewController.cs (4)
18 VisualElement _headerViewFormsElement; 21 VisualElement _footerViewFormsElement; 126 internal void UpdateSubview(object view, DataTemplate viewTemplate, nint viewTag, ref UIView uiView, ref VisualElement formsElement) 237 protected override void HandleFormsElementMeasureInvalidated(VisualElement formsElement)
Handlers\Items\iOS\TemplatedCell.cs (2)
258 if (setter.Property.PropertyName == VisualElement.BackgroundColorProperty.PropertyName) 318 if (PlatformHandler?.VirtualView is VisualElement element)
Handlers\Items\iOS\TemplateHelpers.cs (3)
28 public static (UIView PlatformView, VisualElement FormsElement) RealizeView(object view, DataTemplate viewTemplate, ItemsView itemsView) 43 var element = renderer.VirtualView as VisualElement;
Handlers\Items2\iOS\CarouselViewController2.cs (2)
42 var element = (cell as TemplatedCell2)?.PlatformHandler?.VirtualView as VisualElement;
Handlers\Items2\iOS\ItemsViewController2.cs (2)
40 VisualElement _emptyViewFormsElement; 393 internal void UpdateView(object view, DataTemplate viewTemplate, ref UIView uiView, ref VisualElement formsElement)
Handlers\Items2\iOS\TemplatedCell2.cs (2)
167 if (setter.Property.PropertyName == VisualElement.BackgroundColorProperty.PropertyName) 227 if (PlatformHandler?.VirtualView is VisualElement element)
Hosting\AppHostBuilderExtensions.cs (1)
246 VisualElement.RemapForControls();
ImageElement.cs (4)
102 public static void OnBindingContextChanged(IImageElement image, VisualElement visualElement) 141 var imageElement = (VisualElement)bindable; 152 ((VisualElement)sender).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
IndicatorView\IndicatorStackLayout.cs (2)
112 var visualElement = Children[index] as VisualElement;
Interactivity\PlatformBehavior.cs (3)
45 if (bindable is VisualElement ve) 62 if (bindable is VisualElement ve) 143 where TView : VisualElement
Internals\PropertyPropagationExtensions.cs (6)
11 if (propertyName == null || propertyName == VisualElement.FlowDirectionProperty.PropertyName) 14 if (propertyName == null || propertyName == VisualElement.VisualProperty.PropertyName) 17 if (propertyName == null || propertyName == VisualElement.WindowProperty.PropertyName) 39 if (propertyName == null || propertyName == VisualElement.FlowDirectionProperty.PropertyName) 42 if (propertyName == null || propertyName == VisualElement.VisualProperty.PropertyName) 45 if (propertyName == null || propertyName == VisualElement.WindowProperty.PropertyName)
IPlatformSizeService.cs (1)
8 SizeRequest GetPlatformSize(VisualElement view, double widthConstraint, double heightConstraint);
IScrollViewController.cs (1)
9 Point GetScrollPositionForElement(VisualElement item, ScrollToPosition position);
IViewContainer.cs (1)
6 public interface IViewContainer<T> where T : VisualElement
IVisualElementController.cs (2)
4using static Microsoft.Maui.Controls.VisualElement; 39 event EventHandler<EventArg<VisualElement>> BatchCommitted;
Layout\AbsoluteLayout.cs (1)
30 /// Application developers can set the width or height of the <see cref="VisualElement.Bounds" /> property to <see cref="AutoSize" />
Layout\FlexLayout.cs (5)
167 ((VisualElement)bindable).InvalidateMeasureInternal(InvalidationTrigger.Undefined); 175 ((VisualElement)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); 183 ((VisualElement)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); 191 ((VisualElement)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); 199 ((VisualElement)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
Layout\Layout.cs (1)
370 /// when this layout's <see cref="VisualElement.InputTransparent" /> property is <see langword="true" />.
LegacyLayouts\FlexLayout.cs (5)
155 ((VisualElement)bindable).InvalidateMeasureInternal(InvalidationTrigger.Undefined); 163 ((VisualElement)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); 171 ((VisualElement)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); 179 ((VisualElement)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); 187 ((VisualElement)bindable).InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged);
LegacyLayouts\Layout.cs (20)
150 /// when this layout's <see cref="VisualElement.InputTransparent" /> property is <see langword="true" />. 177 /// Occurs at the end of a layout cycle if any of the child element's <see cref="VisualElement.Bounds" /> have changed. 219 public static void LayoutChildIntoBoundingRegion(VisualElement child, Rect region) 344 internal override void OnChildMeasureInvalidatedInternal(VisualElement child, InvalidationTrigger trigger, int depth) 351 /// Invoked whenever a child of the layout has emitted <see cref="VisualElement.MeasureInvalidated" />. 371 OnChildMeasureInvalidated((VisualElement)sender, trigger, depth); 376 /// Invoked whenever a child of the layout has emitted <see cref="VisualElement.MeasureInvalidated" />. 405 /// When implemented, should return <see langword="true" /> if <paramref name="child" /> should call <see cref="VisualElement.InvalidateMeasure" /> when added, 406 /// and should return <see langword="false" /> if it should not call <see cref="VisualElement.InvalidateMeasure" />. The default value is <see langword="true" />. 409 /// <returns><see langword="true" /> if <paramref name="child" /> should call <see cref="VisualElement.InvalidateMeasure" />, otherwise <see langword="false"/>.</returns> 414 /// When implemented, should return <see langword="true" /> if <paramref name="child" /> should call <see cref="VisualElement.InvalidateMeasure" /> when removed, 415 /// and should return <see langword="false" /> if it should not call <see cref="VisualElement.InvalidateMeasure" />. The default value is <see langword="true" />. 418 /// <returns><see langword="true" /> if <paramref name="child" /> should call <see cref="VisualElement.InvalidateMeasure" />, otherwise <see langword="false"/>.</returns> 439 if (LogicalChildrenInternal[index] is VisualElement c) 467 CompressedLayout.SetHeadlessOffset((VisualElement)LogicalChildrenInternal[i], isHeadless ? new Point(headlessOffset.X + Bounds.X, headlessOffset.Y + Bounds.Y) : new Point()); 477 Rect newBound = ((VisualElement)LogicalChildrenInternal[i]).Bounds; 545 internal virtual void OnChildMeasureInvalidated(VisualElement child, InvalidationTrigger trigger, int depth) 551 if (LogicalChildrenInternal[index] is VisualElement v && v.IsVisible && (!v.IsPlatformEnabled || !v.IsPlatformStateConsistent)) 690 var visual = element as VisualElement;
LegacyLayouts\RelativeLayout.cs (2)
208 double mockWidth = double.IsPositiveInfinity(widthConstraint) ? (Parent as VisualElement).Width : widthConstraint; 209 double mockHeight = double.IsPositiveInfinity(heightConstraint) ? (Parent as VisualElement).Height : heightConstraint;
LegacyLayouts\StackLayout.cs (2)
403 var child = (VisualElement)InternalChildren[index];
MergedStyle.cs (1)
19 typeof(VisualElement), typeof(NavigableElement), typeof(Element) };
NavigationPage\NavigationPageToolbar.cs (3)
17 VisualElement _titleView; 28 public override VisualElement TitleView { get => GetTitleView(); set => SetProperty(ref _titleView, value); } 280 VisualElement GetTitleView()
Page\Page.cs (13)
18 /// A <see cref="VisualElement" /> that occupies the entire screen. 435 var child = element as VisualElement; 506 internal override void OnChildMeasureInvalidatedInternal(VisualElement child, InvalidationTrigger trigger, int depth) 531 OnChildMeasureInvalidated((VisualElement)sender, trigger, depth); 585 if (el is VisualElement c) 599 if (element is VisualElement c) 610 internal virtual void OnChildMeasureInvalidated(VisualElement child, InvalidationTrigger trigger, int depth) 624 var v = logicalChildren[i] as VisualElement; 757 if (item is VisualElement) 811 var v = logicalChildren[i] as VisualElement;
PlatformConfiguration\AndroidSpecific\VisualElement.cs (11)
4 using FormsElement = Maui.Controls.VisualElement; 16 typeof(FormsElement)); 23 public static float? GetElevation(FormsElement element) 33 public static void SetElevation(FormsElement element, float? value) 43 public static float? GetElevation(this IPlatformElementConfiguration<Android, FormsElement> config) 54 public static IPlatformElementConfiguration<Android, FormsElement> SetElevation(this IPlatformElementConfiguration<Android, FormsElement> config, float? value) 67 typeof(FormsElement), true); 94 public static bool GetIsLegacyColorModeEnabled(this IPlatformElementConfiguration<Android, FormsElement> config) 105 public static IPlatformElementConfiguration<Android, FormsElement> SetIsLegacyColorModeEnabled( 106 this IPlatformElementConfiguration<Android, FormsElement> config, bool value)
PlatformConfiguration\iOSSpecific\VisualElement.cs (28)
7 using FormsElement = Maui.Controls.VisualElement; 42 public static BlurEffectStyle GetBlurEffect(this IPlatformElementConfiguration<iOS, FormsElement> config) 53 public static IPlatformElementConfiguration<iOS, FormsElement> UseBlurEffect(this IPlatformElementConfiguration<iOS, FormsElement> config, BlurEffectStyle value) 76 var visualElement = bindable as FormsElement; 120 public static bool GetIsShadowEnabled(this IPlatformElementConfiguration<iOS, FormsElement> config) 131 public static IPlatformElementConfiguration<iOS, FormsElement> SetIsShadowEnabled(this IPlatformElementConfiguration<iOS, FormsElement> config, bool value) 167 public static Color GetShadowColor(this IPlatformElementConfiguration<iOS, FormsElement> config) 178 public static IPlatformElementConfiguration<iOS, FormsElement> SetShadowColor(this IPlatformElementConfiguration<iOS, FormsElement> config, Color value) 214 public static double GetShadowRadius(this IPlatformElementConfiguration<iOS, FormsElement> config) 225 public static IPlatformElementConfiguration<iOS, FormsElement> SetShadowRadius(this IPlatformElementConfiguration<iOS, FormsElement> config, double value) 261 public static Size GetShadowOffset(this IPlatformElementConfiguration<iOS, FormsElement> config) 272 public static IPlatformElementConfiguration<iOS, FormsElement> SetShadowOffset(this IPlatformElementConfiguration<iOS, FormsElement> config, Size value) 308 public static double GetShadowOpacity(this IPlatformElementConfiguration<iOS, FormsElement> config) 319 public static IPlatformElementConfiguration<iOS, FormsElement> SetShadowOpacity(this IPlatformElementConfiguration<iOS, FormsElement> config, double value) 332 typeof(FormsElement), true); 359 public static bool GetIsLegacyColorModeEnabled(this IPlatformElementConfiguration<iOS, FormsElement> config) 370 public static IPlatformElementConfiguration<iOS, FormsElement> SetIsLegacyColorModeEnabled( 371 this IPlatformElementConfiguration<iOS, FormsElement> config, bool value) 407 public static bool CanBecomeFirstResponder(this IPlatformElementConfiguration<iOS, FormsElement> config) 418 public static IPlatformElementConfiguration<iOS, FormsElement> SetCanBecomeFirstResponder(this IPlatformElementConfiguration<iOS, FormsElement> config, bool value)
PlatformConfiguration\macOSSpecific\Page.cs (6)
11 public static readonly BindableProperty TabOrderProperty = BindableProperty.Create("TabOrder", typeof(VisualElement[]), typeof(Page), null); 14 public static VisualElement[] GetTabOrder(BindableObject element) 16 return (VisualElement[])element.GetValue(TabOrderProperty); 20 public static void SetTabOrder(BindableObject element, params VisualElement[] value) 26 public static VisualElement[] GetTabOrder(this IPlatformElementConfiguration<macOS, FormsElement> config) 32 public static IPlatformElementConfiguration<macOS, FormsElement> SetTabOrder(this IPlatformElementConfiguration<macOS, FormsElement> config, params VisualElement[] value)
PlatformConfiguration\TizenSpecific\VisualElement.cs (43)
9 using FormsElement = Maui.Controls.VisualElement; 72 public static string GetStyle(this IPlatformElementConfiguration<Tizen, FormsElement> config) 83 public static IPlatformElementConfiguration<Tizen, FormsElement> SetStyle(this IPlatformElementConfiguration<Tizen, FormsElement> config, string value) 114 public static bool? IsFocusAllowed(this IPlatformElementConfiguration<Tizen, FormsElement> config) 125 public static IPlatformElementConfiguration<Tizen, FormsElement> SetFocusAllowed(this IPlatformElementConfiguration<Tizen, FormsElement> config, bool value) 159 public static string GetNextFocusDirection(this IPlatformElementConfiguration<Tizen, FormsElement> config) 171 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusDirection(this IPlatformElementConfiguration<Tizen, FormsElement> config, string value) 182 public static IPlatformElementConfiguration<Tizen, FormsElement> MoveFocusUp(this IPlatformElementConfiguration<Tizen, FormsElement> config) 193 public static IPlatformElementConfiguration<Tizen, FormsElement> MoveFocusDown(this IPlatformElementConfiguration<Tizen, FormsElement> config) 204 public static IPlatformElementConfiguration<Tizen, FormsElement> MoveFocusLeft(this IPlatformElementConfiguration<Tizen, FormsElement> config) 215 public static IPlatformElementConfiguration<Tizen, FormsElement> MoveFocusRight(this IPlatformElementConfiguration<Tizen, FormsElement> config) 226 public static IPlatformElementConfiguration<Tizen, FormsElement> MoveFocusBack(this IPlatformElementConfiguration<Tizen, FormsElement> config) 237 public static IPlatformElementConfiguration<Tizen, FormsElement> MoveFocusForward(this IPlatformElementConfiguration<Tizen, FormsElement> config) 268 public static View GetNextFocusUpView(this IPlatformElementConfiguration<Tizen, FormsElement> config) 279 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusUpView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value) 310 public static View GetNextFocusDownView(this IPlatformElementConfiguration<Tizen, FormsElement> config) 321 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusDownView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value) 352 public static View GetNextFocusLeftView(this IPlatformElementConfiguration<Tizen, FormsElement> config) 363 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusLeftView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value) 394 public static View GetNextFocusRightView(this IPlatformElementConfiguration<Tizen, FormsElement> config) 405 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusRightView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value) 436 public static View GetNextFocusBackView(this IPlatformElementConfiguration<Tizen, FormsElement> config) 447 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusBackView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value) 478 public static View GetNextFocusForwardView(this IPlatformElementConfiguration<Tizen, FormsElement> config) 489 public static IPlatformElementConfiguration<Tizen, FormsElement> SetNextFocusForwardView(this IPlatformElementConfiguration<Tizen, FormsElement> config, View value) 525 public static string GetToolTip(this IPlatformElementConfiguration<Tizen, FormsElement> config) 536 public static IPlatformElementConfiguration<Tizen, FormsElement> SetToolTip(this IPlatformElementConfiguration<Tizen, FormsElement> config, string value)
PlatformConfiguration\WindowsSpecific\VisualElement.cs (19)
4 using FormsElement = Maui.Controls.VisualElement; 19 BindableProperty.Create("AccessKeyHorizontalOffset", typeof(double), typeof(FormsElement), 0.0); 23 BindableProperty.Create("AccessKeyVerticalOffset", typeof(double), typeof(FormsElement), 0.0); 38 public static string GetAccessKey(this IPlatformElementConfiguration<Windows, FormsElement> config) 44 public static IPlatformElementConfiguration<Windows, FormsElement> SetAccessKey( 45 this IPlatformElementConfiguration<Windows, FormsElement> config, string value) 62 public static AccessKeyPlacement GetAccessKeyPlacement(this IPlatformElementConfiguration<Windows, FormsElement> config) 68 public static IPlatformElementConfiguration<Windows, FormsElement> SetAccessKeyPlacement( 69 this IPlatformElementConfiguration<Windows, FormsElement> config, AccessKeyPlacement value) 85 public static double GetAccessKeyHorizontalOffset(this IPlatformElementConfiguration<Windows, FormsElement> config) 90 public static IPlatformElementConfiguration<Windows, FormsElement> SetAccessKeyHorizontalOffset( 91 this IPlatformElementConfiguration<Windows, FormsElement> config, double value) 107 public static double GetAccessKeyVerticalOffset(this IPlatformElementConfiguration<Windows, FormsElement> config) 112 public static IPlatformElementConfiguration<Windows, FormsElement> SetAccessKeyVerticalOffset( 113 this IPlatformElementConfiguration<Windows, FormsElement> config, double value) 123 typeof(FormsElement), true); 138 public static bool GetIsLegacyColorModeEnabled(this IPlatformElementConfiguration<Windows, FormsElement> config) 144 public static IPlatformElementConfiguration<Windows, FormsElement> SetIsLegacyColorModeEnabled( 145 this IPlatformElementConfiguration<Windows, FormsElement> config, bool value)
PointerGestureRecognizer.cs (1)
252 VisualElement element,
Properties\AssemblyInfo.cs (30)
84[assembly: StyleProperty("background-color", typeof(VisualElement), nameof(VisualElement.BackgroundColorProperty))] 85[assembly: StyleProperty("background", typeof(VisualElement), nameof(VisualElement.BackgroundProperty))] 101[assembly: StyleProperty("direction", typeof(VisualElement), nameof(VisualElement.FlowDirectionProperty), Inherited = true)] 105[assembly: StyleProperty("height", typeof(VisualElement), nameof(VisualElement.HeightRequestProperty))] 112[assembly: StyleProperty("min-height", typeof(VisualElement), nameof(VisualElement.MinimumHeightRequestProperty))] 113[assembly: StyleProperty("min-width", typeof(VisualElement), nameof(VisualElement.MinimumWidthRequestProperty))] 114[assembly: StyleProperty("opacity", typeof(VisualElement), nameof(VisualElement.OpacityProperty))] 123[assembly: StyleProperty("transform", typeof(VisualElement), nameof(VisualElement.TransformProperty))] 124[assembly: StyleProperty("transform-origin", typeof(VisualElement), nameof(VisualElement.TransformOriginProperty))] 126[assembly: StyleProperty("visibility", typeof(VisualElement), nameof(VisualElement.IsVisibleProperty), Inherited = true)] 127[assembly: StyleProperty("width", typeof(VisualElement), nameof(VisualElement.WidthRequestProperty))] 134[assembly: StyleProperty("align-self", typeof(VisualElement), nameof(FlexLayout.AlignSelfProperty), PropertyOwnerType = typeof(FlexLayout))] 136[assembly: StyleProperty("flex-basis", typeof(VisualElement), nameof(FlexLayout.BasisProperty), PropertyOwnerType = typeof(FlexLayout))] 137[assembly: StyleProperty("flex-grow", typeof(VisualElement), nameof(FlexLayout.GrowProperty), PropertyOwnerType = typeof(FlexLayout))] 138[assembly: StyleProperty("flex-shrink", typeof(VisualElement), nameof(FlexLayout.ShrinkProperty), PropertyOwnerType = typeof(FlexLayout))] 139[assembly: StyleProperty("flex-wrap", typeof(VisualElement), nameof(FlexLayout.WrapProperty), PropertyOwnerType = typeof(FlexLayout))] 141[assembly: StyleProperty("order", typeof(VisualElement), nameof(FlexLayout.OrderProperty), PropertyOwnerType = typeof(FlexLayout))] 159[assembly: StyleProperty("-maui-visual", typeof(VisualElement), nameof(VisualElement.VisualProperty))]
ScrollView\ScrollView.cs (5)
55 public Point GetScrollPositionForElement(VisualElement item, ScrollToPosition pos) 366 coordinate += (double)typeof(VisualElement).GetProperty(coordinateName).GetValue(item, null); 367 var visualParentElement = item.RealParent as VisualElement; 384 if (args.Mode == ScrollToMode.Element && args.Element is VisualElement visualElement)
SearchBar\SearchBar.Mapper.cs (1)
19 SearchBarHandler.Mapper.AppendToMapping(nameof(VisualElement.IsFocused), InputView.MapIsFocused);
Shell\BaseShellItem.cs (7)
210 OnPropertyChanged(VisualElement.VisualProperty.PropertyName); 286 var ve = (Parent as VisualElement); 288 OnPropertyChanged(VisualElement.FlowDirectionProperty.PropertyName); 293 double IFlowDirectionController.Width => (Parent as VisualElement)?.Width ?? 0; 403 Property = VisualElement.BackgroundColorProperty, 410 Property = VisualElement.BackgroundColorProperty,
Shell\SearchHandler.cs (2)
9using static Microsoft.Maui.Controls.VisualElement; 19 typeof(bool), typeof(VisualElement), default(bool), propertyChanged: OnIsFocusedPropertyChanged);
ShellToolbar.cs (1)
164 TitleView = _shell.GetEffectiveValue<VisualElement>(
StyleSheets\Style.cs (3)
63 public void Apply(VisualElement styleable, Selector.SelectorSpecificity selectorSpecificity = default, bool inheriting = false) 87 var ve = child as VisualElement;
StyleSheets\StyleSheet.cs (2)
95 Type IStyle.TargetType => typeof(VisualElement); 106 if (!(styleable is VisualElement visualStylable))
TitleBar\TitleBar.cs (1)
12 /// The title bar can also be hidden by setting the <see cref="VisualElement.IsVisible"/> property, which
Toolbar\Toolbar.cs (2)
13 VisualElement _titleView; 43 public virtual VisualElement TitleView { get => _titleView; set => SetProperty(ref _titleView, value); }
ViewExtensions.cs (35)
13 /// Extension methods for <see cref="VisualElement" />s, providing animatable scaling, rotation, and layout functions. 22 public static void CancelAnimations(this VisualElement view) 38 static Task<bool> AnimateTo(this VisualElement view, double start, double end, string name, 39 Action<VisualElement, double> updateAction, uint length = 250, Easing? easing = null) 46 var weakView = new WeakReference<VisualElement>(view); 50 if (weakView.TryGetTarget(out VisualElement? v)) 71 public static Task<bool> FadeTo(this VisualElement view, double opacity, uint length = 250, Easing? easing = null) 80 /// <summary>Returns a task that eases the bounds of the <see cref="VisualElement" /> that is specified by the <paramref name="view" /> 89 public static Task<bool> LayoutTo(this VisualElement view, Rect bounds, uint length = 250, Easing? easing = null) 109 /// Rotates the <see cref="VisualElement" /> that is specified by <paramref name="view" /> from its current rotation by <paramref name="drotation" />. 117 public static Task<bool> RelRotateTo(this VisualElement view, double drotation, uint length = 250, Easing? easing = null) 126 /// Returns a task that scales the <see cref="VisualElement" /> that is specified by <paramref name="view" /> 135 public static Task<bool> RelScaleTo(this VisualElement view, double dscale, uint length = 250, Easing? easing = null) 144 /// Returns a task that rotates the <see cref="VisualElement" /> that is specified by <paramref name="view" /> 153 public static Task<bool> RotateTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null) 162 /// Returns a task that skews the X axis of the the <see cref="VisualElement" /> that is specified by <paramref name="view" /> 171 public static Task<bool> RotateXTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null) 180 /// Returns a task that skews the Y axis of the the <see cref="VisualElement" /> that is specified by <paramref name="view" /> 189 public static Task<bool> RotateYTo(this VisualElement view, double rotation, uint length = 250, Easing? easing = null) 198 /// Returns a task that scales the <see cref="VisualElement" /> that is specified by <paramref name="view" /> to the absolute scale factor <paramref name="scale" />. 206 public static Task<bool> ScaleTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null) 215 /// Returns a task that scales the X axis of the the <see cref="VisualElement" /> that is specified by <paramref name="view" /> 224 public static Task<bool> ScaleXTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null) 233 /// Returns a task that scales the Y axis of the the <see cref="VisualElement" /> that is specified by <paramref name="view" /> 242 public static Task<bool> ScaleYTo(this VisualElement view, double scale, uint length = 250, Easing? easing = null) 251 /// Animates an elements <see cref="VisualElement.TranslationX"/> and <see cref="VisualElement.TranslationY"/> properties 261 public static Task<bool> TranslateTo(this VisualElement view, double x, double y, uint length = 250, Easing? easing = null) 269 var weakView = new WeakReference<VisualElement>(view); 272 if (weakView.TryGetTarget(out VisualElement? v)) 277 if (weakView.TryGetTarget(out VisualElement? v)) 462 static internal bool RequestFocus(this VisualElement view) 474 static internal void MapFocus(this VisualElement view, FocusRequest focusRequest, Action? baseMethod = null) 486 var arg = new VisualElement.FocusRequestArgs { Focus = true }; 533 public static void InvalidateMeasure(this VisualElement view)
VisualElement\VisualElement.cs (71)
36 nameof(InputTransparent), typeof(bool), typeof(VisualElement), default(bool), 43 typeof(VisualElement), true, propertyChanged: OnIsEnabledPropertyChanged, coerceValue: CoerceIsEnabledProperty); 45 static readonly BindablePropertyKey XPropertyKey = BindableProperty.CreateReadOnly(nameof(X), typeof(double), typeof(VisualElement), default(double)); 50 static readonly BindablePropertyKey YPropertyKey = BindableProperty.CreateReadOnly(nameof(Y), typeof(double), typeof(VisualElement), default(double)); 56 public static readonly BindableProperty AnchorXProperty = BindableProperty.Create(nameof(AnchorX), typeof(double), typeof(VisualElement), .5d); 59 public static readonly BindableProperty AnchorYProperty = BindableProperty.Create(nameof(AnchorY), typeof(double), typeof(VisualElement), .5d); 62 public static readonly BindableProperty TranslationXProperty = BindableProperty.Create(nameof(TranslationX), typeof(double), typeof(VisualElement), 0d); 65 public static readonly BindableProperty TranslationYProperty = BindableProperty.Create(nameof(TranslationY), typeof(double), typeof(VisualElement), 0d); 67 static readonly BindablePropertyKey WidthPropertyKey = BindableProperty.CreateReadOnly(nameof(Width), typeof(double), typeof(VisualElement), -1d, 73 static readonly BindablePropertyKey HeightPropertyKey = BindableProperty.CreateReadOnly(nameof(Height), typeof(double), typeof(VisualElement), -1d, 80 public static readonly BindableProperty RotationProperty = BindableProperty.Create(nameof(Rotation), typeof(double), typeof(VisualElement), default(double)); 83 public static readonly BindableProperty RotationXProperty = BindableProperty.Create(nameof(RotationX), typeof(double), typeof(VisualElement), default(double)); 86 public static readonly BindableProperty RotationYProperty = BindableProperty.Create(nameof(RotationY), typeof(double), typeof(VisualElement), default(double)); 89 public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(double), typeof(VisualElement), 1d); 92 public static readonly BindableProperty ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(double), typeof(VisualElement), 1d); 95 public static readonly BindableProperty ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(double), typeof(VisualElement), 1d); 97 internal static readonly BindableProperty TransformProperty = BindableProperty.Create("Transform", typeof(string), typeof(VisualElement), null, propertyChanged: OnTransformChanged); 100 public static readonly BindableProperty ClipProperty = BindableProperty.Create(nameof(Clip), typeof(Geometry), typeof(VisualElement), null, 104 (bindable as VisualElement)?.StopNotifyingClipChanges(); 109 (bindable as VisualElement)?.NotifyClipChanges(); 174 BindableProperty.Create(nameof(Visual), typeof(IVisual), typeof(VisualElement), VisualMarker.MatchParent, 268 BindableProperty.Create("TransformOrigin", typeof(Point), typeof(VisualElement), new Point(.5d, .5d), 269 propertyChanged: (b, o, n) => { (((VisualElement)b).AnchorX, ((VisualElement)b).AnchorY) = (Point)n; }); 272 public static readonly BindableProperty IsVisibleProperty = BindableProperty.Create(nameof(IsVisible), typeof(bool), typeof(VisualElement), true, 273 propertyChanged: (bindable, oldvalue, newvalue) => ((VisualElement)bindable).OnIsVisibleChanged((bool)oldvalue, (bool)newvalue)); 276 public static readonly BindableProperty OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(double), typeof(VisualElement), 1d, coerceValue: (bindable, value) => ((double)value).Clamp(0, 1)); 279 public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(VisualElement), null); 282 public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(Brush), typeof(VisualElement), Brush.Default, 288 (bindable as VisualElement)?.StopNotifyingBackgroundChanges(); 295 (bindable as VisualElement)?.NotifyBackgroundChanges(); 391 internal static readonly BindablePropertyKey BehaviorsPropertyKey = BindableProperty.CreateReadOnly(nameof(Behaviors), typeof(IList<Behavior>), typeof(VisualElement), default(IList<Behavior>), 402 internal static readonly BindablePropertyKey TriggersPropertyKey = BindableProperty.CreateReadOnly(nameof(Triggers), typeof(IList<TriggerBase>), typeof(VisualElement), default(IList<TriggerBase>), 416 public static readonly BindableProperty WidthRequestProperty = BindableProperty.Create(nameof(WidthRequest), typeof(double), typeof(VisualElement), -1d, propertyChanged: OnRequestChanged); 419 public static readonly BindableProperty HeightRequestProperty = BindableProperty.Create(nameof(HeightRequest), typeof(double), typeof(VisualElement), -1d, propertyChanged: OnRequestChanged); 422 public static readonly BindableProperty MinimumWidthRequestProperty = BindableProperty.Create(nameof(MinimumWidthRequest), typeof(double), typeof(VisualElement), -1d, propertyChanged: OnRequestChanged); 425 public static readonly BindableProperty MinimumHeightRequestProperty = BindableProperty.Create(nameof(MinimumHeightRequest), typeof(double), typeof(VisualElement), -1d, propertyChanged: OnRequestChanged); 428 public static readonly BindableProperty MaximumWidthRequestProperty = BindableProperty.Create(nameof(MaximumWidthRequest), typeof(double), typeof(VisualElement), double.PositiveInfinity, propertyChanged: OnRequestChanged); 431 public static readonly BindableProperty MaximumHeightRequestProperty = BindableProperty.Create(nameof(MaximumHeightRequest), typeof(double), typeof(VisualElement), double.PositiveInfinity, propertyChanged: OnRequestChanged); 437 typeof(bool), typeof(VisualElement), default(bool), propertyChanged: OnIsFocusedPropertyChanged); 443 public static readonly BindableProperty FlowDirectionProperty = BindableProperty.Create(nameof(FlowDirection), typeof(FlowDirection), typeof(VisualElement), FlowDirection.MatchParent, propertyChanging: FlowDirectionChanging, propertyChanged: FlowDirectionChanged); 481 nameof(Window), typeof(Window), typeof(VisualElement), null, propertyChanged: OnWindowChanged); 522 /// Initializes a new instance of the <see cref="VisualElement"/> class. 654 var parent = Parent as VisualElement; 969 var visualElement = parent as VisualElement; 1058 BatchCommitted?.Invoke(this, new EventArg<VisualElement>(this)); 1342 public event EventHandler<EventArg<VisualElement>> BatchCommitted; 1414 (Parent as VisualElement)?.OnChildMeasureInvalidatedInternal(this, args.Trigger, ++depth); 1422 internal virtual void OnChildMeasureInvalidatedInternal(VisualElement child, InvalidationTrigger trigger, int depth) 1608 (self as IPropertyPropagationController)?.PropagatePropertyChanged(VisualElement.VisualProperty.PropertyName); 1620 if (self is VisualElement ve) 1628 (bindable as IPropertyPropagationController)?.PropagatePropertyChanged(VisualElement.FlowDirectionProperty.PropertyName); 1633 if (bindable is VisualElement visualElement) 1644 var element = (VisualElement)bindable; 1651 (bindable as IPropertyPropagationController)?.PropagatePropertyChanged(VisualElement.IsEnabledProperty.PropertyName); 1656 if (bindable is VisualElement visualElement) 1667 (bindable as IPropertyPropagationController)?.PropagatePropertyChanged(VisualElement.InputTransparentProperty.PropertyName); 1672 var element = (VisualElement)bindable; 1695 var element = (VisualElement)bindable; 1717 ((VisualElement)bindable).InvalidateMeasureInternal(InvalidationTrigger.SizeRequestChanged); 1753 (this as IPropertyPropagationController)?.PropagatePropertyChanged(VisualElement.InputTransparentProperty.PropertyName); 1838 BindableProperty.Create(nameof(Shadow), typeof(Shadow), typeof(VisualElement), defaultValue: null, 1842 (bindable as VisualElement)?.StopNotifyingShadowChanges(); 1847 (bindable as VisualElement)?.NotifyShadowChanges(); 1861 BindableProperty.Create(nameof(ZIndex), typeof(int), typeof(VisualElement), default(int), 2290 if (bindable is not VisualElement visualElement)
VisualElement\VisualElement.Mapper.cs (8)
32 viewMapper.AppendToMapping<VisualElement, IViewHandler>(nameof(IViewHandler.ContainerView), MapContainerView); 34 commandMapper.ModifyMapping<VisualElement, IViewHandler>(nameof(IView.Focus), MapFocus); 44 (element as VisualElement)?.UpdateSemanticsFromMapper(); 47 (element as VisualElement)?.UpdateSemanticsFromMapper(); 50 (element as VisualElement)?.UpdateSemanticsFromMapper(); 58 static void MapContainerView(IViewHandler handler, VisualElement element) => 61 static void MapFocus(IViewHandler handler, VisualElement view, object args, Action<IElementHandler, IElement, object> baseMethod) 63 if (args is not FocusRequest fr || view is not VisualElement element)
VisualElement\VisualElementChangedEventArgs.cs (3)
5 public class VisualElementChangedEventArgs : ElementChangedEventArgs<VisualElement> 7 public VisualElementChangedEventArgs(VisualElement? oldElement, VisualElement? newElement) : base(oldElement, newElement)
VisualStateManager.cs (18)
26 BindableProperty.CreateAttached("VisualStateGroups", typeof(VisualStateGroupList), typeof(VisualElement), 28 defaultValueCreator: bindable => new VisualStateGroupList(true) { VisualElement = (VisualElement)bindable }); 46 var visualElement = (VisualElement)bindable; 57 public static IList<VisualStateGroup> GetVisualStateGroups(VisualElement visualElement) 61 public static void SetVisualStateGroups(VisualElement visualElement, VisualStateGroupList value) 65 public static bool GoToState(VisualElement visualElement, string name) 125 public static bool HasVisualStateGroups(this VisualElement element) 136 internal static void UpdateStateTriggers(VisualElement visualElement) 326 WeakReference<VisualElement> _visualElement; 327 internal VisualElement VisualElement 333 _visualElement.TryGetTarget(out var ve); 338 _visualElement = new WeakReference<VisualElement>(value); 400 WeakReference<VisualElement> _visualElement; 401 internal VisualElement VisualElement 407 _visualElement.TryGetTarget(out var ve); 412 _visualElement = new WeakReference<VisualElement>(value); 708 internal static bool HasVisualState(this VisualElement element, string name)
Window\Window.cs (1)
355 double IFlowDirectionController.Width => (Page as VisualElement)?.Width ?? 0;
Microsoft.Maui.Controls.Compatibility (228)
iOS\Cells\CellRenderer.cs (1)
99 if (cell.RealParent is VisualElement element && element.BackgroundColor != null)
iOS\Cells\EntryCellRenderer.cs (1)
76 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName)
iOS\Cells\SwitchCellRenderer.cs (1)
79 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName)
iOS\CollectionView\CarouselViewController.cs (1)
56 var element = (cell as TemplatedCell)?.VisualElementRenderer?.Element;
iOS\CollectionView\ItemsViewController.cs (5)
27 VisualElement _emptyViewFormsElement; 385 protected void RemeasureLayout(VisualElement formsElement) 401 if (sender is VisualElement formsElement) 407 protected virtual void HandleFormsElementMeasureInvalidated(VisualElement formsElement) 412 internal void UpdateView(object view, DataTemplate viewTemplate, ref UIView uiView, ref VisualElement formsElement)
iOS\CollectionView\ItemsViewRenderer.cs (2)
73 else if (changedProperty.Is(VisualElement.FlowDirectionProperty)) 77 else if (changedProperty.Is(VisualElement.IsVisibleProperty))
iOS\CollectionView\StructuredItemsViewController.cs (4)
18 VisualElement _headerViewFormsElement; 21 VisualElement _footerViewFormsElement; 117 internal void UpdateSubview(object view, DataTemplate viewTemplate, nint viewTag, ref UIView uiView, ref VisualElement formsElement) 224 protected override void HandleFormsElementMeasureInvalidated(VisualElement formsElement)
iOS\CollectionView\TemplatedCell.cs (3)
99 var oldElement = VisualElementRenderer?.Element; 223 if (setter.Property.PropertyName == VisualElement.BackgroundColorProperty.PropertyName) 294 var element = VisualElementRenderer?.Element;
iOS\CollectionView\TemplateHelpers.cs (1)
27 public static (UIView NativeView, VisualElement FormsElement) RealizeView(object view, DataTemplate viewTemplate, ItemsView itemsView)
iOS\ContextActionCell.cs (1)
406 var renderer = Platform.GetRenderer((VisualElement)e.RealParent);
iOS\DisposeHelpers.cs (2)
18 if (child is VisualElement ve) 31 if (view is VisualElement visualElement)
iOS\Extensions\VisualElementExtensions.cs (2)
10 public static IVisualElementRenderer GetRenderer(this VisualElement self) 17 internal static bool UseLegacyColorManagement<T>(this T element) where T : VisualElement, IElementConfiguration<T>
iOS\Forms.cs (1)
184 internal static void SendViewInitialized(this VisualElement self, TNativeView nativeView)
iOS\HandlerToRendererShim.cs (4)
21 public VisualElement Element { get; private set; } 35 public void SetElement(VisualElement element) 37 var oldElement = Element; 62 void OnBatchCommitted(object sender, EventArg<VisualElement> e)
iOS\IVisualElementRenderer.cs (2)
20 VisualElement Element { get; } 30 void SetElement(VisualElement element);
iOS\Platform.cs (8)
32 var view = bindable as VisualElement; 216 public static SizeRequest GetNativeSize(VisualElement view, double widthConstraint, double heightConstraint) 239 public static IVisualElementRenderer CreateRenderer(VisualElement element) 301 public static IVisualElementRenderer GetRenderer(VisualElement bindable) 306 public static void SetRenderer(VisualElement bindable, IVisualElementRenderer value) 392 void AddChild(VisualElement view) 595 internal class DefaultRenderer : VisualElementRenderer<VisualElement>
iOS\RendererPool.cs (9)
17 readonly VisualElement _oldElement; 21 public RendererPool(IVisualElementRenderer renderer, VisualElement oldElement) 33 public IVisualElementRenderer GetFreeRenderer(VisualElement view) 49 public void UpdateNewElement(VisualElement newElement) 107 void FillChildrenWithRenderers(VisualElement element) 111 var child = logicalChild as VisualElement; 156 var element = newElementController.LogicalChildren[x] as VisualElement;
iOS\Renderers\BoxRenderer.cs (1)
82 else if (e.PropertyName == VisualElement.IsVisibleProperty.PropertyName && Element.IsVisible)
iOS\Renderers\CarouselPageRenderer.cs (8)
49 public VisualElement Element { get; private set; } 63 public void SetElement(VisualElement element) 65 VisualElement oldElement = Element; 304 else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || e.PropertyName == VisualElement.BackgroundProperty.PropertyName) 391 public CarouselPageContainer(VisualElement element) 396 public VisualElement Element { get; } 409 VisualElementRenderer<VisualElement>.RegisterEffect(effect, View);
iOS\Renderers\DatePickerRenderer.cs (4)
144 else if (e.PropertyName == DatePicker.TextColorProperty.PropertyName || e.PropertyName == VisualElement.IsEnabledProperty.PropertyName) 146 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName) 167 ElementController.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false); 173 ElementController.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, true);
iOS\Renderers\EditorRenderer.cs (4)
243 else if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName || e.PropertyName == Microsoft.Maui.Controls.InputView.IsReadOnlyProperty.PropertyName) 255 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName) 292 Element.SetValue(VisualElement.IsFocusedPropertyKey, false); 299 ElementController.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, true);
iOS\Renderers\EntryRenderer.cs (4)
191 else if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName) 198 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName) 226 ElementController.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, true); 250 ElementController.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false);
iOS\Renderers\FrameRenderer.cs (3)
49 if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || 50 e.PropertyName == VisualElement.BackgroundProperty.PropertyName || 55 e.PropertyName == VisualElement.IsVisibleProperty.PropertyName)
iOS\Renderers\ImageElementManager.cs (3)
114 var Element = renderer.Element; 131 var Element = renderer.Element; 150 var Element = renderer.Element;
iOS\Renderers\IndicatorViewRenderer.cs (2)
125 ? (UIView)(Element.IndicatorLayout as VisualElement).GetRenderer() 161 if (Element.IndicatorLayout is not VisualElement indicatorLayout)
iOS\Renderers\LabelRenderer.cs (1)
229 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName)
iOS\Renderers\ListViewRenderer.cs (16)
74 var e = _headerRenderer.Element; 96 var e = _footerRenderer.Element; 228 var headerView = ListView?.HeaderElement as VisualElement; 233 var footerView = ListView?.FooterElement as VisualElement; 251 var headerView = (VisualElement)listView.HeaderElement; 255 var footerView = (VisualElement)listView.FooterElement; 404 var footerView = (VisualElement)sender; 426 var headerView = (VisualElement)sender; 959 IVisualElementRenderer renderer = Platform.GetRenderer(descendant as VisualElement); 998 var element = _prototype.Element;
iOS\Renderers\NavigationRenderer.cs (5)
61 public VisualElement Element { get; private set; } 75 public void SetElement(VisualElement element) 77 var oldElement = Element; 462 else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName) 1513 VisualElementRenderer<VisualElement>.RegisterEffect(effect, View);
iOS\Renderers\PageRenderer.cs (6)
43 VisualElementRenderer<VisualElement>.RegisterEffect(effect, NativeView); 46 public VisualElement Element { get; private set; } 60 public void SetElement(VisualElement element) 62 VisualElement oldElement = Element; 280 if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || e.PropertyName == VisualElement.BackgroundProperty.PropertyName)
iOS\Renderers\PhoneFlyoutPageRenderer.cs (6)
65 public VisualElement Element { get; private set; } 79 public void SetElement(VisualElement element) 81 var oldElement = Element; 251 else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || e.PropertyName == VisualElement.BackgroundProperty.PropertyName) 548 VisualElementRenderer<VisualElement>.RegisterEffect(effect, View);
iOS\Renderers\PickerRenderer.cs (4)
150 else if (e.PropertyName == Picker.TextColorProperty.PropertyName || e.PropertyName == VisualElement.IsEnabledProperty.PropertyName) 157 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName) 180 ElementController.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false); 186 ElementController.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, true);
iOS\Renderers\RefreshViewRenderer.cs (3)
86 if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName) 90 else if (e.IsOneOf(RefreshView.RefreshColorProperty, VisualElement.BackgroundColorProperty)) 273 VisualElementRenderer<VisualElement>.RegisterEffect(effect, this, NativeView);
iOS\Renderers\ScrollViewRenderer.cs (8)
44 public VisualElement Element { get; private set; } 58 public void SetElement(VisualElement element) 61 var oldElement = Element; 212 else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName) 214 else if (e.PropertyName == VisualElement.BackgroundProperty.PropertyName) 216 else if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName) 280 var positionOnScroll = ScrollView.GetScrollPositionForElement(e.Element as VisualElement, e.Position); 345 VisualElementRenderer<VisualElement>.RegisterEffect(effect, this, NativeView);
iOS\Renderers\SearchBarRenderer.cs (5)
110 else if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName) 138 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName) 185 size.Width = (nfloat)(Element?.Parent is VisualElement parent ? parent.Width : DeviceDisplay.MainDisplayInfo.GetScaledScreenSize().Width); 216 ElementController?.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false); 221 ElementController?.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, true);
iOS\Renderers\SwipeViewRenderer.cs (2)
160 else if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName) 347 if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName)
iOS\Renderers\TabbedRenderer.cs (6)
54 public VisualElement Element { get; private set; } 68 public void SetElement(VisualElement element) 70 var oldElement = Element; 318 var v = child as VisualElement; 463 VisualElementRenderer<VisualElement>.RegisterEffect(effect, View);
iOS\Renderers\TabletFlyoutPageRenderer.cs (7)
195 public VisualElement Element { get; private set; } 209 public void SetElement(VisualElement element) 211 var oldElement = Element; 453 else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || e.PropertyName == VisualElement.BackgroundProperty.PropertyName) 455 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName) 590 VisualElementRenderer<VisualElement>.RegisterEffect(effect, View);
iOS\Renderers\TableViewRenderer.cs (2)
121 else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName || e.PropertyName == VisualElement.BackgroundProperty.PropertyName)
iOS\Renderers\TimePickerRenderer.cs (4)
151 else if (e.PropertyName == TimePicker.TextColorProperty.PropertyName || e.PropertyName == VisualElement.IsEnabledProperty.PropertyName) 158 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName) 165 ElementController.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, false); 171 ElementController.SetValueFromRenderer(VisualElement.IsFocusedPropertyKey, true);
iOS\Renderers\WkWebViewRenderer.cs (4)
76 public VisualElement Element { get; private set; } 85 public void SetElement(VisualElement element) 87 var oldElement = Element; 942 VisualElementRenderer<VisualElement>.RegisterEffect(effect, this, NativeView);
iOS\Shapes\RectangleRenderer.cs (2)
40 if (args.PropertyName == VisualElement.HeightProperty.PropertyName || args.PropertyName == VisualElement.WidthProperty.PropertyName)
iOS\Shapes\ShapeRenderer.cs (2)
59 if (args.PropertyName == VisualElement.HeightProperty.PropertyName) 64 else if (args.PropertyName == VisualElement.WidthProperty.PropertyName)
iOS\ViewInitializedEventArgs.cs (1)
15 public VisualElement View { get; internal set; }
iOS\ViewRenderer.cs (6)
159 if (e.PropertyName == VisualElement.IsEnabledProperty.PropertyName) 161 else if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName) 163 else if (e.PropertyName == VisualElement.BackgroundProperty.PropertyName) 165 else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName) 265 internal override void SendVisualElementInitialized(VisualElement element, NativeView nativeView) 312 void ViewOnFocusChangeRequested(object sender, VisualElement.FocusRequestArgs focusRequestArgs)
iOS\VisualElementPackager.cs (19)
16 VisualElement _element; 26 VisualElementPackager(IVisualElementRenderer renderer, VisualElement element, bool isHeadless = false) 49 var child = ElementController.LogicalChildren[i] as VisualElement; 60 void Disconnect(VisualElement oldElement) 81 var child = ElementController.LogicalChildren[i] as VisualElement; 104 protected virtual void OnChildAdded(VisualElement view) 132 protected virtual void OnChildRemoved(VisualElement view) 153 var child = ElementController.LogicalChildren[z] as VisualElement; 171 var view = e.Element as VisualElement; 178 var view = e.Element as VisualElement; 191 void SetElement(VisualElement oldElement, VisualElement newElement) 217 var child = elementController.LogicalChildren[i] as VisualElement;
iOS\VisualElementRenderer.cs (6)
39 public class VisualElementRenderer<TElement> : NativeView, IVisualElementRenderer, IEffectControlProvider where TElement : VisualElement 138 VisualElement IVisualElementRenderer.Element 161 void IVisualElementRenderer.SetElement(VisualElement element) 331 if (e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName) 333 else if (e.PropertyName == VisualElement.BackgroundProperty.PropertyName) 448 internal virtual void SendVisualElementInitialized(VisualElement element, NativeView nativeView)
iOS\VisualElementTracker.cs (28)
25 readonly EventHandler<EventArg<VisualElement>> _batchCommittedHandler; 30 VisualElement _element; 75 void Disconnect(VisualElement oldElement) 109 if (TrackFrame && (e.PropertyName == VisualElement.XProperty.PropertyName || 110 e.PropertyName == VisualElement.YProperty.PropertyName || 111 e.PropertyName == VisualElement.WidthProperty.PropertyName || 112 e.PropertyName == VisualElement.HeightProperty.PropertyName)) 116 else if (e.PropertyName == VisualElement.AnchorXProperty.PropertyName || 117 e.PropertyName == VisualElement.AnchorYProperty.PropertyName || 118 e.PropertyName == VisualElement.TranslationXProperty.PropertyName || 119 e.PropertyName == VisualElement.TranslationYProperty.PropertyName || 120 e.PropertyName == VisualElement.ScaleProperty.PropertyName || 121 e.PropertyName == VisualElement.ScaleXProperty.PropertyName || 122 e.PropertyName == VisualElement.ScaleYProperty.PropertyName || 123 e.PropertyName == VisualElement.RotationProperty.PropertyName || 124 e.PropertyName == VisualElement.RotationXProperty.PropertyName || 125 e.PropertyName == VisualElement.RotationYProperty.PropertyName || 126 e.PropertyName == VisualElement.IsVisibleProperty.PropertyName || 127 e.PropertyName == VisualElement.IsEnabledProperty.PropertyName || 128 e.PropertyName == VisualElement.InputTransparentProperty.PropertyName || 129 e.PropertyName == VisualElement.OpacityProperty.PropertyName || 134 else if (e.PropertyName == VisualElement.ClipProperty.PropertyName) 160 var view = Renderer.Element; 223 var visualElement = view; 360 void SetElement(VisualElement oldElement, VisualElement newElement) 413 var element = Renderer.Element; 459 var element = Renderer?.Element;
Properties\AssemblyInfo.cs (6)
21[assembly: StyleProperty("align-self", typeof(VisualElement), nameof(CFlexLayout.AlignSelfProperty), PropertyOwnerType = typeof(CFlexLayout))] 23[assembly: StyleProperty("flex-basis", typeof(VisualElement), nameof(CFlexLayout.BasisProperty), PropertyOwnerType = typeof(CFlexLayout))] 24[assembly: StyleProperty("flex-grow", typeof(VisualElement), nameof(CFlexLayout.GrowProperty), PropertyOwnerType = typeof(CFlexLayout))] 25[assembly: StyleProperty("flex-shrink", typeof(VisualElement), nameof(CFlexLayout.ShrinkProperty), PropertyOwnerType = typeof(CFlexLayout))] 26[assembly: StyleProperty("flex-wrap", typeof(VisualElement), nameof(CFlexLayout.WrapProperty), PropertyOwnerType = typeof(CFlexLayout))] 28[assembly: StyleProperty("order", typeof(VisualElement), nameof(CFlexLayout.OrderProperty), PropertyOwnerType = typeof(CFlexLayout))]
RendererToHandlerShim.cs (2)
152 (VisualElement)view, 157 VisualElementRenderer.SetElement((VisualElement)view);
Microsoft.Maui.Controls.Foldable (13)
DualScreenInfo.cs (3)
52 internal VisualElement Element { get; } 66 public DualScreenInfo(VisualElement element) : this(element, null) 70 internal DualScreenInfo(VisualElement element, IFoldableService dualScreenService)
NoPlatformFoldableService.cs (5)
56 public Point? GetLocationOnScreen(VisualElement visualElement) 61 public object WatchForChangesOnLayout(VisualElement visualElement, Action action) 66 EventHandler<EventArg<VisualElement>> layoutUpdated = (_, __) => 75 public void StopWatchingForChangesOnLayout(VisualElement visualElement, object handle) 77 if (handle is EventHandler<EventArg<VisualElement>> handler)
SpanModeStateTrigger.cs (2)
14 VisualElement _visualElement; 43 var visualElement = VisualState?.VisualStateGroup?.VisualElement;
TwoPaneViewLayoutGuide.cs (3)
37 VisualElement _layout; 47 public TwoPaneViewLayoutGuide(VisualElement layout) : this(layout, null) 51 internal TwoPaneViewLayoutGuide(VisualElement layout, IFoldableService dualScreenService)