113 instantiations of Rect
Microsoft.Maui (14)
Animations\AnimationLerpingExtensions.cs (1)
36 => new Rect(start.Location.Lerp(end.Location, progress), start.Size.Lerp(end.Size, progress));
Core\Extensions\VisualTreeElementExtensions.cs (1)
86 GetVisualTreeElements(visualElement, new Rect(x1, y1, x2 - x1, y2 - y1));
Extensions\IndicatorViewExtensions.cs (1)
36 var path = sH.PathForBounds(new Rect(0, 0, 6, 6));
Graphics\RectangleExtensions.cs (1)
17 return new Rect(rectangle.Left + inset, rectangle.Top + inset,
Layouts\GridLayoutManager.cs (1)
280 return new Rect(left + xOffset, top + yOffset, width, height);
Layouts\HorizontalStackLayoutManager.cs (1)
83 var destination = new Rect(x, top, child.DesiredSize.Width, height);
Layouts\LayoutExtensions.cs (2)
69 return new Rect(frameX, frameY, frameWidth, frameHeight); 179 var targetBounds = new Rect(bounds.Left + padding.Left, bounds.Top + padding.Top,
Layouts\VerticalStackLayoutManager.cs (1)
63 var destination = new Rect(left, stackHeight, width, child.DesiredSize.Height);
VisualDiagnostics\AdornerModel.cs (5)
48 Rect rc = new Rect(); 59 Rect rc = new Rect(); 70 Rect rc = new Rect(); 81 Rect rc = new Rect(); 137 return new Rect(left, top, right - left, bottom - top);
Microsoft.Maui.Controls (45)
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (4)
115 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height)); 143 view.Arrange(new Rect(Element.X, Element.Y, View.Bounds.Width, View.Bounds.Height)); 472 FlyoutPageController.FlyoutBounds = new Rect(flyoutFrame.X, 0, flyoutFrame.Width, flyoutFrame.Height); 473 FlyoutPageController.DetailBounds = new Rect(detailsFrame.X, 0, frame.Width, frame.Height);
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (1)
2005 Rect layoutBounds = new Rect(IconWidth, 0, Bounds.Width - IconWidth, height);
Compatibility\Handlers\Shell\iOS\ShellFlyoutLayoutManager.cs (1)
335 var contentFrame = new Rect(parentBounds.X, contentYOffset, parentBounds.Width, parentBounds.Height - contentYOffset - footerHeight);
Compatibility\Handlers\Shell\iOS\ShellRenderer.cs (1)
136 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height));
Compatibility\Handlers\Shell\iOS\UIContainerView.cs (1)
125 var platformFrame = new Rect(0, 0, width, height);
ContentPresenter.cs (1)
47 child?.Arrange(new Rect(x, y, width, height));
Handlers\Items\iOS\ItemsViewController.cs (2)
555 formsElement.Arrange(new Rect(0, 0, request.Width, CollectionView.Frame.Height)); 560 formsElement.Arrange(new Rect(0, 0, CollectionView.Frame.Width, request.Height));
Layout\AbsoluteLayout.cs (2)
30 typeof(Rect), typeof(AbsoluteLayout), new Rect(0, 0, AutoSize, AutoSize), propertyChanged: LayoutBoundsPropertyChanged); 159 LayoutBounds = new Rect(0, 0, AutoSize, AutoSize);
Layout\BoundsTypeConverter.cs (2)
48 return new Rect(x, y, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize); 50 return new Rect(x, y, w, h);
Layout\FlexExtensions.cs (1)
11 return new Rect(item.Frame[0], item.Frame[1], item.Frame[2], item.Frame[3]);
LegacyLayouts\AbsoluteLayout.cs (3)
21 public static readonly BindableProperty LayoutBoundsProperty = BindableProperty.CreateAttached("LayoutBounds", typeof(Rect), typeof(AbsoluteLayout), new Rect(0, 0, AutoSize, AutoSize)); 232 var result = new Rect(); 329 SetLayoutBounds(view, new Rect(position.X, position.Y, AutoSize, AutoSize));
LegacyLayouts\GridCalc.cs (1)
48 LayoutChildIntoBoundingRegion(child, new Rect(posx, posy, w, h));
LegacyLayouts\Layout.cs (2)
227 region = new Rect(parent.Width - region.Right, region.Y, region.Width, region.Height); 493 region = new Rect(parent.Width - region.Right, region.Y, region.Width, region.Height);
LegacyLayouts\RelativeLayout.cs (4)
210 MockBounds(new Rect(0, 0, mockWidth, mockHeight)); 212 var boundsRectangle = new Rect(); 324 BoundsConstraint bounds = BoundsConstraint.FromExpression(() => new Rect(x(), y(), width(), height()), parents.Distinct().ToArray()); 383 BoundsConstraint bounds = BoundsConstraint.FromExpression(() => new Rect(xCompiled(), yCompiled(), widthCompiled(), heightCompiled()), fromExpression: true, parents: parents.Distinct().ToArray());
LegacyLayouts\StackLayout.cs (3)
175 var bounds = new Rect(x, yOffset, request.Request.Width, request.Request.Height); 210 var bounds = new Rect(xOffset, y, request.Request.Width, request.Request.Height); 226 layout.Bounds = new Rect(x, y, boundsWidth, boundsHeight);
Page\Page.cs (1)
417 var area = new Rect(x, y, width, height);
Platform\iOS\ControlsModalWrapper.cs (1)
138 _modal?.PlatformArrange(new Rect(0, 0, View!.Bounds.Width, View.Bounds.Height));
Platform\iOS\Extensions\FormattedStringExtensions.cs (1)
254 rects.Add(new Rect(r.X, r.Y, r.Width, r.Height));
Region.cs (4)
47 positions.Add(new Rect(startX, lineHeightTotal, maxWidth - startX, lineHeights[i])); 50 positions.Add(new Rect(0, lineHeightTotal, maxWidth, lineHeights[i])); 53 positions.Add(new Rect(0, lineHeightTotal, endX, lineHeights[i])); 58 positions.Add(new Rect(startX, lineHeightTotal, endX - startX, lineHeights[i]));
ScrollView\ScrollView.cs (2)
61 var scrollBounds = new Rect(ScrollX, ScrollY, Width, Height); 62 var itemBounds = new Rect(x, y, item.Width, item.Height);
Shapes\RectangleGeometry.cs (1)
24 BindableProperty.Create(nameof(Rect), typeof(Rect), typeof(RectangleGeometry), new Rect());
Shapes\RoundRectangleGeometry.cs (1)
26 BindableProperty.Create(nameof(Rect), typeof(Rect), typeof(RoundRectangleGeometry), new Rect(),
TemplatedView\TemplatedView.cs (1)
42 LayoutChildIntoBoundingRegion(child, new Rect(x, y, width, height));
ViewExtensions.cs (1)
102 return new Rect(x, y, w, h);
VisualElement\VisualElement.cs (2)
579 get { return IsMocked() ? new Rect(_mockX, _mockY, _mockWidth, _mockHeight) : _frame; } 1776 Rect _frame = new Rect(0, 0, -1, -1);
Window\Window.cs (1)
214 if (new Rect(X, Y, Width, Height) == frame)
Microsoft.Maui.Controls.Compatibility (32)
iOS\CollectionView\ItemsViewController.cs (2)
390 Controls.Compatibility.Layout.LayoutChildIntoBoundingRegion(formsElement, new Rect(0, 0, request.Request.Width, CollectionView.Frame.Height)); 395 Controls.Compatibility.Layout.LayoutChildIntoBoundingRegion(formsElement, new Rect(0, 0, CollectionView.Frame.Width, request.Request.Height));
iOS\Extensions\CompatibilityColorExtensions.cs (1)
65 return new Rect(rect.X, rect.Y, rect.Width, rect.Height);
iOS\HandlerToRendererShim.cs (1)
80 Layout.LayoutChildIntoBoundingRegion(Element, new Rect(Element.X, Element.Y, size.Width, size.Height));
iOS\Renderers\CarouselPageRenderer.cs (1)
79 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height));
iOS\Renderers\IndicatorViewRenderer.cs (1)
169 indicatorLayout.Layout(new Rect(0, 0, indicatorLayoutSizeRequest.Request.Width, indicatorLayoutSizeRequest.Request.Height));
iOS\Renderers\ListViewRenderer.cs (6)
85 Layout.LayoutChildIntoBoundingRegion(e, new Rect(0, 0, width, Math.Ceiling(request.Request.Height))); 98 Layout.LayoutChildIntoBoundingRegion(e, new Rect(0, 0, width, Math.Ceiling(request.Request.Height))); 406 Layout.LayoutChildIntoBoundingRegion(footerView, new Rect(0, 0, width, request.Request.Height)); 428 Layout.LayoutChildIntoBoundingRegion(headerView, new Rect(0, 0, width, request.Request.Height)); 499 Layout.LayoutChildIntoBoundingRegion(footerView, new Rect(0, 0, width, request.Request.Height)); 545 Layout.LayoutChildIntoBoundingRegion(headerView, new Rect(0, 0, width, request.Request.Height));
iOS\Renderers\NavigationRenderer.cs (4)
90 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height)); 194 new Rect(0, toolbar.Hidden ? 0 : toolbar.Frame.Height, modelSize.Width, modelSize.Height - trueBottom); 198 Element.Layout(new Rect(Element.X, Element.Y, _queuedSize.Width, _queuedSize.Height)); 1688 Rect layoutBounds = new Rect(IconWidth, 0, Bounds.Width - IconWidth, height);
iOS\Renderers\PageRenderer.cs (1)
104 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height));
iOS\Renderers\PhoneFlyoutPageRenderer.cs (4)
103 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height)); 130 Element.Layout(new Rect(Element.X, Element.Y, View.Bounds.Width, View.Bounds.Height)); 309 FlyoutPageController.FlyoutBounds = new Rect(flyoutFrame.X, 0, flyoutFrame.Width, flyoutFrame.Height); 310 FlyoutPageController.DetailBounds = new Rect(0, 0, frame.Width, frame.Height);
iOS\Renderers\ScrollViewRenderer.cs (1)
121 Layout.LayoutChildIntoBoundingRegion(Element, new Rect(Element.X, Element.Y, size.Width, size.Height));
iOS\Renderers\SwipeViewRenderer.cs (1)
640 swipeItemView.Layout(new Rect(0, 0, swipeItemSize.Width, swipeItemSize.Height));
iOS\Renderers\TabbedRenderer.cs (3)
99 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height)); 147 Page.ContainerArea = new Rect(0, 0, frame.Width, frame.Height - tabBarFrame.Height); 151 Element.Layout(new Rect(Element.X, Element.Y, _queuedSize.Width, _queuedSize.Height));
iOS\Renderers\TabletFlyoutPageRenderer.cs (3)
232 Element.Layout(new Rect(Element.X, Element.Width, size.Width, size.Height)); 286 FlyoutPageController.FlyoutBounds = new Rect(0, 0, _flyoutWidth, flyoutBounds.Height); 293 FlyoutPageController.DetailBounds = new Rect(0, 0, detailsBounds.Width, detailsBounds.Height);
iOS\Renderers\UIContainerView.cs (1)
97 _view.Layout(new Rect(0, Margin.Top, Width ?? Frame.Width, Height ?? MeasuredHeight));
iOS\Renderers\WkWebViewRenderer.cs (1)
135 Layout.LayoutChildIntoBoundingRegion(Element, new Rect(Element.X, Element.Y, size.Width, size.Height));
iOS\VisualElementRenderer.cs (1)
168 Layout.LayoutChildIntoBoundingRegion(Element, new Rect(Element.X, Element.Y, size.Width, size.Height));
Microsoft.Maui.Controls.Foldable (16)
DualScreenInfo.cs (2)
189 return new[] { guide.Pane1, new Rect(0, hinge.Height + guide.Pane1.Height, guide.Pane2.Width, guide.Pane2.Height) }; 191 return new[] { guide.Pane1, new Rect(hinge.Width + guide.Pane1.Width, 0, guide.Pane2.Width, guide.Pane2.Height) };
TwoPaneViewLayoutGuide.cs (14)
153 containerArea = new Rect(Point.Zero, DualScreenService.ScaledScreenSize); 157 containerArea = new Rect(_layout.X, _layout.Y, width, height); 168 containerArea = new Rect(Point.Zero, DualScreenService.ScaledScreenSize); 176 containerArea = new Rect(locationOnScreen.Value, new Size(width, height)); 222 _newPane1 = new Rect(0, 0, Hinge.X - locationOnScreen.X, locationOnScreen.Height); 223 _newPane2 = new Rect(_newPane1.Width + Hinge.Width, 0, pane2Width, locationOnScreen.Height); 231 _newPane1 = new Rect(0, 0, locationOnScreen.Width, Hinge.Y - locationOnScreen.Y); 232 _newPane2 = new Rect(0, _newPane1.Height + Hinge.Height, locationOnScreen.Width, pane2Height); 247 _newPane1 = new Rect(0, 0, Hinge.X - locationOnScreen.X, locationOnScreen.Height); 253 _newPane1 = new Rect(amountObscured, 0, locationOnScreen.Width - amountObscured, locationOnScreen.Height); 256 _newPane1 = new Rect(0, 0, locationOnScreen.Width, locationOnScreen.Height); 269 _newPane1 = new Rect(0, 0, locationOnScreen.Width, Hinge.Y - locationOnScreen.Y); 275 _newPane1 = new Rect(0, amountObscured, locationOnScreen.Width, locationOnScreen.Height - amountObscured); 278 _newPane1 = new Rect(0, 0, locationOnScreen.Width, locationOnScreen.Height);
Microsoft.Maui.Graphics (6)
Rect.cs (5)
20 public static Rect Zero = new Rect(); 42 return new Rect(left, top, right - left, bottom - top); 126 return new Rect(x, y, width, height); 209 return new Rect(Math.Round(X), Math.Round(Y), Math.Round(Width), Math.Round(Height)); 234 rectangle = new Rect(x, y, w, h);
RectF.cs (1)
221 public static implicit operator Rect(RectF rect) => new Rect(rect.X, rect.Y, rect.Width, rect.Height);
347 references to Rect
Microsoft.Maui (74)
Animations\AnimationLerpingExtensions.cs (3)
35 public static Rect Lerp(this Rect start, Rect end, double progress)
Animations\Lerp.cs (5)
99 [typeof(Rect)] = new Lerp 104 var start = (Rect)s; 105 var end = (Rect)e;
Core\Extensions\VisualTreeElementExtensions.cs (4)
94 public static IReadOnlyList<IVisualTreeElement> GetVisualTreeElements(this IVisualTreeElement visualElement, Rect rectangle) 309 static List<IVisualTreeElement> GetVisualTreeElementsInternal(IVisualTreeElement visualElement, Predicate<Rect> intersectElementBounds) 318 static void Impl(IVisualTreeElement visualElement, Predicate<Rect> intersectElementBounds, List<IVisualTreeElement> elements) 322 Rect bounds = view.GetBoundingBox();
Core\IAbsoluteLayout.cs (1)
16 Rect GetLayoutBounds(IView view);
Core\IContentView.cs (2)
30 new Size CrossPlatformArrange(Rect bounds); 33 Size ICrossPlatformLayout.CrossPlatformArrange(Microsoft.Maui.Graphics.Rect bounds) => CrossPlatformArrange(bounds);
Core\ICrossPlatformLayout.cs (1)
20 Size CrossPlatformArrange(Rect bounds);
Core\IFlexLayout.cs (1)
78 Rect GetFlexFrame(IView view);
Core\ILayout.cs (2)
20 new Size CrossPlatformArrange(Rect bounds); 29 Size ICrossPlatformLayout.CrossPlatformArrange(Microsoft.Maui.Graphics.Rect bounds) => CrossPlatformArrange(bounds);
Core\IView.cs (2)
75 Rect Frame { get; set; } 132 Size Arrange(Rect bounds);
Core\IWindow.cs (1)
129 void FrameChanged(Rect frame);
Graphics\IShape.cs (2)
9 PathF PathForBounds(Rect bounds); 14 PathF InnerPathForBounds(Rect bounds, float strokeThickness);
Graphics\RectangleExtensions.cs (4)
10 public static Rect Inset(this Rect rectangle, double inset) 21 public static bool Contains(this Rect rect, Point point) => 25 public static bool ContainsAny(this Rect rect, Point[] points)
Handlers\Border\BorderHandler.cs (1)
68 public override void PlatformArrange(Rect rect)
Handlers\IViewHandler.cs (1)
37 void PlatformArrange(Rect frame);
Handlers\View\ViewHandler.cs (1)
181 public abstract void PlatformArrange(Rect frame);
Handlers\View\ViewHandlerOfT.Standard.cs (1)
7 public override void PlatformArrange(Rect rect)
Layouts\AbsoluteLayoutManager.cs (3)
36 var bounds = AbsoluteLayout.GetLayoutBounds(child); 59 public override Size ArrangeChildren(Rect bounds) 77 var destination = AbsoluteLayout.GetLayoutBounds(child);
Layouts\FlexLayoutManager.cs (3)
16 public Size ArrangeChildren(Rect bounds) 29 var frame = FlexLayout.GetFlexFrame(child); 62 var frame = FlexLayout.GetFlexFrame(child);
Layouts\GridLayoutManager.cs (3)
32 public override Size ArrangeChildren(Rect bounds) 45 var cell = _gridStructure.GetCellBoundsFor(view, bounds.Left, bounds.Top); 250 public Rect GetCellBoundsFor(IView view, double xOffset, double yOffset)
Layouts\HorizontalStackLayoutManager.cs (2)
45 public override Size ArrangeChildren(Rect bounds) 83 var destination = new Rect(x, top, child.DesiredSize.Width, height);
Layouts\ILayoutManager.cs (1)
9 Size ArrangeChildren(Rect bounds);
Layouts\LayoutExtensions.cs (8)
34 public static Rect ComputeFrame(this IView view, Rect bounds) 72 static double AlignHorizontal(IView view, Rect bounds, Thickness margin) 109 static double AlignVertical(IView view, Rect bounds, Thickness margin) 170 public static void ArrangeContent(this IContentView contentView, Rect bounds) 179 var targetBounds = new Rect(bounds.Left + padding.Left, bounds.Top + padding.Top, 185 public static Size AdjustForFill(this Size size, Rect bounds, IView view) 210 public static Size ArrangeContentUnbounded(this IContentView contentView, Rect bounds)
Layouts\LayoutManager.cs (1)
17 public abstract Size ArrangeChildren(Rect bounds);
Layouts\VerticalStackLayoutManager.cs (2)
46 public override Size ArrangeChildren(Rect bounds) 63 var destination = new Rect(left, stackHeight, width, child.DesiredSize.Height);
Platform\Standard\ViewExtensions.cs (2)
68 internal static Graphics.Rect GetPlatformViewBounds(this IView view) => view.Frame; 74 internal static Graphics.Rect GetBoundingBox(this IView view) => view.Frame;
VisualDiagnostics\AdornerModel.cs (14)
12 Rect boundingBox; 13 List<Rect> marginZones = new List<Rect>(); 15 public Rect BoundingBox => boundingBox; 16 public IReadOnlyList<Rect> MarginZones => marginZones; 19 public void Update(Rect rect, Thickness margin, Matrix4x4 transformToRoot, double density) 48 Rect rc = new Rect(); 59 Rect rc = new Rect(); 70 Rect rc = new Rect(); 81 Rect rc = new Rect(); 90 void TryAddMarginZone(Rect rect, double unitsPerPixel) 92 Rect rc = DpiHelper.RoundToPixel(rect, unitsPerPixel); 131 public static Rect RoundToPixel(Rect rect, double unitsPerPixel)
VisualDiagnostics\RectangleAdorner.cs (2)
52 public Rect DrawnRectangle => model.BoundingBox; 82 Rect box = VisualView.GetBoundingBox();
VisualDiagnostics\VisualDiagnosticsOverlay.cs (1)
154 var platformView = view.GetPlatformViewBounds();
Microsoft.Maui.Controls (150)
Border\Border.cs (2)
262 public Size CrossPlatformArrange(Graphics.Rect bounds) 264 var inset = bounds.Inset(StrokeThickness);
BoundsConstraint.cs (5)
13 Func<Rect> _measureFunc; 23 public static BoundsConstraint FromExpression(Expression<Func<Rect>> expression, IEnumerable<View> parents = null) 28 internal static BoundsConstraint FromExpression(Expression<Func<Rect>> expression, bool fromExpression, IEnumerable<View> parents = null) 30 Func<Rect> compiled = expression.Compile(); 41 internal Rect Compute()
BoxView\BoxView.cs (1)
86 PathF IShape.PathForBounds(Rect bounds)
Button\Button.iOS.cs (3)
170 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds) 189 void LayoutButton(UIButton platformButton, Button button, Rect size) 318 titleRect = Rect.Zero;
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (1)
825 void IViewHandler.PlatformArrange(Rect rect) =>
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (2)
1769 void IViewHandler.PlatformArrange(Rect rect) => 2005 Rect layoutBounds = new Rect(IconWidth, 0, Bounds.Width - IconWidth, height);
Compatibility\Handlers\Shell\iOS\ShellFlyoutLayoutManager.cs (1)
335 var contentFrame = new Rect(parentBounds.X, contentYOffset, parentBounds.Width, parentBounds.Height - contentYOffset - footerHeight);
Compatibility\Handlers\Shell\iOS\ShellRenderer.cs (1)
395 void IViewHandler.PlatformArrange(Rect rect)
Compatibility\Handlers\Shell\iOS\UIContainerView.cs (1)
125 var platformFrame = new Rect(0, 0, width, height);
Compatibility\Handlers\TabbedPage\iOS\TabbedRenderer.cs (1)
557 void IViewHandler.PlatformArrange(Rect rect) =>
Compatibility\Handlers\ViewHandlerDelegator.cs (1)
79 public void PlatformArrange(Rect rect) =>
Compatibility\Handlers\VisualElementRenderer.cs (1)
241 void IViewHandler.PlatformArrange(Rect rect) =>
ContentPage\ContentPage.cs (3)
85 protected override Size ArrangeOverride(Rect bounds) 98 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds) 141 Size IContentView.CrossPlatformArrange(Rect bounds)
ContentPresenter.cs (2)
121 protected override Size ArrangeOverride(Rect bounds) 128 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
Editor\Editor.cs (2)
95 Rect _previousBounds; 133 protected override Size ArrangeOverride(Rect bounds)
FlyoutPage\FlyoutPage.cs (4)
29 Rect _detailBounds; 33 Rect _flyoutBounds; 138 Rect IFlyoutPageController.DetailBounds 150 Rect IFlyoutPageController.FlyoutBounds
Foldable\IFoldableService.cs (3)
16 Rect GetHinge(); 27 public Rect FoldingFeatureBounds { get; set; } 28 public Rect WindowBounds { get; set; }
Frame\Frame.cs (1)
112 Size ICrossPlatformLayout.CrossPlatformArrange(Graphics.Rect bounds)
Handlers\Items\iOS\HeightConstrainedTemplatedCell.cs (1)
29 var bounds = PlatformHandler.VirtualView.Frame;
Handlers\Items\iOS\TemplatedCell.cs (2)
120 var nativeBounds = platformView.Frame.ToRectangle(); 140 var rectangle = platformView.Frame.ToRectangle();
Handlers\Items\iOS\WidthConstrainedTemplatedCell.cs (1)
29 var bounds = PlatformHandler.VirtualView.Frame;
IFlyoutPageController.cs (2)
11 Rect DetailBounds { get; set; } 13 Rect FlyoutBounds { get; set; }
IPageController.cs (1)
9 Rect ContainerArea { get; set; }
IScrollViewController.cs (1)
17 Rect LayoutAreaOverride { get; set; }
Label\Label.iOS.cs (1)
11 protected override Size ArrangeOverride(Rect bounds)
Layout\AbsoluteLayout.cs (8)
30 typeof(Rect), typeof(AbsoluteLayout), new Rect(0, 0, AutoSize, AutoSize), propertyChanged: LayoutBoundsPropertyChanged); 48 public static Rect GetLayoutBounds(BindableObject bindable) 50 return (Rect)bindable.GetValue(LayoutBoundsProperty); 60 public static void SetLayoutBounds(BindableObject bindable, Rect bounds) 76 public Rect GetLayoutBounds(IView view) 80 BindableObject bo => (Rect)bo.GetValue(LayoutBoundsProperty), 98 public void SetLayoutBounds(IView view, Rect bounds) 163 public Rect LayoutBounds { get; set; }
Layout\AndExpandLayoutManager.cs (1)
29 public Size ArrangeChildren(Rect bounds)
Layout\BoundsTypeConverter.cs (2)
53 throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Rect)}"); 58 if (value is not Rect rect)
Layout\FlexExtensions.cs (1)
9 public static Rect GetFrame(this Flex.Item item)
Layout\FlexLayout.cs (1)
559 public Graphics.Rect GetFlexFrame(IView view) =>
Layout\Layout.cs (1)
352 public Graphics.Size CrossPlatformArrange(Graphics.Rect bounds)
Layout\StackLayoutManager.cs (1)
35 public Size ArrangeChildren(Rect bounds)
LegacyLayouts\AbsoluteLayout.cs (12)
21 public static readonly BindableProperty LayoutBoundsProperty = BindableProperty.CreateAttached("LayoutBounds", typeof(Rect), typeof(AbsoluteLayout), new Rect(0, 0, AutoSize, AutoSize)); 48 public static Rect GetLayoutBounds(BindableObject bindable) 50 return (Rect)bindable.GetValue(LayoutBoundsProperty); 58 public static void SetLayoutBounds(BindableObject bindable, Rect bounds) 74 Rect rect = ComputeLayoutForRegion(child, new Size(width, height)); 126 Rect layoutBounds = GetLayoutBounds(view); 168 Rect bounds = GetLayoutBounds(view); 230 static Rect ComputeLayoutForRegion(View view, Size region) 232 var result = new Rect(); 235 Rect bounds = GetLayoutBounds(view); 306 void Add(View view, Rect bounds, AbsoluteLayoutFlags flags = AbsoluteLayoutFlags.None); 320 public void Add(View view, Rect bounds, AbsoluteLayoutFlags flags = AbsoluteLayoutFlags.None)
LegacyLayouts\FlexLayout.cs (1)
423 var frame = GetFlexItem(child).GetFrame();
LegacyLayouts\Layout.cs (9)
82 Size ILayoutManager.ArrangeChildren(Rect bounds) 219 public static void LayoutChildIntoBoundingRegion(VisualElement child, Rect region) 436 var oldBounds = new Rect[LogicalChildrenInternal.Count]; 476 Rect oldBound = oldBounds[i]; 477 Rect newBound = ((VisualElement)LogicalChildrenInternal[i]).Bounds; 487 internal static void LayoutChildIntoBoundingRegion(View child, Rect region, SizeRequest childSizeRequest) 717 protected override Size ArrangeOverride(Rect bounds) 741 /// <inheritdoc cref="ICrossPlatformLayout.CrossPlatformArrange(Rect)" /> 742 public Size CrossPlatformArrange(Rect bounds)
LegacyLayouts\RelativeLayout.cs (6)
212 var boundsRectangle = new Rect(); 216 Rect bounds = SolveView(child); 327 static Rect SolveView(View view) 336 var result = boundsConstraint.Compute(); 343 void Add(T view, Expression<Func<Rect>> bounds); 359 public void Add(View view, Expression<Func<Rect>> bounds)
LegacyLayouts\StackLayout.cs (9)
128 layout.Plots = new Rect[Children.Count]; 175 var bounds = new Rect(x, yOffset, request.Request.Width, request.Request.Height); 210 var bounds = new Rect(xOffset, y, request.Request.Width, request.Request.Height); 254 Rect plot = layout.Plots[i]; 326 Rect plot = layout.Plots[i]; 429 Rect plot = layout.Plots[i]; 457 Rect plot = layout.Plots[i]; 475 public Rect Bounds; 480 public Rect[] Plots;
Page\Page.cs (5)
69 Rect _containerArea; 178 public Rect ContainerArea 417 var area = new Rect(x, y, width, height); 418 Rect originalArea = area; 580 var startingLayout = new List<Rect>(logicalChildren.Count);
Platform\iOS\Extensions\FormattedStringExtensions.cs (1)
251 var rects = new List<Rect>();
Region.cs (9)
17 IReadOnlyList<Rect> Regions { get; } 20 Region(IList<Rect> positions) : this() 22 Regions = new ReadOnlyCollection<Rect>(positions); 25 Region(IList<Rect> positions, Thickness inflation) : this(positions) 30 public static Region FromRectangles(IEnumerable<Rect> rectangles) 39 var positions = new List<Rect>(); 103 Rect[] rectangles = new Rect[Regions.Count]; 106 var region = Regions[i];
ScrollView\ScrollView.cs (6)
22 public Rect LayoutAreaOverride 61 var scrollBounds = new Rect(ScrollX, ScrollY, Width, Height); 62 var itemBounds = new Rect(x, y, item.Width, item.Height); 142 Rect _layoutAreaOverride; 460 protected override Size ArrangeOverride(Rect bounds) 468 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
Shapes\Geometry.cs (1)
11 PathF IShape.PathForBounds(Graphics.Rect bounds)
Shapes\Matrix.cs (1)
692 internal static void TransformRect(ref Microsoft.Maui.Graphics.Rect rect, ref Matrix matrix)
Shapes\RectangleGeometry.cs (5)
3using Rect = Microsoft.Maui.Graphics.Rect; 17 public RectangleGeometry(Rect rect) 24 BindableProperty.Create(nameof(Rect), typeof(Rect), typeof(RectangleGeometry), new Rect()); 27 public Rect Rect 30 get { return (Rect)GetValue(RectProperty); }
Shapes\RoundRectangle.cs (2)
73 PathF IShape.PathForBounds(Graphics.Rect viewBounds) 104 PathF IRoundRectangle.InnerPathForBounds(Rect viewBounds, float strokeThickness)
Shapes\RoundRectangleGeometry.cs (5)
4using Rect = Microsoft.Maui.Graphics.Rect; 18 public RoundRectangleGeometry(CornerRadius cornerRadius, Rect rect) 26 BindableProperty.Create(nameof(Rect), typeof(Rect), typeof(RoundRectangleGeometry), new Rect(), 35 public Rect Rect 38 get { return (Rect)GetValue(RectProperty); }
Shapes\Shape.cs (2)
263 PathF IShape.PathForBounds(Graphics.Rect viewBounds) 275 internal void TransformPathForBounds(PathF path, Graphics.Rect viewBounds)
TemplatedView\TemplatedView.cs (2)
140 protected override Size ArrangeOverride(Rect bounds) 147 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
ViewExtensions.cs (3)
89 public static Task<bool> LayoutTo(this VisualElement view, Rect bounds, uint length = 250, Easing? easing = null) 94 Rect start = view.Bounds; 95 Func<double, Rect> computeBounds = progress =>
VisualElement\VisualElement.cs (11)
11using Rect = Microsoft.Maui.Graphics.Rect; 577 public Rect Bounds 1468 internal void MockBounds(Rect bounds) 1753 void UpdateBoundsComponents(Rect bounds) 1776 Rect _frame = new Rect(0, 0, -1, -1); 1784 public Rect Frame 1887 /// <param name="bounds">The final size that the parent computes for the child in layout, provided as a <see cref="Rect"/> value.</param> 1892 public void Arrange(Rect bounds) 1898 Size IView.Arrange(Rect bounds) 1909 protected virtual Size ArrangeOverride(Rect bounds) 1921 public void Layout(Rect bounds)
Window\Window.cs (1)
212 void IWindow.FrameChanged(Rect frame)
Microsoft.Maui.Controls.Build.Tasks (5)
CompiledConverters\BoundsTypeConverter.cs (3)
19 throw new BuildException(BuildExceptionCode.Conversion, node, null, value, typeof(Rect)); 26 throw new BuildException(BuildExceptionCode.Conversion, node, null, value, typeof(Rect)); 54 throw new BuildException(BuildExceptionCode.Conversion, node, null, value, typeof(Rect));
CompiledConverters\RectangleTypeConverter.cs (2)
19 throw new BuildException(BuildExceptionCode.Conversion, node, null, value, typeof(Rect)); 27 throw new BuildException(BuildExceptionCode.Conversion, node, null, value, typeof(Rect));
Microsoft.Maui.Controls.Compatibility (9)
iOS\CollectionView\HeightConstrainedTemplatedCell.cs (1)
31 var bounds = VisualElementRenderer.Element.Bounds;
iOS\CollectionView\TemplatedCell.cs (2)
90 var nativeBounds = nativeView.Frame.ToRectangle(); 191 var rectangle = nativeView.Frame.ToRectangle();
iOS\CollectionView\WidthConstrainedTemplatedCell.cs (1)
31 var bounds = VisualElementRenderer.Element.Bounds;
iOS\Extensions\CompatibilityColorExtensions.cs (2)
63 public static Rect ToRectangle(this RectangleF rect) 68 public static RectangleF ToRectangleF(this Rect rect)
iOS\Extensions\GeometryExtensions.cs (1)
39 var rect = (geometry as RectangleGeometry).Rect;
iOS\Renderers\NavigationRenderer.cs (1)
1688 Rect layoutBounds = new Rect(IconWidth, 0, Bounds.Width - IconWidth, height);
iOS\VisualElementTracker.cs (1)
34 Rect _lastBounds;
Microsoft.Maui.Controls.Foldable (53)
DualScreenInfo.cs (16)
43 Rect[] _spanningBounds; 44 Rect _hingeBounds; 72 _spanningBounds = Array.Empty<Rect>(); 115 /// <see cref="Microsoft.Maui.Graphics.Rect"/> 118 public Rect[] SpanningBounds 136 /// A <see cref="Microsoft.Maui.Graphics.Rect"/> 139 public Rect HingeBounds 176 Rect[] GetSpanningBounds() 179 var hinge = guide.Hinge; 181 if (hinge == Rect.Zero) 182 return Array.Empty<Rect>(); 184 if (guide.Pane2 == Rect.Zero) 185 return Array.Empty<Rect>(); 194 Rect GetHingeBounds() 271 public static string ToRectStrings(this Rect[] bounds) 276 foreach (var rect in bounds)
IFoldableContext.cs (2)
12 Rect FoldingFeatureBounds { get; set; } 14 Rect WindowBounds { get; set; }
NoPlatformFoldableService.cs (2)
51 public Rect GetHinge() 53 return Rect.Zero;
TwoPaneView.cs (9)
42 Rect _layoutGuidePane1; 43 Rect _layoutGuidePane2; 45 Rect _layoutGuideHinge; 309 protected override Size ArrangeOverride(Rect bounds) 445 Rect _previousHinge = Rect.Zero; 457 Rect pane1 = _twoPaneViewLayoutGuide.Pane1; 458 Rect pane2 = _twoPaneViewLayoutGuide.Pane2; 466 Rect hinge = _twoPaneViewLayoutGuide.Hinge;
TwoPaneViewLayoutGuide.cs (24)
33 Rect _hinge; 34 Rect _leftPage; 35 Rect _rightPane; 111 public Rect Pane1 123 public Rect Pane2 135 public Rect Hinge 147 Rect GetContainerArea(double width, double height) 150 Rect containerArea; 163 Rect GetScreenRelativeBounds(double width, double height) 165 Rect containerArea; 174 return Rect.Zero; 197 Rect containerArea = GetContainerArea(width, height); 205 Rect _newPane1 = Pane1; 206 Rect _newPane2 = Pane2; 207 var locationOnScreen = GetScreenRelativeBounds(width, height); 208 if (locationOnScreen == Rect.Zero && Hinge == Rect.Zero) 258 _newPane2 = Rect.Zero; 280 _newPane2 = Rect.Zero; 285 _newPane2 = Rect.Zero; 288 _newPane1 = Rect.Zero; 311 bool IsInMultipleRegions(Rect layoutBounds) 314 var hinge = DualScreenService.GetHinge(); 353 TwoPaneViewMode GetTwoPaneViewMode(double width, double height, Rect hinge)
Microsoft.Maui.Essentials (7)
Launcher\Launcher.ios.tvos.cs (1)
50 if (request.PresentationSourceBounds != Rect.Zero)
Launcher\Launcher.shared.cs (2)
261 public Rect PresentationSourceBounds { get; set; } = Rect.Zero;
Share\Share.ios.cs (2)
42 if (request.PresentationSourceBounds != Rect.Zero || OperatingSystem.IsIOSVersionAtLeast(13, 0)) 78 if (request.PresentationSourceBounds != Rect.Zero || OperatingSystem.IsIOSVersionAtLeast(13, 0))
Share\Share.shared.cs (2)
192 public Rect PresentationSourceBounds { get; set; } = Rect.Zero;
Microsoft.Maui.Graphics (49)
CanvasExtensions.cs (14)
10 public static void DrawRectangle(this ICanvas target, Rect rect) 20 public static void FillRectangle(this ICanvas target, Rect rect) 30 public static void DrawRoundedRectangle(this ICanvas target, Rect rect, double cornerRadius) 47 public static void DrawRoundedRectangle(this ICanvas target, Rect rect, double topLeftCornerRadius, double topRightCornerRadius, double bottomLeftCornerRadius, double bottomRightCornerRadius) 68 public static void FillRoundedRectangle(this ICanvas target, Rect rect, double cornerRadius) 85 public static void FillRoundedRectangle(this ICanvas target, Rect rect, double topLeftCornerRadius, double topRightCornerRadius, double bottomLeftCornerRadius, double bottomRightCornerRadius) 106 public static void DrawEllipse(this ICanvas target, Rect rect) 116 public static void FillEllipse(this ICanvas target, Rect rect) 146 public static void ClipRectangle(this ICanvas target, Rect rect) 159 Rect bounds, 280 public static void DrawArc(this ICanvas canvas, Rect bounds, float startAngle, float endAngle, bool clockwise, bool closed) 309 public static void FillArc(this ICanvas canvas, Rect bounds, float startAngle, float endAngle, bool clockwise) 368 public static void SubtractFromClip(this ICanvas target, Rect rect) 388 public static void SetFillPaint(this ICanvas target, Paint paint, Rect rectangle)
Converters\RectTypeConverter.cs (4)
26 if (Rect.TryParse(value?.ToString(), out var r)) 29 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(Rect))); 34 if (!(value is Rect r))
Rect.cs (30)
20 public static Rect Zero = new Rect(); 40 public static Rect FromLTRB(double left, double top, double right, double bottom) 45 public bool Equals(Rect other) 54 return obj is Rect && Equals((Rect)obj); 69 public static bool operator ==(Rect r1, Rect r2) 74 public static bool operator !=(Rect r1, Rect r2) 80 public bool Contains(Rect rect) 95 public bool IntersectsWith(Rect r) 100 public Rect Union(Rect r) 105 public static Rect Union(Rect r1, Rect r2) 110 public Rect Intersect(Rect r) 115 public static Rect Intersect(Rect r1, Rect r2) 179 public Rect Inflate(Size sz) 184 public Rect Inflate(double width, double height) 186 Rect r = this; 194 public Rect Offset(double dx, double dy) 196 Rect r = this; 202 public Rect Offset(Point dr) 207 public Rect Round() 220 public static implicit operator RectF(Rect rect) => new RectF((float)rect.X, (float)rect.Y, (float)rect.Width, (float)rect.Height); 222 public static bool TryParse(string value, out Rect rectangle)
RectF.cs (1)
221 public static implicit operator Rect(RectF rect) => new Rect(rect.X, rect.Y, rect.Width, rect.Height);