100 instantiations of Size
Microsoft.Maui (28)
Animations\AnimationLerpingExtensions.cs (1)
30
new
Size
(start.Width.Lerp(end.Width, progress), start.Height.Lerp(end.Height, progress));
Handlers\CheckBox\CheckBoxHandler.iOS.cs (1)
71
size = new
Size
(width, height);
Handlers\ScrollView\ScrollViewHandler.iOS.cs (2)
166
return new
Size
(width, height);
191
return new
Size
(contentSize.Width + inset.HorizontalThickness, contentSize.Height + inset.VerticalThickness);
Handlers\SearchBar\SearchBarHandler.iOS.cs (1)
44
return new
Size
(PlatformView.Frame.Width, PlatformView.Frame.Height);
Handlers\ViewHandlerExtensions.iOS.cs (4)
73
return new
Size
(widthConstraint, heightConstraint);
108
var size = new
Size
(
115
size = new
Size
(platformView.Frame.Width, platformView.Frame.Height);
121
return new
Size
(finalWidth, finalHeight);
Handlers\WebView\WebViewHandler.iOS.cs (1)
121
size = new
Size
(width, height);
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);
Platform\iOS\CoreGraphicsExtensions.cs (1)
18
return new
Size
((float)size.Width, (float)size.Height);
Platform\iOS\MauiLabel.cs (1)
74
return AddInsets(new
Size
()
Platform\iOS\SwipeViewExtensions.cs (4)
23
return new
Size
(items.Mode == SwipeMode.Execute ? (threshold > 0 ? threshold : contentWidth) / items.Count : (threshold < SwipeItemWidth ? SwipeItemWidth : threshold), contentHeight);
37
return new
Size
(swipeItemWidth, contentHeight);
45
return new
Size
(contentWidth / items.Count, (threshold > 0 && threshold < swipeItemHeight) ? threshold : swipeItemHeight);
59
return new
Size
(contentWidth / items.Count, swipeItemHeight);
Platform\iOS\ViewExtensions.cs (1)
509
new Graphics.
Size
(view.Bounds.Width, view.Bounds.Height)
Microsoft.Maui.Controls (61)
BoxView\BoxView.cs (1)
49
return new SizeRequest(new
Size
(40, 40));
Button\Button.iOS.cs (3)
145
var returnSize = new
Size
(Math.Min(buttonContentWidth, widthConstraint),
149
return new
Size
((int)Math.Ceiling(returnSize.Width), (int)Math.Ceiling(returnSize.Height));
166
return new
Size
(bounds.Width, bounds.Height);
Compatibility\Handlers\NavigationPage\iOS\NavigationRenderer.cs (1)
85
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)
97
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);
Handlers\Items2\ItemsViewHandler2.iOS.cs (1)
196
return new
Size
(width, height);
ImageElement.cs (2)
55
return new SizeRequest(new
Size
(0, 0));
98
return new SizeRequest(new
Size
(width, height));
IndicatorView\IndicatorView.cs (1)
141
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)
299
return Handler?.GetDesiredSize(widthConstraint, heightConstraint) ??
new
();
ScrollView\ScrollView.cs (2)
186
ContentSize = new
Size
(frameSize.Width + margin.HorizontalThickness,
319
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)
1128
var constraintSize = new
Size
(widthConstraint, heightConstraint);
1216
result.Minimum = new
Size
(result.Minimum.Width + margin.HorizontalThickness, result.Minimum.Height + margin.VerticalThickness);
1217
result.Request = new
Size
(result.Request.Width + margin.HorizontalThickness, result.Request.Height + margin.VerticalThickness);
1315
return new SizeRequest(new
Size
(-1, -1));
1317
return Handler?.GetDesiredSize(widthConstraint, heightConstraint) ??
new
();
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);
343 references to Size
Microsoft.Maui (123)
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\CheckBox\CheckBoxHandler.iOS.cs (2)
42
public override
Size
GetDesiredSize(double widthConstraint, double heightConstraint)
44
var
size = base.GetDesiredSize(widthConstraint, heightConstraint);
Handlers\Editor\EditorHandler.iOS.cs (1)
73
public override
Size
GetDesiredSize(double widthConstraint, double heightConstraint)
Handlers\IViewHandler.cs (1)
31
Size
GetDesiredSize(double widthConstraint, double heightConstraint);
Handlers\ScrollView\ScrollViewHandler.iOS.cs (8)
147
Size
ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double heightConstraint)
151
return
Size
.Zero;
157
var
contentSize = MeasureContent(scrollView, scrollView.Padding, contentWidthConstraint, contentHeightConstraint);
169
static
Size
MeasureContent(IContentView contentView, Thickness inset, double widthConstraint, double heightConstraint)
173
var
contentSize =
Size
.Zero;
194
Size
ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
196
return (VirtualView as ICrossPlatformLayout)?.CrossPlatformArrange(bounds) ??
Size
.Zero;
Handlers\SearchBar\SearchBarHandler.iOS.cs (1)
39
public override
Size
GetDesiredSize(double widthConstraint, double heightConstraint)
Handlers\View\ViewHandler.cs (1)
178
public abstract
Size
GetDesiredSize(double widthConstraint, double heightConstraint);
Handlers\View\ViewHandlerOfT.iOS.cs (1)
19
public override
Size
GetDesiredSize(double widthConstraint, double heightConstraint) =>
Handlers\ViewHandlerExtensions.iOS.cs (3)
62
var
crossPlatformSize = virtualView.Measure(width, height);
66
internal static
Size
GetDesiredSizeFromHandler(this IViewHandler viewHandler, double widthConstraint, double heightConstraint)
108
var
size = new Size(
Handlers\WebView\WebViewHandler.iOS.cs (2)
93
public override
Size
GetDesiredSize(double widthConstraint, double heightConstraint)
95
var
size = base.GetDesiredSize(widthConstraint, heightConstraint);
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);
Platform\iOS\CoreGraphicsExtensions.cs (2)
16
public static
Size
ToSize(this CGSize size)
21
public static CGSize ToCGSize(this
Size
size)
Platform\iOS\GeneralWrapperView.cs (4)
56
public
Size
CrossPlatformArrange(Rect bounds)
59
return
Size
.Zero;
64
public
Size
CrossPlatformMeasure(double widthConstraint, double heightConstraint)
67
return
Size
.Zero;
Platform\iOS\MauiScrollView.cs (3)
54
var
crossPlatformBounds = AdjustedContentInset.InsetRect(bounds).Size.ToSize();
55
var
size = crossPlatformLayout.CrossPlatformArrange(new Rect(new Point(), crossPlatformBounds));
72
var
contentSize = crossPlatformLayout.CrossPlatformMeasure(widthConstraint, heightConstraint);
Platform\iOS\MauiSwipeView.cs (3)
343
var
swipeItemSize = Element.GetSwipeItemSize(item, _contentView, _swipeDirection);
908
var
swipeItemSize = Element.GetSwipeItemSize(swipeItem, _contentView, _swipeDirection);
939
var
swipeItemSize = Element.GetSwipeItemSize(swipeItem, _contentView, _swipeDirection);
Platform\iOS\MauiView.cs (5)
84
Size
CrossPlatformMeasure(double widthConstraint, double heightConstraint)
86
return CrossPlatformLayout?.CrossPlatformMeasure(widthConstraint, heightConstraint) ??
Size
.Zero;
89
Size
CrossPlatformArrange(Rect bounds)
91
return CrossPlatformLayout?.CrossPlatformArrange(bounds) ??
Size
.Zero;
104
var
crossPlatformSize = CrossPlatformMeasure(widthConstraint, heightConstraint);
Platform\iOS\ScrollViewExtensions.cs (1)
43
public static void UpdateContentSize(this UIScrollView scrollView,
Size
contentSize)
Platform\iOS\SwipeViewExtensions.cs (6)
9
internal static
Size
GetSwipeItemSize(this ISwipeView swipeView, ISwipeItem swipeItem, UIView contentView, SwipeDirection? swipeDirection)
14
return
Size
.Zero;
28
var
swipeItemViewSizeRequest = horizontalSwipeItemView.Measure(double.PositiveInfinity, double.PositiveInfinity);
50
var
swipeItemViewSizeRequest = verticalSwipeItemView.Measure(double.PositiveInfinity, double.PositiveInfinity);
63
return
Size
.Zero;
84
var
swipeItemViewSizeRequest = swipeItemView.Measure(double.PositiveInfinity, double.PositiveInfinity);
Platform\iOS\ViewExtensions.cs (2)
518
internal static
Size
LayoutToMeasuredSize(this IView view, double width, double height)
520
var
size = view.Measure(width, height);
Platform\iOS\WindowViewController.cs (1)
168
var
measured = iTitleBar.Measure(View.Bounds.Width, double.PositiveInfinity);
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 (181)
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;
145
var
returnSize = new Size(Math.Min(buttonContentWidth, widthConstraint),
156
/// <returns>Returns a <see cref="
Size
"/> representing the width and height of the button.</returns>
157
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)
1803
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)
73
protected override
Size
MeasureOverride(double widthConstraint, double heightConstraint)
87
protected override
Size
ArrangeOverride(Rect bounds)
94
Size
ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double heightConstraint)
100
Size
ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
143
Size
IContentView.CrossPlatformArrange(Rect bounds)
148
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()
549
var
request = formsElement.Measure(double.PositiveInfinity, CollectionView.Frame.Height);
554
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\ItemsViewController2.cs (1)
383
internal
Size
GetSize()
Handlers\Items2\iOS\TemplatedCell2.cs (2)
81
var
measure =
90
var
measure =
Handlers\Items2\ItemsViewHandler2.iOS.cs (2)
183
public override
Size
GetDesiredSize(double widthConstraint, double heightConstraint)
185
var
contentSize = Controller.GetSize();
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)
349
public Graphics.
Size
CrossPlatformMeasure(double widthConstraint, double heightConstraint)
354
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;
724
protected override
Size
ArrangeOverride(Rect bounds)
741
public
Size
CrossPlatformMeasure(double widthConstraint, double heightConstraint)
749
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)
129
static readonly BindablePropertyKey ContentSizePropertyKey = BindableProperty.CreateReadOnly(nameof(ContentSize), typeof(
Size
), typeof(ScrollView), default(
Size
));
178
ContentSize =
Size
.Zero;
183
var
frameSize = view.Frame.Size;
191
public
Size
ContentSize
193
get { return (
Size
)GetValue(ContentSizeProperty); }
429
protected override
Size
MeasureOverride(double widthConstraint, double heightConstraint)
434
Size
ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double heightConstraint)
438
ContentSize =
Size
.Zero;
462
protected override
Size
ArrangeOverride(Rect bounds)
470
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)
499
readonly Dictionary<
Size
, SizeRequest> _measureCache = new Dictionary<
Size
, SizeRequest>();
1128
var
constraintSize = new Size(widthConstraint, heightConstraint);
1141
Size
request = result.Request;
1142
Size
minimum = result.Minimum;
1185
public
Size
Measure(double widthConstraint, double heightConstraint)
1187
var
result = (this as IView).Measure(widthConstraint, heightConstraint);
1885
public
Size
DesiredSize { get; protected set; }
1901
Size
IView.Arrange(Rect bounds)
1912
protected virtual
Size
ArrangeOverride(Rect bounds)
1946
Size
IView.Measure(double widthConstraint, double heightConstraint)
1958
protected virtual
Size
MeasureOverride(double widthConstraint, double heightConstraint)
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);