29 writes to Width
Microsoft.Maui (4)
Layouts\AbsoluteLayoutManager.cs (1)
83
destination.
Width
= ResolveDimension(isWidthProportional, destination.Width, availableWidth, child.DesiredSize.Width);
Layouts\LayoutExtensions.cs (1)
225
bounds.
Width
= Math.Max(bounds.Width, presentedContent.DesiredSize.Width + padding.HorizontalThickness);
VisualDiagnostics\AdornerModel.cs (2)
50
rc.
Width
= Math.Abs(margin.Left);
61
rc.
Width
= Math.Abs(margin.Right);
Microsoft.Maui.Controls (21)
LegacyLayouts\AbsoluteLayout.cs (4)
244
result.
Width
= DeviceDisplay.MainDisplayInfo.DisplayRound(region.Width * bounds.Width);
248
result.
Width
= bounds.Width;
266
result.
Width
= sizeRequest.Request.Width;
273
result.
Width
= sizeRequest.Request.Width;
LegacyLayouts\Layout.cs (4)
257
region.
Width
-= diff;
273
region.
Width
-= margin.HorizontalThickness;
521
region.
Width
-= diff;
538
region.
Width
-= margin.HorizontalThickness;
LegacyLayouts\StackLayout.cs (6)
114
layout.Plots[i].
Width
= widthConstraint;
279
plot.
Width
= newWidth;
341
plot.
Width
= newRequest.Request.Width;
353
layout.Bounds.
Width
= Math.Max(layout.Bounds.Width, plot.Width);
462
plot.
Width
+= spacePerExpander;
469
layout.Bounds.
Width
= widthConstraint;
Page\Page.cs (2)
424
area.
Width
-= Padding.HorizontalThickness;
426
area.
Width
= Math.Max(0, area.Width);
Region.cs (1)
111
region.
Width
+= right + left;
Shapes\Matrix.cs (3)
711
rect.
Width
*= matrix._m11;
717
rect.
Width
= -rect.Width;
747
rect.
Width
= Math.Max(Math.Max(point0.X, point1.X), Math.Max(point2.X, point3.X)) - rect.X;
Shapes\Shape.cs (1)
285
viewBounds.
Width
-= StrokeThickness;
Microsoft.Maui.Graphics (4)
Rect.cs (4)
32
Width
= width;
145
set =>
Width
= value - X;
161
Width
= value.Width;
189
r.
Width
+= width * 2;
151 references to Width
Microsoft.Maui (19)
Graphics\RectangleExtensions.cs (2)
18
rectangle.
Width
- (2 * inset), rectangle.Height - (2 * inset));
22
point.X >= 0 && point.X <= rect.
Width
&&
Layouts\AbsoluteLayoutManager.cs (5)
41
var measureWidth = ResolveChildMeasureConstraint(bounds.
Width
, isWidthProportional, widthConstraint);
46
var width = ResolveDimension(isWidthProportional, bounds.
Width
, availableWidth, measure.Width);
65
double availableWidth = bounds.
Width
- padding.HorizontalThickness;
83
destination.Width = ResolveDimension(isWidthProportional, destination.
Width
, availableWidth, child.DesiredSize.Width);
88
destination.X = (availableWidth - destination.
Width
) * destination.X;
Layouts\FlexLayoutManager.cs (2)
22
double availableWidth = bounds.
Width
- padding.HorizontalThickness;
32
|| double.IsNaN(frame.
Width
)
Layouts\GridLayoutManager.cs (1)
34
_gridStructure ??= new GridStructure(Grid, bounds.
Width
, bounds.Height);
Layouts\HorizontalStackLayoutManager.cs (1)
85
return destination.
Width
;
Layouts\LayoutExtensions.cs (6)
46
consumedWidth = Math.Min(bounds.
Width
, view.MaximumWidth);
84
desiredWidth = IsExplicitSet(view.Width) ? desiredWidth : Math.Min(bounds.
Width
, view.MaximumWidth);
87
return AlignHorizontal(bounds.X, margin.Left, margin.Right, bounds.
Width
, desiredWidth, alignment);
180
bounds.
Width
- padding.HorizontalThickness, bounds.Height - padding.VerticalThickness);
189
size.Width = Math.Max(bounds.
Width
, size.Width);
225
bounds.Width = Math.Max(bounds.
Width
, presentedContent.DesiredSize.Width + padding.HorizontalThickness);
Layouts\VerticalStackLayoutManager.cs (1)
52
double width = bounds.
Width
- padding.HorizontalThickness;
VisualDiagnostics\RectangleGridAdorner.cs (1)
31
var width = (float)DrawnRectangle.
Width
;
Microsoft.Maui.Controls (68)
Button\Button.iOS.cs (2)
179
return new Size(bounds.
Width
, bounds.Height);
207
var titleRect = ComputeTitleRect(platformButton, button, image, size.
Width
, size.Height, borderWidth, padding, false);
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (4)
690
targetFrame.X = (float)Element.Bounds.
Width
- (flyoutWidth + targetFrame.X);
727
flyoutOffsetX = (float)Element.Bounds.
Width
- flyoutFrame.X;
766
: ((float)Element.Bounds.
Width
- targetFrame.Right) / flyoutWidth;
772
: ((float)Element.Bounds.
Width
- targetFrame.X) / flyoutWidth;
Editor\Editor.cs (1)
171
TheSame(_previousWidthConstraint, _previousBounds.
Width
)))
Handlers\Items\iOS\HeightConstrainedTemplatedCell.cs (1)
31
if (bounds.
Width
<= 0 || bounds.Height <= 0)
Handlers\Items\iOS\WidthConstrainedTemplatedCell.cs (3)
31
if (bounds.
Width
<= 0 || bounds.Height <= 0)
36
var desiredBounds = PlatformHandler.VirtualView.Measure(bounds.
Width
, double.PositiveInfinity);
45
desiredBounds.Width = bounds.
Width
;
Layout\AndExpandLayoutManager.cs (1)
35
Measure(bounds.
Width
, bounds.Height);
Layout\BoundsTypeConverter.cs (2)
60
return $"{rect.X.ToString(CultureInfo.InvariantCulture)}, {rect.Y.ToString(CultureInfo.InvariantCulture)}, {(rect.
Width
== AbsoluteLayout.AutoSize ? nameof(AbsoluteLayout.AutoSize) : rect.
Width
.ToString(CultureInfo.InvariantCulture))}, {(rect.Height == AbsoluteLayout.AutoSize ? nameof(AbsoluteLayout.AutoSize) : rect.Height.ToString(CultureInfo.InvariantCulture))}";
LegacyLayouts\AbsoluteLayout.cs (13)
129
bool widthLocked = layoutBounds.
Width
!= AutoSize;
143
if (layoutBounds.
Width
!= AutoSize)
189
if (!widthIsProportional && bounds.
Width
!= AutoSize)
192
width += bounds.
Width
;
193
minWidth += bounds.
Width
;
204
width += sizeRequest.Value.Request.Width / Math.Max(0.25, bounds.
Width
);
244
result.Width = DeviceDisplay.MainDisplayInfo.DisplayRound(region.Width * bounds.
Width
);
246
else if (bounds.
Width
!= AutoSize)
248
result.Width = bounds.
Width
;
260
if (!widthIsProportional && bounds.
Width
== AutoSize)
262
if (!heightIsProportional && bounds.
Width
== AutoSize)
279
sizeRequest = view.Measure(result.
Width
, region.Height, MeasureFlags.IncludeMargins);
285
result.X = Math.Round((region.Width - result.
Width
) * bounds.X);
LegacyLayouts\FlexLayout.cs (1)
426
|| double.IsNaN(frame.
Width
)
LegacyLayouts\Layout.cs (10)
84
LayoutChildren(bounds.X, bounds.Y, bounds.
Width
, bounds.Height);
227
region = new Rect(parent.Width - region.Right, region.Y, region.
Width
, region.Height);
247
SizeRequest request = child.Measure(region.
Width
, region.Height, MeasureFlags.IncludeMargins);
249
double diff = Math.Max(0, region.
Width
- request.Request.Width);
264
SizeRequest request = child.Measure(region.
Width
, region.Height, MeasureFlags.IncludeMargins);
493
region = new Rect(parent.Width - region.Right, region.Y, region.
Width
, region.Height);
505
bool canUseAlreadyDoneRequest = region.
Width
>= childSizeRequest.Request.Width && region.Height >= childSizeRequest.Request.Height;
511
SizeRequest request = canUseAlreadyDoneRequest ? childSizeRequest : child.Measure(region.
Width
, region.Height, MeasureFlags.IncludeMargins);
513
double diff = Math.Max(0, region.
Width
- request.Request.Width);
528
SizeRequest request = canUseAlreadyDoneRequest ? childSizeRequest : child.Measure(region.
Width
, region.Height, MeasureFlags.IncludeMargins);
LegacyLayouts\StackLayout.cs (7)
234
if (widthConstraint >= layout.Bounds.
Width
)
240
double requiredCompression = layout.Bounds.
Width
- widthConstraint;
255
double availableSpace = plot.
Width
- minimum.Width;
264
double newWidth = plot.
Width
- compression;
353
layout.Bounds.Width = Math.Max(layout.Bounds.
Width
, plot.
Width
);
445
double extraSpace = widthConstraint - layout.Bounds.
Width
;
Page\Page.cs (1)
426
area.Width = Math.Max(0, area.
Width
);
Shapes\Matrix.cs (3)
714
if (rect.
Width
< 0.0)
716
rect.X += rect.
Width
;
717
rect.Width = -rect.
Width
;
Shapes\RectangleGeometry.cs (1)
37
float w = (float)Rect.
Width
;
Shapes\RoundRectangle.cs (2)
76
_fallbackWidth = viewBounds.
Width
;
107
_fallbackWidth = viewBounds.
Width
;
Shapes\RoundRectangleGeometry.cs (7)
80
new EllipseGeometry(new Point(Rect.Location.X + Rect.
Width
- CornerRadius.TopRight, Rect.Location.Y + CornerRadius.TopRight), CornerRadius.TopRight, CornerRadius.TopRight));
84
new EllipseGeometry(new Point(Rect.Location.X + Rect.
Width
- CornerRadius.BottomRight, Rect.Location.Y + Rect.Height - CornerRadius.BottomRight), CornerRadius.BottomRight, CornerRadius.BottomRight));
96
new LineSegment { Point = new Point(Rect.Location.X + Rect.
Width
- CornerRadius.TopRight, Rect.Location.Y) },
97
new LineSegment { Point = new Point(Rect.Location.X + Rect.
Width
, Rect.Location.Y + CornerRadius.TopRight) },
98
new LineSegment { Point = new Point(Rect.Location.X + Rect.
Width
, Rect.Location.Y + Rect.Height - CornerRadius.BottomRight) },
99
new LineSegment { Point = new Point(Rect.Location.X + Rect.
Width
- CornerRadius.BottomRight, Rect.Location.Y + Rect.Height) },
120
float w = (float)Rect.
Width
;
Shapes\Shape.cs (3)
266
_fallbackWidth = viewBounds.
Width
;
310
float calculatedWidth = (float)(viewBounds.
Width
/ pathBounds.Width);
336
(viewBounds.
Width
- minScale * pathBounds.Width) / 2),
ViewExtensions.cs (3)
99
double w = start.
Width
+ (bounds.
Width
- start.
Width
) * progress;
VisualElement\VisualElement.cs (1)
1761
Width = bounds.
Width
;
Window\Window.cs (2)
221
var shouldTriggerSizeChanged = (Width != frame.
Width
) || (Height != frame.Height);
225
SetValue(WidthProperty, frame.
Width
, SetterSpecificity.FromHandler);
Microsoft.Maui.Controls.Compatibility (5)
iOS\CollectionView\HeightConstrainedTemplatedCell.cs (1)
33
if (bounds.
Width
<= 0 || bounds.Height <= 0)
iOS\CollectionView\WidthConstrainedTemplatedCell.cs (2)
33
if (bounds.
Width
<= 0 || bounds.Height <= 0)
38
var desiredBounds = VisualElementRenderer.Element.Measure(bounds.
Width
, double.PositiveInfinity,
iOS\Extensions\CompatibilityColorExtensions.cs (1)
70
return new RectangleF((nfloat)rect.X, (nfloat)rect.Y, (nfloat)rect.
Width
, (nfloat)rect.Height);
iOS\Extensions\GeometryExtensions.cs (1)
40
pathData.Data.AddRect(transform, new CGRect(rect.X, rect.Y, rect.
Width
, rect.Height));
Microsoft.Maui.Controls.Foldable (34)
DualScreenInfo.cs (4)
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) };
TwoPaneView.cs (7)
470
columnMiddle.Width = new GridLength(hinge.
Width
, GridUnitType.Absolute);
471
columnLeft.Width = new GridLength(pane1.
Width
, GridUnitType.Absolute);
472
columnRight.Width = new GridLength(pane2.
Width
, GridUnitType.Absolute);
529
_content2.Padding = new Thickness(0, 0, newWidth - pane1.
Width
, 0);
547
_content1.Padding = new Thickness(0, 0, newWidth - pane1.
Width
, 0);
600
_content1.Padding = new Thickness(pane1.X, pane1.Y, newWidth - pane1.
Width
- pane1.X, newHeight - pane1.Height - pane1.Y);
618
_content2.Padding = new Thickness(pane1.X, pane1.Y, newWidth - pane1.
Width
- pane1.X, newHeight - pane1.Height - pane1.Y);
TwoPaneViewLayoutGuide.cs (23)
199
if (containerArea.
Width
<= 0)
212
bool hingeIsVertical = Hinge.Height > Hinge.
Width
;
218
var pane2X = Hinge.X + Hinge.
Width
;
219
var containerRightX = locationOnScreen.X + locationOnScreen.
Width
;
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);
241
var containerRightX = locationOnScreen.X + locationOnScreen.
Width
;
242
var hingeRightX = Hinge.X + Hinge.
Width
;
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);
284
if (_newPane2.Height < 0 || _newPane2.
Width
< 0)
287
if (_newPane1.Height < 0 || _newPane1.
Width
< 0)
315
bool hingeIsVertical = Hinge.Height > Hinge.
Width
;
326
if (layoutBounds.X < hinge.X && layoutBounds.X + layoutBounds.
Width
> (hinge.X + hinge.
Width
))
340
if (layoutBounds.X < hinge.X && layoutBounds.X + layoutBounds.
Width
> (hinge.X + hinge.
Width
))
361
if (hinge.Height > hinge.
Width
)
Microsoft.Maui.Graphics (25)
CanvasExtensions.cs (13)
12
target.DrawRectangle((float)rect.X, (float)rect.Y, (float)rect.
Width
, (float)rect.Height);
22
target.FillRectangle((float)rect.X, (float)rect.Y, (float)rect.
Width
, (float)rect.Height);
32
target.DrawRoundedRectangle((float)rect.X, (float)rect.Y, (float)rect.
Width
, (float)rect.Height, (float)cornerRadius);
50
path.AppendRoundedRectangle((float)rect.X, (float)rect.Y, (float)rect.
Width
, (float)rect.Height, (float)topLeftCornerRadius, (float)topRightCornerRadius, (float)bottomLeftCornerRadius, (float)bottomRightCornerRadius);
70
target.FillRoundedRectangle((float)rect.X, (float)rect.Y, (float)rect.
Width
, (float)rect.Height, (float)cornerRadius);
88
path.AppendRoundedRectangle((float)rect.X, (float)rect.Y, (float)rect.
Width
, (float)rect.Height, (float)topLeftCornerRadius, (float)topRightCornerRadius, (float)bottomLeftCornerRadius, (float)bottomRightCornerRadius);
108
target.DrawEllipse((float)rect.X, (float)rect.Y, (float)rect.
Width
, (float)rect.Height);
118
target.FillEllipse((float)rect.X, (float)rect.Y, (float)rect.
Width
, (float)rect.Height);
148
target.ClipRectangle((float)rect.X, (float)rect.Y, (float)rect.
Width
, (float)rect.Height);
165
target.DrawString(value, (float)bounds.X, (float)bounds.Y, (float)bounds.
Width
, (float)bounds.Height, horizontalAlignment, verticalAlignment, textFlow, lineSpacingAdjustment);
282
canvas.DrawArc((float)bounds.X, (float)bounds.Y, (float)bounds.
Width
, (float)bounds.Height, startAngle, endAngle, clockwise, closed);
311
canvas.FillArc((float)bounds.X, (float)bounds.Y, (float)bounds.
Width
, (float)bounds.Height, startAngle, endAngle, clockwise);
370
target.SubtractFromClip((float)rect.X, (float)rect.Y, (float)rect.
Width
, (float)rect.Height);
Converters\RectTypeConverter.cs (1)
48
return $"{r.X.ToString(CultureInfo.InvariantCulture)}, {r.Y.ToString(CultureInfo.InvariantCulture)}, {r.
Width
.ToString(CultureInfo.InvariantCulture)}, {r.Height.ToString(CultureInfo.InvariantCulture)}";
Rect.cs (11)
24
return string.Format("{{X={0} Y={1} Width={2} Height={3}}}", X.ToString(CultureInfo.InvariantCulture), Y.ToString(CultureInfo.InvariantCulture),
Width
.ToString(CultureInfo.InvariantCulture), Height.ToString(CultureInfo.InvariantCulture));
47
return X.Equals(other.X) && Y.Equals(other.Y) &&
Width
.Equals(other.
Width
) && Height.Equals(other.Height);
63
hashCode = (hashCode * 397) ^
Width
.GetHashCode();
144
get => X +
Width
;
154
public bool IsEmpty => (
Width
<= 0) || (Height <= 0);
158
get => new Size(
Width
, Height);
176
public Point Center => new Point(X +
Width
/ 2, Y + Height / 2);
209
return new Rect(Math.Round(X), Math.Round(Y), Math.Round(
Width
), Math.Round(Height));
216
width =
Width
;
220
public static implicit operator RectF(Rect rect) => new RectF((float)rect.X, (float)rect.Y, (float)rect.
Width
, (float)rect.Height);