24 writes to Width
Microsoft.Maui (1)
Layouts\LayoutExtensions.cs (1)
189 size.Width = Math.Max(bounds.Width, size.Width);
Microsoft.Maui.Controls (20)
ContentPresenter.cs (1)
64 Request = new Size { Width = widthRequest != -1 ? widthRequest : childRequest.Request.Width, Height = heightRequest != -1 ? heightRequest : childRequest.Request.Height },
Handlers\Items\iOS\WidthConstrainedTemplatedCell.cs (1)
45 desiredBounds.Width = bounds.Width;
Handlers\Items\ItemsViewHandler.iOS.cs (2)
169 size.Width = contentSize.Width <= widthConstraint ? contentSize.Width : widthConstraint; 174 size.Width = ViewHandlerExtensions.ResolveConstraints(size.Width, virtualView.Width, virtualView.MinimumWidth, virtualView.MaximumWidth);
Layout\FlexLayout.cs (2)
506 sizeConstraints.Width = (inMeasureMode && sizeConstraints.Width == 0) ? double.PositiveInfinity : sizeConstraints.Width; 515 sizeConstraints.Width = double.PositiveInfinity;
LegacyLayouts\AbsoluteLayout.cs (2)
103 bestFitSize.Width = Math.Max(bestFitSize.Width, desiredSize.Request.Width); 105 minimum.Width = Math.Max(minimum.Width, desiredSize.Minimum.Width);
LegacyLayouts\FlexLayout.cs (1)
312 sizeConstrains.Width = (inMeasureMode && sizeConstrains.Width == 0) ? double.PositiveInfinity : sizeConstrains.Width;
Shapes\Shape.cs (6)
389 result.Width = boundsByFlattening.Width; 403 result.Width += pathBounds.X; 414 result.Width = widthConstraint; 423 result.Width *= minScale; 435 result.Width *= maxScale; 441 result.Width += StrokeThickness;
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 (4)
1150 request.Width = widthRequest; 1152 minimum.Width = widthRequest; 1161 minimum.Width = minimumWidthRequest; 1164 minimum.Width = Math.Min(request.Width, minimum.Width);
Microsoft.Maui.Graphics (3)
Size.cs (3)
17 Width = size; 23 Width = width; 29 Width = vector.X;
184 references to Width
Microsoft.Maui (22)
Animations\AnimationLerpingExtensions.cs (2)
30 new Size(start.Width.Lerp(end.Width, progress), start.Height.Lerp(end.Height, progress));
Layouts\AbsoluteLayoutManager.cs (2)
46 var width = ResolveDimension(isWidthProportional, bounds.Width, availableWidth, measure.Width); 83 destination.Width = ResolveDimension(isWidthProportional, destination.Width, availableWidth, child.DesiredSize.Width);
Layouts\GridLayoutManager.cs (7)
412 _columns[cell.Column].Update(measure.Width); 416 TrackSpan(new Span(cell.Column, cell.ColumnSpan, true, measure.Width)); 479 TrackSpan(new Span(cell.Column, cell.ColumnSpan, true, measure.Width)); 485 _columns[cell.Column].Update(measure.Width); 667 static double getDimension(Size size) => size.Width; 750 var cellRequiredWidth = Math.Min(_gridWidthConstraint, _childrenToLayOut[cell.ViewIndex].DesiredSize.Width); 828 ExpandStarDefinitions(_columns, targetSize.Width - _padding.HorizontalThickness, GridMinimumWidth() - _padding.HorizontalThickness,
Layouts\HorizontalStackLayoutManager.cs (2)
31 measuredWidth += measure.Width; 83 var destination = new Rect(x, top, child.DesiredSize.Width, height);
Layouts\LayoutExtensions.cs (6)
30 return new Size(measureWithoutMargins.Width + margin.HorizontalThickness, 39 var consumedWidth = view.DesiredSize.Width; 75 var desiredWidth = view.DesiredSize.Width; 167 return new Size(contentSize.Width + inset.HorizontalThickness, contentSize.Height + inset.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)
33 measuredWidth = Math.Max(measuredWidth, measure.Width);
Primitives\Thickness.cs (2)
57 return new Thickness(size.Width, size.Height, size.Width, size.Height);
Microsoft.Maui.Controls (101)
Button\Button.iOS.cs (1)
162 return new Size((int)Math.Ceiling(returnSize.Width), (int)Math.Ceiling(returnSize.Height));
Compatibility\Handlers\FlyoutPage\iOS\PhoneFlyoutPageRenderer.cs (1)
115 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height));
Compatibility\Handlers\ListView\iOS\ListViewRenderer.cs (2)
362 var platformFrame = new RectangleF(0, 0, size.Width, size.Height); 382 var platformFrame = new RectangleF(0, 0, size.Width, size.Height);
Compatibility\Handlers\Shell\iOS\ShellRenderer.cs (1)
136 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height));
Compatibility\Handlers\VisualElementRenderer.cs (12)
132 if (size.Height < minSize.Height || size.Width < minSize.Width) 135 size.Width < minSize.Width ? minSize.Width : size.Width, 150 if (size.Height < minSize.Height || size.Width < minSize.Width) 153 size.Width < minSize.Width ? minSize.Width : size.Width,
Compatibility\iOS\Extensions\UIViewExtensions.cs (1)
49 var minimum = new Size(minimumWidth < 0 ? request.Width : minimumWidth,
ContentPresenter.cs (1)
64 Request = new Size { Width = widthRequest != -1 ? widthRequest : childRequest.Request.Width, Height = heightRequest != -1 ? heightRequest : childRequest.Request.Height },
Handlers\Items\iOS\HeightConstrainedTemplatedCell.cs (2)
38 if (desiredBounds.Width == currentSize.Width)
Handlers\Items\iOS\HorizontalCell.cs (1)
23 return new CGSize(measure.Width, ConstrainedDimension);
Handlers\Items\iOS\HorizontalTemplatedHeaderView.cs (1)
30 ? PlatformHandler.VirtualView.Width : measure.Width;
Handlers\Items\iOS\ItemsViewController.cs (1)
555 formsElement.Arrange(new Rect(0, 0, request.Width, CollectionView.Frame.Height));
Handlers\Items\iOS\SizeExtensions.cs (1)
34 if (Math.Abs(sizeA.Width - sizeB.Width) > Tolerance)
Handlers\Items\ItemsViewHandler.iOS.cs (3)
169 size.Width = contentSize.Width <= widthConstraint ? contentSize.Width : widthConstraint; 174 size.Width = ViewHandlerExtensions.ResolveConstraints(size.Width, virtualView.Width, virtualView.MinimumWidth, virtualView.MaximumWidth);
Handlers\Items2\iOS\TemplatedCell2.cs (1)
95 measure.Width, preferredAttributes.Frame.Height);
ImageElement.cs (2)
48 double desiredAspect = desiredSize.Request.Width / desiredSize.Request.Height; 51 double desiredWidth = desiredSize.Request.Width;
Items\ItemsView.cs (1)
199 var maxWidth = Math.Min(scaled.Width, widthConstraint);
Layout\FlexLayout.cs (4)
506 sizeConstraints.Width = (inMeasureMode && sizeConstraints.Width == 0) ? double.PositiveInfinity : sizeConstraints.Width; 519 request = child.Measure(sizeConstraints.Width, sizeConstraints.Height); 526 w = (float)request.Width;
LegacyLayouts\AbsoluteLayout.cs (13)
103 bestFitSize.Width = Math.Max(bestFitSize.Width, desiredSize.Request.Width); 105 minimum.Width = Math.Max(minimum.Width, desiredSize.Minimum.Width); 198 width += sizeRequest.Value.Request.Width; 199 minWidth += sizeRequest.Value.Minimum.Width; 204 width += sizeRequest.Value.Request.Width / Math.Max(0.25, bounds.Width); 244 result.Width = DeviceDisplay.MainDisplayInfo.DisplayRound(region.Width * bounds.Width); 265 sizeRequest = view.Measure(region.Width, region.Height, MeasureFlags.IncludeMargins); 266 result.Width = sizeRequest.Request.Width; 272 sizeRequest = view.Measure(region.Width, result.Height, MeasureFlags.IncludeMargins); 273 result.Width = sizeRequest.Request.Width; 285 result.X = Math.Round((region.Width - result.Width) * bounds.X);
LegacyLayouts\FlexLayout.cs (4)
312 sizeConstrains.Width = (inMeasureMode && sizeConstrains.Width == 0) ? double.PositiveInfinity : sizeConstrains.Width; 314 var request = view.Measure(sizeConstrains.Width, sizeConstrains.Height, MeasureFlags.None).Request; 315 w = (float)request.Width;
LegacyLayouts\GridCalc.cs (10)
234 actualWidth = Math.Max(actualWidth, sizeRequest.Request.Width - assignedWidth - (GetColumnSpan(child) - 1) * grid.ColumnSpacing); 235 minimumWidth = Math.Max(minimumWidth, sizeRequest.Minimum.Width - assignedWidth - (GetColumnSpan(child) - 1) * grid.ColumnSpacing); 302 if (currentSize.Width <= targetWidth) 317 double contractionNeeded = Math.Min(contractionSpace, Math.Max(currentSize.Width - targetWidth, 0)); 370 if (request.Width <= targetWidth) 411 double contractionNeeded = Math.Min(contractionSpace, Math.Max(request.Width - targetWidth, 0)); 545 double requiredWidth = expandToRequest ? sizeRequest.Request.Width : sizeRequest.Minimum.Width; 677 actualWidth = Math.Max(actualWidth, sizeRequest.Request.Width - assignedWidth - columnSpacing); 678 minimumWidth = Math.Max(minimumWidth, sizeRequest.Minimum.Width - assignedWidth - columnSpacing);
LegacyLayouts\Layout.cs (6)
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)); 249 double diff = Math.Max(0, region.Width - request.Request.Width); 395 return new Size(sansMargins.Width + Margin.HorizontalThickness, sansMargins.Height + Margin.VerticalThickness); 505 bool canUseAlreadyDoneRequest = region.Width >= childSizeRequest.Request.Width && region.Height >= childSizeRequest.Request.Height; 513 double diff = Math.Max(0, region.Width - request.Request.Width);
LegacyLayouts\RelativeLayout.cs (2)
310 width = () => view.Measure(Width, heightConstraint != null ? height() : Height, MeasureFlags.IncludeMargins).Request.Width; 373 Func<double> widthCompiled = width != null ? width.Compile() : () => view.Measure(Parent.Width, Parent.Height, MeasureFlags.IncludeMargins).Request.Width;
LegacyLayouts\StackLayout.cs (13)
58 if (width == layoutInformationCopy.Constraint.Width && height == layoutInformationCopy.Constraint.Height) 175 var bounds = new Rect(x, yOffset, request.Request.Width, request.Request.Height); 181 boundsWidth = Math.Max(boundsWidth, request.Request.Width); 184 minimumWidth = Math.Max(minimumWidth, request.Minimum.Width); 210 var bounds = new Rect(xOffset, y, request.Request.Width, request.Request.Height); 213 layout.CompressionSpace += Math.Max(0, request.Request.Width - request.Minimum.Width); 218 minimumWidth += request.Minimum.Width + spacing; 255 double availableSpace = plot.Width - minimum.Width; 271 if (newRequest.Request.Width < newWidth) 273 double delta = newWidth - newRequest.Request.Width; 274 newWidth = newRequest.Request.Width; 341 plot.Width = newRequest.Request.Width;
ListView\ListView.cs (2)
428 double width = Math.Min(scaled.Width, scaled.Height); 439 request = new Size(width, Math.Max(scaled.Width, scaled.Height));
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\GeometryHelper.cs (1)
211 arcSeg.Size.Width,
Shapes\PathFigureCollectionConverter.cs (1)
639 .Append(arcSegment.Size.Width)
Shapes\PathGeometry.cs (1)
105 arcSegment.Size.Width,
Shapes\Shape.cs (2)
378 if (result.Width != 0 && result.Height != 0) 394 double scaleX = widthConstraint / result.Width;
TableView\TableView.cs (2)
139 double width = Math.Min(scaled.Width, scaled.Height); 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)
1164 minimum.Width = Math.Min(request.Width, minimum.Width); 1168 if (r.Request.Width > 0 && r.Request.Height > 0) 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);
Microsoft.Maui.Controls.Compatibility (38)
iOS\CollectionView\HeightConstrainedTemplatedCell.cs (2)
41 if (desiredBounds.Request.Width == currentSize.Width)
iOS\CollectionView\HorizontalCell.cs (1)
24 return new CGSize(measure.Request.Width, ConstrainedDimension);
iOS\CollectionView\HorizontalTemplatedHeaderView.cs (1)
30 ? VisualElementRenderer.Element.Width : measure.Request.Width;
iOS\CollectionView\ItemsViewController.cs (1)
390 Controls.Compatibility.Layout.LayoutChildIntoBoundingRegion(formsElement, new Rect(0, 0, request.Request.Width, CollectionView.Frame.Height));
iOS\CollectionView\TemplatedCell.cs (1)
284 if (Math.Abs(preferredSize.Width - elementSize.Width) > tolerance)
iOS\Extensions\CompatibilityColorExtensions.cs (1)
57 return new SizeF((float)size.Width, (float)size.Height);
iOS\Extensions\GeometryExtensions.cs (1)
179 arcSegment.Size.Width,
iOS\HandlerToRendererShim.cs (1)
80 Layout.LayoutChildIntoBoundingRegion(Element, new Rect(Element.X, Element.Y, size.Width, size.Height));
iOS\Renderers\CarouselPageRenderer.cs (1)
79 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height));
iOS\Renderers\CheckBoxRendererBase.cs (1)
61 if (sizeConstraint.Request.Width == 0)
iOS\Renderers\EntryRenderer.cs (1)
72 return new SizeRequest(new Size(baseResult.Request.Width, height));
iOS\Renderers\IndicatorViewRenderer.cs (1)
169 indicatorLayout.Layout(new Rect(0, 0, indicatorLayoutSizeRequest.Request.Width, indicatorLayoutSizeRequest.Request.Height));
iOS\Renderers\LabelRenderer.cs (4)
63 _perfectSize.Minimum = new Size(Math.Min(10, _perfectSize.Request.Width), _perfectSize.Request.Height); 67 var widthFits = widthConstraint >= _perfectSize.Request.Width; 74 var tinyWidth = Math.Min(10, result.Request.Width); 85 bool textExceedsContainer = result.Request.Width > widthConstraint;
iOS\Renderers\NavigationRenderer.cs (3)
90 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height)); 194 new Rect(0, toolbar.Hidden ? 0 : toolbar.Frame.Height, modelSize.Width, modelSize.Height - trueBottom); 198 Element.Layout(new Rect(Element.X, Element.Y, _queuedSize.Width, _queuedSize.Height));
iOS\Renderers\PageRenderer.cs (2)
100 var rect = new CoreGraphics.CGRect(Element.X, Element.Y, size.Width, size.Height); 104 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height));
iOS\Renderers\PhoneFlyoutPageRenderer.cs (1)
103 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height));
iOS\Renderers\ScrollViewRenderer.cs (1)
121 Layout.LayoutChildIntoBoundingRegion(Element, new Rect(Element.X, Element.Y, size.Width, size.Height));
iOS\Renderers\SearchBarRenderer.cs (1)
185 size.Width = (nfloat)(Element?.Parent is VisualElement parent ? parent.Width : DeviceDisplay.MainDisplayInfo.GetScaledScreenSize().Width);
iOS\Renderers\SwipeViewRenderer.cs (8)
519 float swipeItemWidth = (float)swipeItemSize.Width; 640 swipeItemView.Layout(new Rect(0, 0, swipeItemSize.Width, swipeItemSize.Height)); 1228 swipeThreshold += swipeItemSize.Width; 1258 swipeItemsWidth += (float)swipeItemSize.Width; 1321 if (swipeItemViewSizeRequest.Request.Width > 0) 1322 swipeItemWidth = threshold > swipeItemViewSizeRequest.Request.Width ? threshold : swipeItemViewSizeRequest.Request.Width; 1343 if (swipeItemViewSizeRequest.Request.Width > 0)
iOS\Renderers\TabbedRenderer.cs (2)
99 Element.Layout(new Rect(Element.X, Element.Y, size.Width, size.Height)); 151 Element.Layout(new Rect(Element.X, Element.Y, _queuedSize.Width, _queuedSize.Height));
iOS\Renderers\TabletFlyoutPageRenderer.cs (1)
232 Element.Layout(new Rect(Element.X, Element.Width, size.Width, size.Height));
iOS\Renderers\WkWebViewRenderer.cs (1)
135 Layout.LayoutChildIntoBoundingRegion(Element, new Rect(Element.X, Element.Y, size.Width, size.Height));
iOS\VisualElementRenderer.cs (1)
168 Layout.LayoutChildIntoBoundingRegion(Element, new Rect(Element.X, Element.Y, size.Width, size.Height));
Microsoft.Maui.Graphics (23)
Converters\SizeTypeConverter.cs (1)
43 return $"{size.Width.ToString(CultureInfo.InvariantCulture)}, {size.Height.ToString(CultureInfo.InvariantCulture)}";
Point.cs (1)
32 X = sz.Width;
Rect.cs (3)
36 public Rect(Point loc, Size sz) : this(loc.X, loc.Y, sz.Width, sz.Height) 161 Width = value.Width; 181 return Inflate(sz.Width, sz.Height);
Size.cs (18)
33 public bool IsZero => Width == 0 && Height == 0; 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); 63 return s1.Width == s2.Width && s1.Height == s2.Height; 68 return s1.Width != s2.Width || s1.Height != s2.Height; 73 return new Point(size.Width, size.Height); 78 return Width.Equals(other.Width) && Height.Equals(other.Height); 92 return (Width.GetHashCode() * 397) ^ Height.GetHashCode(); 98 return string.Format("{{Width={0} Height={1}}}", Width.ToString(CultureInfo.InvariantCulture), Height.ToString(CultureInfo.InvariantCulture)); 103 width = Width; 106 public static implicit operator SizeF(Size s) => new SizeF((float)s.Width, (float)s.Height);