96 instantiations of Size
Microsoft.Maui (12)
Animations\AnimationLerpingExtensions.cs (1)
30 new Size(start.Width.Lerp(end.Width, progress), start.Height.Lerp(end.Height, progress));
Layouts\AbsoluteLayoutManager.cs (2)
56 return new Size(finalWidth, finalHeight); 102 return new Size(availableWidth, availableHeight);
Layouts\FlexLayoutManager.cs (1)
73 return new Size(finalWidth, finalHeight);
Layouts\GridLayoutManager.cs (2)
29 return new Size(measuredWidth, measuredHeight); 49 var actual = new Size(_gridStructure.MeasuredGridWidth(), _gridStructure.MeasuredGridHeight());
Layouts\HorizontalStackLayoutManager.cs (2)
42 return new Size(finalWidth, finalHeight); 76 var actual = new Size(xPosition, height);
Layouts\LayoutExtensions.cs (2)
30 return new Size(measureWithoutMargins.Width + margin.HorizontalThickness, 167 return new Size(contentSize.Width + inset.HorizontalThickness, contentSize.Height + inset.VerticalThickness);
Layouts\VerticalStackLayoutManager.cs (2)
43 return new Size(finalWidth, finalHeight); 68 var actual = new Size(width, stackHeight);
Microsoft.Maui.Controls (60)
BoxView\BoxView.cs (1)
49 return new SizeRequest(new Size(40, 40));
Button\Button.iOS.cs (3)
158 var returnSize = new Size(Math.Min(buttonContentWidth, widthConstraint), 162 return new Size((int)Math.Ceiling(returnSize.Width), (int)Math.Ceiling(returnSize.Height)); 179 return new Size(bounds.Width, bounds.Height);
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (1)
83 new Size(0, 0));
Compatibility\Handlers\Shell\iOS\ShellRenderer.cs (2)
145 SetElementSize(new Size(View.Bounds.Width, View.Bounds.Height)); 393 Size IViewHandler.GetDesiredSize(double widthConstraint, double heightConstraint) => new Size(100, 100);
Compatibility\Handlers\TableView\iOS\TableViewRenderer.cs (1)
25 return new Size(44, 44);
Compatibility\Handlers\VisualElementRenderer.cs (3)
134 return new Size( 152 return new Size( 176 return new Size();
Compatibility\iOS\Extensions\UIViewExtensions.cs (2)
47 var request = new Size(s.Width == float.PositiveInfinity ? double.PositiveInfinity : s.Width, 49 var minimum = new Size(minimumWidth < 0 ? request.Width : minimumWidth,
ContentPage\ContentPage.cs (1)
95 return new Size(widthConstraint, heightConstraint);
ContentPresenter.cs (1)
64 Request = new Size { Width = widthRequest != -1 ? widthRequest : childRequest.Request.Width, Height = heightRequest != -1 ? heightRequest : childRequest.Request.Height },
DisplayInfoExtensions.cs (1)
15 return new Size(info.Width / info.Density, info.Height / info.Density);
ImageElement.cs (2)
55 return new SizeRequest(new Size(0, 0)); 98 return new SizeRequest(new Size(width, height));
IndicatorView\IndicatorView.cs (1)
138 return Handler?.GetDesiredSize(widthConstraint, heightConstraint) ?? new();
Items\ItemsView.cs (2)
196 var minimumSize = new Size(40, 40); 202 Size request = new Size(maxWidth, maxHeight);
Layout\FlexExtensions.cs (1)
29 return new Size(widthConstraint, heightConstraint);
LegacyLayouts\AbsoluteLayout.cs (5)
74 Rect rect = ComputeLayoutForRegion(child, new Size(width, height)); 97 var bestFitSize = new Size(); 98 var minimum = new Size(); 227 return new SizeRequest(new Size(width, height), new Size(minWidth, minHeight));
LegacyLayouts\FlexLayout.cs (3)
440 return new SizeRequest(new Size(widthConstraint, heightConstraint)); 444 return new SizeRequest(new Size(widthConstraint, heightConstraint)); 483 return new SizeRequest(new Size(widthConstraint, heightConstraint));
LegacyLayouts\GridCalc.cs (4)
57 return new SizeRequest(new Size(0, 0)); 81 var request = new Size(columnWidthSum + (structure.Columns.Count - 1) * ColumnSpacing, rowHeightSum + (structure.Rows.Count - 1) * RowSpacing); 82 var minimum = new Size(nonStarColumnWidthSum + (structure.Columns.Count - 1) * ColumnSpacing, nonStarRowHeightSum + (structure.Rows.Count - 1) * RowSpacing); 295 return new Size(columnWidthSum + (_columns.Count - 1) * columnSpacing, rowHeightSum + (_rows.Count - 1) * rowSpacing);
LegacyLayouts\Layout.cs (6)
109 Size _lastLayoutSize = new Size(-1, -1); 205 return new SizeRequest(new Size(size.Request.Width + Padding.HorizontalThickness, size.Request.Height + Padding.VerticalThickness), 206 new Size(size.Minimum.Width + Padding.HorizontalThickness, size.Minimum.Height + Padding.VerticalThickness)); 395 return new Size(sansMargins.Width + Margin.HorizontalThickness, sansMargins.Height + Margin.VerticalThickness); 470 _lastLayoutSize = new Size(width, height); 599 if (_lastLayoutSize != new Size(Width, Height))
LegacyLayouts\RelativeLayout.cs (1)
238 return new SizeRequest(new Size(boundsRectangle.Right, boundsRectangle.Bottom));
LegacyLayouts\StackLayout.cs (2)
125 layout.Constraint = new Size(widthConstraint, heightConstraint); 227 layout.MinimumSize = new Size(minimumWidth, minimumHeight);
ListView\ListView.cs (3)
424 var minimumSize = new Size(40, 40); 434 request = new Size(width, list.Count * RowHeight); 439 request = new Size(width, Math.Max(scaled.Width, scaled.Height));
PlatformConfiguration\WindowsSpecific\TabbedPage.cs (1)
20 BindableProperty.Create(nameof(HeaderIconsSizeProperty), typeof(Size), typeof(TabbedPage), new Size(16, 16));
RadioButton\RadioButton.cs (1)
297 return Handler?.GetDesiredSize(widthConstraint, heightConstraint) ?? new();
ScrollView\ScrollView.cs (2)
184 ContentSize = new Size(frameSize.Width + margin.HorizontalThickness, 317 contentRequest.Minimum = new Size(Math.Min(40, contentRequest.Minimum.Width), Math.Min(40, contentRequest.Minimum.Height));
Shapes\ArcSegment.cs (1)
32 BindableProperty.Create(nameof(Size), typeof(Size), typeof(ArcSegment), new Size(0, 0));
Shapes\PathFigureCollectionConverter.cs (1)
293 Size = new Size(w, h),
TableView\TableView.cs (2)
137 var minimumSize = new Size(40, 40); 140 var request = new Size(width, Math.Max(scaled.Width, scaled.Height));
TemplatedView\TemplatedView.cs (1)
60 Request = new Size { Width = widthRequest != -1 ? widthRequest : childRequest.Request.Width, Height = heightRequest != -1 ? heightRequest : childRequest.Request.Height },
VisualElement\VisualElement.cs (5)
1125 var constraintSize = new Size(widthConstraint, heightConstraint); 1213 result.Minimum = new Size(result.Minimum.Width + margin.HorizontalThickness, result.Minimum.Height + margin.VerticalThickness); 1214 result.Request = new Size(result.Request.Width + margin.HorizontalThickness, result.Request.Height + margin.VerticalThickness); 1312 return new SizeRequest(new Size(-1, -1)); 1314 return Handler?.GetDesiredSize(widthConstraint, heightConstraint) ?? new();
Microsoft.Maui.Controls.Compatibility (13)
iOS\Platform.cs (2)
356 rootRenderer.SetElementSize(new Size(_renderer.View.Bounds.Width, _renderer.View.Bounds.Height)); 408 viewRenderer.SetElementSize(new Size(_renderer.View.Bounds.Width, _renderer.View.Bounds.Height));
iOS\Renderers\CheckBoxRendererBase.cs (2)
81 sizeConstraint = new SizeRequest(new Size(width, height), new Size(MinimumSize, MinimumSize));
iOS\Renderers\EntryRenderer.cs (1)
72 return new SizeRequest(new Size(baseResult.Request.Width, height));
iOS\Renderers\LabelRenderer.cs (3)
63 _perfectSize.Minimum = new Size(Math.Min(10, _perfectSize.Request.Width), _perfectSize.Request.Height); 75 result.Minimum = new Size(tinyWidth, result.Request.Height); 90 result.Request = new Size(expandedWidth, result.Request.Height);
iOS\Renderers\SwipeViewRenderer.cs (4)
1312 return new Size(items.Mode == SwipeMode.Execute ? (threshold > 0 ? threshold : contentWidth) / items.Count : (threshold < SwipeItemWidth ? SwipeItemWidth : threshold), contentHeight); 1326 return new Size(swipeItemWidth, contentHeight); 1334 return new Size(contentWidth / items.Count, (threshold > 0 && threshold < swipeItemHeight) ? threshold : swipeItemHeight); 1348 return new Size(contentWidth / items.Count, swipeItemHeight);
iOS\Shapes\ShapeRenderer.cs (1)
304 return new SizeRequest(new Size(
Microsoft.Maui.Controls.Foldable (1)
TwoPaneViewLayoutGuide.cs (1)
176 containerArea = new Rect(locationOnScreen.Value, new Size(width, height));
Microsoft.Maui.Graphics (10)
Point.cs (2)
87 return new Size(pt.X, pt.Y); 97 return new Size(ptA.X - ptB.X, ptA.Y - ptB.Y);
Rect.cs (1)
158 get => new Size(Width, Height);
Size.cs (5)
43 return new Size(s1.Width + s2.Width, s1.Height + s2.Height); 48 return new Size(s1.Width - s2.Width, s1.Height - s2.Height); 53 return new Size(s1.Width * value, s1.Height * value); 58 return new Size(s1.Width / value, s1.Height / value); 117 size = new Size(w, h);
SizeF.cs (2)
122 public static implicit operator Size(SizeF s) => new Size(s.Width, s.Height); 133 sizeF = new Size(w, h);
338 references to Size
Microsoft.Maui (80)
Animations\AnimationLerpingExtensions.cs (3)
29 public static Size Lerp(this Size start, Size end, double progress) =>
Animations\Lerp.cs (5)
139 [typeof(Size)] = new Lerp 144 var start = (Size)s; 145 var end = (Size)e;
Converters\ThicknessTypeConverter.cs (2)
15 || sourceType == typeof(Size) 27 else if (value is Size s)
Core\IContentView.cs (4)
24 new Size CrossPlatformMeasure(double widthConstraint, double heightConstraint); 30 new Size CrossPlatformArrange(Rect bounds); 33 Size ICrossPlatformLayout.CrossPlatformArrange(Microsoft.Maui.Graphics.Rect bounds) => CrossPlatformArrange(bounds); 34 Size ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double heightConstraint) => CrossPlatformMeasure(widthConstraint, heightConstraint);
Core\ICrossPlatformLayout.cs (2)
13 Size CrossPlatformMeasure(double widthConstraint, double heightConstraint); 20 Size CrossPlatformArrange(Rect bounds);
Core\ILayout.cs (4)
20 new Size CrossPlatformArrange(Rect bounds); 26 new Size CrossPlatformMeasure(double widthConstraint, double heightConstraint); 29 Size ICrossPlatformLayout.CrossPlatformArrange(Microsoft.Maui.Graphics.Rect bounds) => CrossPlatformArrange(bounds); 30 Size ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double heightConstraint) => CrossPlatformMeasure(widthConstraint, heightConstraint);
Core\IScrollView.cs (1)
25 Size ContentSize { get; }
Core\IView.cs (3)
115 Size DesiredSize { get; } 132 Size Arrange(Rect bounds); 140 Size Measure(double widthConstraint, double heightConstraint);
Handlers\Border\BorderHandler.cs (1)
46 private Size _lastSize;
Handlers\IViewHandler.cs (1)
31 Size GetDesiredSize(double widthConstraint, double heightConstraint);
Handlers\View\ViewHandler.cs (1)
178 public abstract Size GetDesiredSize(double widthConstraint, double heightConstraint);
Handlers\View\ViewHandlerOfT.Standard.cs (2)
12 public override Size GetDesiredSize(double widthConstraint, double heightConstraint) 13 => Size.Zero;
Layouts\AbsoluteLayoutManager.cs (3)
17 public override Size Measure(double widthConstraint, double heightConstraint) 44 var measure = child.Measure(measureWidth, measureHeight); 59 public override Size ArrangeChildren(Rect bounds)
Layouts\FlexLayoutManager.cs (2)
16 public Size ArrangeChildren(Rect bounds) 43 public Size Measure(double widthConstraint, double heightConstraint)
Layouts\GridLayoutManager.cs (11)
22 public override Size Measure(double widthConstraint, double heightConstraint) 32 public override Size ArrangeChildren(Rect bounds) 49 var actual = new Size(_gridStructure.MeasuredGridWidth(), _gridStructure.MeasuredGridHeight()); 380 Size MeasureCell(Cell cell, double width, double height) 383 var result = child.Measure(width, height); 406 var measure = MeasureCell(cell, cell.MeasureWidth, cell.MeasureHeight); 475 var measure = MeasureCell(cell, width, height); 613 void ResolveStars(Definition[] defs, double availableSpace, Func<Cell, bool> cellCheck, Func<Size, double> dimension, double starCount) 667 static double getDimension(Size size) => size.Width; 689 static double getDimension(Size size) => size.Height; 800 public void PrepareForArrange(Size targetSize)
Layouts\HorizontalStackLayoutManager.cs (4)
12 public override Size Measure(double widthConstraint, double heightConstraint) 30 var measure = child.Measure(double.PositiveInfinity, heightConstraint - padding.VerticalThickness); 45 public override Size ArrangeChildren(Rect bounds) 76 var actual = new Size(xPosition, height);
Layouts\ILayoutManager.cs (2)
7 Size Measure(double widthConstraint, double heightConstraint); 9 Size ArrangeChildren(Rect bounds);
Layouts\LayoutExtensions.cs (10)
11 public static Size ComputeDesiredSize(this IView view, double widthConstraint, double heightConstraint) 17 return Size.Zero; 27 var measureWithoutMargins = view.Handler.GetDesiredSize(widthConstraint, heightConstraint); 140 public static Size MeasureContent(this IContentView contentView, double widthConstraint, double heightConstraint) 145 public static Size MeasureContent(this IContentView contentView, Thickness inset, double widthConstraint, double heightConstraint) 159 var contentSize = Size.Zero; 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 (2)
16 public abstract Size Measure(double widthConstraint, double heightConstraint); 17 public abstract Size ArrangeChildren(Rect bounds);
Layouts\VerticalStackLayoutManager.cs (4)
12 public override Size Measure(double widthConstraint, double heightConstraint) 31 var measure = child.Measure(childWidthConstraint, double.PositiveInfinity); 46 public override Size ArrangeChildren(Rect bounds) 68 var actual = new Size(width, stackHeight);
Primitives\SizeRequest.cs (12)
16 public Size Request { get; set; } 19 public Size Minimum { get; set; } 22 public SizeRequest(Size request, Size minimum) 29 public SizeRequest(Size request) 43 public static implicit operator SizeRequest(Size size) => new SizeRequest(size); 45 public static implicit operator Size(SizeRequest size) => size.Request; 58 => sourceType == typeof(Size); 62 Size size => (SizeRequest)size, 67 => destinationType == typeof(Size); 72 if (destinationType == typeof(Size)) 73 return (Size)sizeRequest;
Primitives\Thickness.cs (1)
55 public static implicit operator Thickness(Size size)
Microsoft.Maui.Controls (178)
Border\Border.cs (2)
262 public Size CrossPlatformArrange(Graphics.Rect bounds) 269 public Size CrossPlatformMeasure(double widthConstraint, double heightConstraint)
Button\Button.iOS.cs (6)
29 /// <returns>Returns a <see cref="Size"/> representing the width and height of the button.</returns> 31 Size ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double heightConstraint) 39 return Size.Zero; 158 var returnSize = new Size(Math.Min(buttonContentWidth, widthConstraint), 169 /// <returns>Returns a <see cref="Size"/> representing the width and height of the button.</returns> 170 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (2)
82 public Size GetDesiredSize(double widthConstraint, double heightConstraint) 113 public void SetElementSize(Size size)
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (3)
361 var size = _footerRenderer.VirtualView.Measure(Bounds.Width, double.PositiveInfinity); 381 var size = _headerRenderer.VirtualView.Measure(Bounds.Width, double.PositiveInfinity); 933 var req = target.Measure(tableView.Frame.Width, double.PositiveInfinity);
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (1)
1766 Size IViewHandler.GetDesiredSize(double widthConstraint, double heightConstraint) =>
Compatibility\Handlers\Shell\iOS\ShellRenderer.cs (2)
134 public virtual void SetElementSize(Size size) 393 Size IViewHandler.GetDesiredSize(double widthConstraint, double heightConstraint) => new Size(100, 100);
Compatibility\Handlers\Shell\iOS\ShellTableViewSource.cs (1)
129 var request = (view.View as IView).Measure(tableView.Bounds.Width, double.PositiveInfinity);
Compatibility\Handlers\Shell\iOS\UIContainerView.cs (1)
88 var measuredSize = (_view as IView).Measure(size.Width, size.Height);
Compatibility\Handlers\TabbedPage\iOS\TabbedRenderer.cs (1)
65 public Size GetDesiredSize(double widthConstraint, double heightConstraint) =>
Compatibility\Handlers\TableView\iOS\TableViewRenderer.cs (1)
23 protected override Size MinimumSize()
Compatibility\Handlers\ViewHandlerDelegator.cs (2)
72 public Size GetDesiredSize(double widthConstraint, double heightConstraint, Size? minimumSize = null) =>
Compatibility\Handlers\VisualElementRenderer.cs (10)
124 internal static Size GetDesiredSize(IPlatformViewHandler handler, double widthConstraint, double heightConstraint, Size? minimumSize) 126 var size = handler.GetDesiredSizeFromHandler(widthConstraint, heightConstraint); 130 var minSize = minimumSize.Value; 144 Size IViewHandler.GetDesiredSize(double widthConstraint, double heightConstraint) 147 var minSize = sizeRequest.Minimum; 148 var size = sizeRequest.Request; 164 var minSize = MinimumSize(); 165 var size = GetDesiredSize(this, widthConstraint, heightConstraint, minSize); 173 protected virtual Size MinimumSize()
Compatibility\iOS\Extensions\UIViewExtensions.cs (2)
47 var request = new Size(s.Width == float.PositiveInfinity ? double.PositiveInfinity : s.Width, 49 var minimum = new Size(minimumWidth < 0 ? request.Width : minimumWidth,
ContentPage\ContentPage.cs (6)
71 protected override Size MeasureOverride(double widthConstraint, double heightConstraint) 85 protected override Size ArrangeOverride(Rect bounds) 92 Size ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double heightConstraint) 98 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds) 141 Size IContentView.CrossPlatformArrange(Rect bounds) 146 Size IContentView.CrossPlatformMeasure(double widthConstraint, double heightConstraint)
ContentPresenter.cs (4)
111 protected override Size MeasureOverride(double widthConstraint, double heightConstraint) 116 Size ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double heightConstraint) 121 protected override Size ArrangeOverride(Rect bounds) 128 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
DisplayInfoExtensions.cs (2)
10 public static Size GetScaledScreenSize(this DisplayInfo info) 13 return Size.Zero;
Editor\Editor.cs (2)
133 protected override Size ArrangeOverride(Rect bounds) 139 protected override Size MeasureOverride(double widthConstraint, double heightConstraint)
Foldable\IFoldableService.cs (1)
17 Size ScaledScreenSize { get; }
Frame\Frame.cs (2)
112 Size ICrossPlatformLayout.CrossPlatformArrange(Graphics.Rect bounds) 122 Size ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double heightConstraint)
Handlers\Items\CarouselViewHandler.iOS.cs (1)
74 public override Size GetDesiredSize(double widthConstraint, double heightConstraint) =>
Handlers\Items\iOS\CarouselTemplatedCell.cs (3)
38 protected override (bool, Size) NeedsContentSizeUpdate(Size currentSize) 40 return (false, Size.Zero);
Handlers\Items\iOS\HeightConstrainedTemplatedCell.cs (3)
22 protected override (bool, Size) NeedsContentSizeUpdate(Size currentSize) 36 var desiredBounds = PlatformHandler.VirtualView.Measure(double.PositiveInfinity, bounds.Height);
Handlers\Items\iOS\HorizontalCell.cs (1)
21 var measure = PlatformHandler.VirtualView.Measure(double.PositiveInfinity, ConstrainedDimension);
Handlers\Items\iOS\HorizontalTemplatedHeaderView.cs (1)
26 var measure = PlatformHandler.VirtualView.Measure(double.PositiveInfinity, ConstrainedDimension);
Handlers\Items\iOS\ItemsViewController.cs (3)
273 internal Size? GetSize() 554 var request = formsElement.Measure(double.PositiveInfinity, CollectionView.Frame.Height); 559 var request = formsElement.Measure(CollectionView.Frame.Width, double.PositiveInfinity);
Handlers\Items\iOS\SizeExtensions.cs (1)
27 public static bool IsCloseTo(this CGSize sizeA, Size sizeB)
Handlers\Items\iOS\TemplatedCell.cs (4)
42 Size _size; 167 _size = Size.Zero; 286 protected abstract (bool, Size) NeedsContentSizeUpdate(Size currentSize);
Handlers\Items\iOS\VerticalCell.cs (1)
21 var measure = PlatformHandler.VirtualView.Measure(ConstrainedDimension, double.PositiveInfinity);
Handlers\Items\iOS\VerticalSupplementaryView.cs (1)
26 var measure = PlatformHandler.VirtualView.Measure(ConstrainedDimension, double.PositiveInfinity);
Handlers\Items\iOS\WidthConstrainedTemplatedCell.cs (3)
22 protected override (bool, Size) NeedsContentSizeUpdate(Size currentSize) 36 var desiredBounds = PlatformHandler.VirtualView.Measure(bounds.Width, double.PositiveInfinity);
Handlers\Items\ItemsViewHandler.iOS.cs (3)
151 public override Size GetDesiredSize(double widthConstraint, double heightConstraint) 153 var size = base.GetDesiredSize(widthConstraint, heightConstraint); 165 var contentSize = potentialContentSize.Value;
Handlers\Items2\iOS\TemplatedCell2.cs (2)
81 var measure = 90 var measure =
Items\ItemsView.cs (3)
196 var minimumSize = new Size(40, 40); 198 var scaled = DeviceDisplay.MainDisplayInfo.GetScaledScreenSize(); 202 Size request = new Size(maxWidth, maxHeight);
Label\Label.iOS.cs (2)
11 protected override Size ArrangeOverride(Rect bounds) 13 var size = base.ArrangeOverride(bounds);
Layout\AndExpandLayoutManager.cs (2)
18 public Size Measure(double widthConstraint, double heightConstraint) 29 public Size ArrangeChildren(Rect bounds)
Layout\FlexExtensions.cs (1)
14 public static Size GetConstraints(this Flex.Item item)
Layout\FlexLayout.cs (4)
468 new public Graphics.Size CrossPlatformMeasure(double widthConstraint, double heightConstraint) 474 var result = layoutManager.Measure(widthConstraint, heightConstraint); 500 Size request; 504 var sizeConstraints = item.GetConstraints();
Layout\Layout.cs (2)
347 public Graphics.Size CrossPlatformMeasure(double widthConstraint, double heightConstraint) 352 public Graphics.Size CrossPlatformArrange(Graphics.Rect bounds)
Layout\StackLayoutManager.cs (2)
35 public Size ArrangeChildren(Rect bounds) 40 public Size Measure(double widthConstraint, double heightConstraint)
LegacyLayouts\AbsoluteLayout.cs (3)
97 var bestFitSize = new Size(); 98 var minimum = new Size(); 230 static Rect ComputeLayoutForRegion(View view, Size region)
LegacyLayouts\FlexLayout.cs (2)
311 var sizeConstrains = item.GetConstraints(); 314 var request = view.Measure(sizeConstrains.Width, sizeConstrains.Height, MeasureFlags.None).Request;
LegacyLayouts\GridCalc.cs (7)
81 var request = new Size(columnWidthSum + (structure.Columns.Count - 1) * ColumnSpacing, rowHeightSum + (structure.Rows.Count - 1) * RowSpacing); 82 var minimum = new Size(nonStarColumnWidthSum + (structure.Columns.Count - 1) * ColumnSpacing, nonStarRowHeightSum + (structure.Rows.Count - 1) * RowSpacing); 290 Size ComputeCurrentSize(double columnSpacing, double rowSpacing) 300 var currentSize = ComputeCurrentSize(columnSpacing, rowSpacing); 335 var currentSize = ComputeCurrentSize(columnSpacing, rowSpacing); 368 var request = ComputeCurrentSize(columnSpacing, rowSpacing); 431 var request = ComputeCurrentSize(columnSpacing, rowSpacing);
LegacyLayouts\Layout.cs (9)
77 Size ILayoutManager.Measure(double widthConstraint, double heightConstraint) 82 Size ILayoutManager.ArrangeChildren(Rect bounds) 109 Size _lastLayoutSize = new Size(-1, -1); 384 Size IView.Measure(double widthConstraint, double heightConstraint) 390 protected override Size MeasureOverride(double widthConstraint, double heightConstraint) 393 var sansMargins = OnMeasure(widthConstraint, heightConstraint).Request; 717 protected override Size ArrangeOverride(Rect bounds) 734 public Size CrossPlatformMeasure(double widthConstraint, double heightConstraint) 742 public Size CrossPlatformArrange(Rect bounds)
LegacyLayouts\StackLayout.cs (4)
250 Size minimum = layout.Requests[i].Minimum; 322 Size minimum = layout.Requests[i].Minimum; 477 public Size Constraint; 479 public Size MinimumSize;
ListView\ListView.cs (3)
424 var minimumSize = new Size(40, 40); 425 Size request; 427 var scaled = DeviceDisplay.MainDisplayInfo.GetScaledScreenSize();
PlatformConfiguration\AndroidSpecific\ImageButton.cs (7)
96 public static readonly BindableProperty ShadowOffsetProperty = BindableProperty.Create("ShadowOffset", typeof(Size), typeof(VisualElement), Size.Zero); 99 public static Size GetShadowOffset(BindableObject element) 101 return (Size)element.GetValue(ShadowOffsetProperty); 105 public static void SetShadowOffset(BindableObject element, Size value) 111 public static Size GetShadowOffset(this IPlatformElementConfiguration<Android, FormsImageButton> config) 117 public static IPlatformElementConfiguration<Android, FormsImageButton> SetShadowOffset(this IPlatformElementConfiguration<Android, FormsImageButton> config, Size value)
PlatformConfiguration\iOSSpecific\VisualElement.cs (7)
233 BindableProperty.Create("ShadowOffset", typeof(Size), 234 typeof(VisualElement), Size.Zero); 241 public static Size GetShadowOffset(BindableObject element) 243 return (Size)element.GetValue(ShadowOffsetProperty); 251 public static void SetShadowOffset(BindableObject element, Size 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)
PlatformConfiguration\WindowsSpecific\TabbedPage.cs (6)
20 BindableProperty.Create(nameof(HeaderIconsSizeProperty), typeof(Size), typeof(TabbedPage), new Size(16, 16)); 67 public static void SetHeaderIconsSize(BindableObject element, Size value) 73 public static Size GetHeaderIconsSize(BindableObject element) 75 return (Size)element.GetValue(HeaderIconsSizeProperty); 79 public static Size GetHeaderIconsSize(this IPlatformElementConfiguration<Windows, FormsElement> config) 86 this IPlatformElementConfiguration<Windows, FormsElement> config, Size value)
ScrollView\ScrollView.cs (11)
127 static readonly BindablePropertyKey ContentSizePropertyKey = BindableProperty.CreateReadOnly(nameof(ContentSize), typeof(Size), typeof(ScrollView), default(Size)); 176 ContentSize = Size.Zero; 181 var frameSize = view.Frame.Size; 189 public Size ContentSize 191 get { return (Size)GetValue(ContentSizeProperty); } 427 protected override Size MeasureOverride(double widthConstraint, double heightConstraint) 432 Size ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double heightConstraint) 436 ContentSize = Size.Zero; 460 protected override Size ArrangeOverride(Rect bounds) 468 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
Shapes\ArcSegment.cs (4)
17 public ArcSegment(Point point, Size size, double rotationAngle, SweepDirection sweepDirection, bool isLargeArc) 32 BindableProperty.Create(nameof(Size), typeof(Size), typeof(ArcSegment), new Size(0, 0)); 55 public Size Size 58 get { return (Size)GetValue(SizeProperty); }
Shapes\Shape.cs (2)
374 protected override Size MeasureOverride(double widthConstraint, double heightConstraint) 376 var result = base.MeasureOverride(widthConstraint, heightConstraint);
TableView\TableView.cs (3)
137 var minimumSize = new Size(40, 40); 138 var scaled = DeviceDisplay.MainDisplayInfo.GetScaledScreenSize(); 140 var request = new Size(width, Math.Max(scaled.Width, scaled.Height));
TemplatedView\TemplatedView.cs (4)
130 protected override Size MeasureOverride(double widthConstraint, double heightConstraint) 135 Size ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double heightConstraint) 140 protected override Size ArrangeOverride(Rect bounds) 147 Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
VisualElement\VisualElement.cs (12)
496 readonly Dictionary<Size, SizeRequest> _measureCache = new Dictionary<Size, SizeRequest>(); 1125 var constraintSize = new Size(widthConstraint, heightConstraint); 1138 Size request = result.Request; 1139 Size minimum = result.Minimum; 1182 public Size Measure(double widthConstraint, double heightConstraint) 1184 var result = (this as IView).Measure(widthConstraint, heightConstraint); 1882 public Size DesiredSize { get; protected set; } 1898 Size IView.Arrange(Rect bounds) 1909 protected virtual Size ArrangeOverride(Rect bounds) 1943 Size IView.Measure(double widthConstraint, double heightConstraint) 1955 protected virtual Size MeasureOverride(double widthConstraint, double heightConstraint)
Microsoft.Maui.Controls.Compatibility (41)
iOS\CollectionView\CarouselTemplatedCell.cs (3)
38 protected override (bool, Size) NeedsContentSizeUpdate(Size currentSize) 40 return (false, Size.Zero);
iOS\CollectionView\HeightConstrainedTemplatedCell.cs (4)
22 protected override (bool, Size) NeedsContentSizeUpdate(Size currentSize) 24 var size = Size.Zero;
iOS\CollectionView\TemplatedCell.cs (5)
25 Size _size; 113 _size = Size.Zero; 245 protected abstract (bool, Size) NeedsContentSizeUpdate(Size currentSize); 275 bool SizesAreSame(CGSize preferredSize, Size elementSize)
iOS\CollectionView\WidthConstrainedTemplatedCell.cs (4)
22 protected override (bool, Size) NeedsContentSizeUpdate(Size currentSize) 24 var size = Size.Zero;
iOS\Extensions\CompatibilityColorExtensions.cs (1)
55 public static SizeF ToSizeF(this Size size)
iOS\HandlerToRendererShim.cs (2)
74 var size = ViewHandler.GetDesiredSize(widthConstraint, heightConstraint); 78 public void SetElementSize(Size size)
iOS\IVisualElementRenderer.cs (1)
32 void SetElementSize(Size size);
iOS\Platform.cs (1)
232 return new SizeRequest(Size.Zero);
iOS\Renderers\CarouselPageRenderer.cs (1)
77 public void SetElementSize(Size size)
iOS\Renderers\NavigationRenderer.cs (4)
32 Size _queuedSize; 87 public void SetElementSize(Size size) 192 var modelSize = _queuedSize.IsZero ? Element.Bounds.Size : _queuedSize; 199 _queuedSize = Size.Zero;
iOS\Renderers\PageRenderer.cs (1)
97 public void SetElementSize(Size size)
iOS\Renderers\PhoneFlyoutPageRenderer.cs (1)
101 public void SetElementSize(Size size)
iOS\Renderers\ScrollViewRenderer.cs (1)
119 public void SetElementSize(Size size)
iOS\Renderers\SwipeViewRenderer.cs (6)
516 var swipeItemSize = GetSwipeItemSize(item); 638 var swipeItemSize = GetSwipeItemSize(swipeItemView); 1227 var swipeItemSize = GetSwipeItemSize(swipeItem); 1256 var swipeItemSize = GetSwipeItemSize(swipeItem); 1300 Size GetSwipeItemSize(ISwipeItem swipeItem) 1352 return Size.Zero;
iOS\Renderers\TabbedRenderer.cs (3)
29 Size _queuedSize; 96 public void SetElementSize(Size size) 152 _queuedSize = Size.Zero;
iOS\Renderers\TabletFlyoutPageRenderer.cs (1)
230 public void SetElementSize(Size size)
iOS\Renderers\WkWebViewRenderer.cs (1)
133 public void SetElementSize(Size size)
iOS\VisualElementRenderer.cs (1)
166 public void SetElementSize(Size size)
Microsoft.Maui.Controls.Foldable (4)
NoPlatformFoldableService.cs (1)
50 public Size ScaledScreenSize => DeviceDisplay.MainDisplayInfo.GetScaledScreenSize();
TwoPaneView.cs (3)
302 protected override Size MeasureOverride(double widthConstraint, double heightConstraint) 305 var sizeRequest = base.MeasureOverride(widthConstraint, heightConstraint); 309 protected override Size ArrangeOverride(Rect bounds)
Microsoft.Maui.Graphics (35)
Converters\SizeFTypeConverter.cs (3)
15 || destinationType == typeof(Size) 35 if (destinationType == typeof(Size)) 36 return (Size)size;
Converters\SizeTypeConverter.cs (4)
24 if (Size.TryParse(value?.ToString(), out var s)) 27 throw new InvalidOperationException(string.Format("Cannot convert \"{0}\" into {1}", value, typeof(Size))); 32 if (!(value is Size size))
Point.cs (3)
30 public Point(Size sz) : this() 85 public static explicit operator Size(Point pt) 95 public static Size operator -(Point ptA, Point ptB)
Rect.cs (3)
36 public Rect(Point loc, Size sz) : this(loc.X, loc.Y, sz.Width, sz.Height) 156 public Size Size 179 public Rect Inflate(Size sz)
Size.cs (21)
13 public static readonly Size Zero; 41 public static Size operator +(Size s1, Size s2) 46 public static Size operator -(Size s1, Size s2) 51 public static Size operator *(Size s1, double value) 56 public static Size operator /(Size s1, double value) 61 public static bool operator ==(Size s1, Size s2) 66 public static bool operator !=(Size s1, Size s2) 71 public static explicit operator Point(Size size) 76 public bool Equals(Size other) 85 return obj is Size && Equals((Size)obj); 106 public static implicit operator SizeF(Size s) => new SizeF((float)s.Width, (float)s.Height); 108 public static bool TryParse(string value, out Size size)
SizeF.cs (1)
122 public static implicit operator Size(SizeF s) => new Size(s.Width, s.Height);