90 instantiations of Rect
Microsoft.Maui (23)
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);
Platform\iOS\CoreGraphicsExtensions.cs (1)
28 return new Rect((float)rect.X, (float)rect.Y, (float)rect.Width, (float)rect.Height);
Platform\iOS\MauiScrollView.cs (1)
55 var size = crossPlatformLayout.CrossPlatformArrange(new Rect(new Point(), crossPlatformBounds));
Platform\iOS\ViewExtensions.cs (6)
437 return new Rect(); 446 return new Rect(); 461 return new Rect(X, Y, Width, Height); 492 return new Rect(); 498 return new Rect(nvb.X, nvb.Y, nvb.Width, nvb.Height); 507 new Rect(
Platform\iOS\WindowViewController.cs (1)
169 iTitleBar.Arrange(new Graphics.Rect(0, 0, View.Bounds.Width, measured.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)
2042 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)
550 formsElement.Arrange(new Rect(0, 0, request.Width, CollectionView.Frame.Height)); 555 formsElement.Arrange(new Rect(0, 0, CollectionView.Frame.Width, request.Height));
Layout\AbsoluteLayout.cs (2)
43 typeof(Rect), typeof(AbsoluteLayout), new Rect(0, 0, AutoSize, AutoSize), propertyChanged: LayoutBoundsPropertyChanged); 210 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)
419 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)
63 var scrollBounds = new Rect(ScrollX, ScrollY, Width, Height); 64 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)
582 get { return IsMocked() ? new Rect(_mockX, _mockY, _mockWidth, _mockHeight) : _frame; } 1779 Rect _frame = new Rect(0, 0, -1, -1);
Window\Window.cs (1)
214 if (new Rect(X, Y, Width, Height) == frame)
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);
351 references to Rect
Microsoft.Maui (88)
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\ScrollView\ScrollViewHandler.iOS.cs (1)
194 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
Handlers\View\ViewHandler.cs (1)
181 public abstract void PlatformArrange(Rect frame);
Handlers\View\ViewHandlerOfT.iOS.cs (1)
16 public override void PlatformArrange(Rect rect) =>
Handlers\ViewHandlerExtensions.iOS.cs (2)
39 var rect = bounds.Value.ToRectangle(); 124 internal static void PlatformArrangeHandler(this IViewHandler viewHandler, Rect rect)
Handlers\Window\WindowHandler.iOS.cs (1)
159 var newRectangle = newGeometry.SystemFrame.ToRectangle();
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\iOS\CoreGraphicsExtensions.cs (2)
26 public static Rect ToRectangle(this CGRect rect) 31 public static CGRect ToCGRect(this Rect rect)
Platform\iOS\GeneralWrapperView.cs (1)
56public Size CrossPlatformArrange(Rect bounds)
Platform\iOS\MauiCALayer.cs (1)
311 var bounds = _bounds.ToRectangle();
Platform\iOS\MauiView.cs (2)
89 Size CrossPlatformArrange(Rect bounds) 123 var bounds = AdjustForSafeArea(Bounds).ToRectangle();
Platform\iOS\ViewExtensions.cs (6)
432 internal static Rect GetPlatformViewBounds(this IView view) 443 internal static Rect GetPlatformViewBounds(this UIView platformView) 486 internal static Graphics.Rect GetBoundingBox(this IView view) 489 internal static Graphics.Rect GetBoundingBox(this UIView? platformView) 493 var nvb = platformView.GetPlatformViewBounds(); 501 internal static Rect GetFrameRelativeTo(this UIView view, UIView relativeTo)
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 (152)
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)
157 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds) 176 void LayoutButton(UIButton platformButton, Button button, Rect size) 319 titleRect = Rect.Zero;
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (1)
825 void IViewHandler.PlatformArrange(Rect rect) =>
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (2)
1806 void IViewHandler.PlatformArrange(Rect rect) => 2042 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)
87 protected override Size ArrangeOverride(Rect bounds) 100 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds) 143 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 (10)
43 typeof(Rect), typeof(AbsoluteLayout), new Rect(0, 0, AutoSize, AutoSize), propertyChanged: LayoutBoundsPropertyChanged); 67 /// <returns>A <see cref="Rect"/> with the layout bounds for the given bindable object.</returns> 69 public static Rect GetLayoutBounds(BindableObject bindable) 71 return (Rect)bindable.GetValue(LayoutBoundsProperty); 91 public static void SetLayoutBounds(BindableObject bindable, Rect bounds) 116 /// <returns>A <see cref="Rect"/> with the layout bounds for the given view.</returns> 117 public Rect GetLayoutBounds(IView view) 121 BindableObject bo => (Rect)bo.GetValue(LayoutBoundsProperty), 149 public void SetLayoutBounds(IView view, Rect bounds) 214 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)
354 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) 724 protected override Size ArrangeOverride(Rect bounds) 748 /// <inheritdoc cref="ICrossPlatformLayout.CrossPlatformArrange(Rect)" /> 749 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)
71 Rect _containerArea; 180 public Rect ContainerArea 419 var area = new Rect(x, y, width, height); 420 Rect originalArea = area; 582 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)
24 public Rect LayoutAreaOverride 63 var scrollBounds = new Rect(ScrollX, ScrollY, Width, Height); 64 var itemBounds = new Rect(x, y, item.Width, item.Height); 144 Rect _layoutAreaOverride; 462 protected override Size ArrangeOverride(Rect bounds) 470 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)
12using Rect = Microsoft.Maui.Graphics.Rect; 580 public Rect Bounds 1471 internal void MockBounds(Rect bounds) 1756 void UpdateBoundsComponents(Rect bounds) 1779 Rect _frame = new Rect(0, 0, -1, -1); 1787 public Rect Frame 1890 /// <param name="bounds">The final size that the parent computes for the child in layout, provided as a <see cref="Rect"/> value.</param> 1895 public void Arrange(Rect bounds) 1901 Size IView.Arrange(Rect bounds) 1912 protected virtual Size ArrangeOverride(Rect bounds) 1924 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.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 (4)
Launcher\Launcher.shared.cs (2)
261 public Rect PresentationSourceBounds { get; set; } = Rect.Zero;
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);