244 references to DesiredSize
PresentationCore (9)
Core\CSharp\System\Windows\Interop\HwndSource.cs (5)
1279rootUIElement.Arrange(new Rect(new Point(), rootUIElement.DesiredSize)); 1311if (_sizeToContent == SizeToContent.Width) sz = new Size(rootUIElement.DesiredSize.Width, sizeFromHwndLogicalUnits.Height); 1312else if(_sizeToContent == SizeToContent.Height) sz = new Size(sizeFromHwndLogicalUnits.Width, rootUIElement.DesiredSize.Height); 1711if (_sizeToContent == SizeToContent.Width) sz = new Size(rootUIElement.DesiredSize.Width, relevantPt.Y); 1712else if (_sizeToContent == SizeToContent.Height) sz = new Size(relevantPt.X, rootUIElement.DesiredSize.Height);
Core\CSharp\System\Windows\LayoutManager.cs (2)
488arrangeRect.Width = element.DesiredSize.Width; 491arrangeRect.Height = element.DesiredSize.Height;
Core\CSharp\System\Windows\Media\BitmapCacheBrush.cs (1)
283element.Arrange(new Rect(element.DesiredSize));
Core\CSharp\System\Windows\Media\VisualBrush.cs (1)
251element.Arrange(new Rect(element.DesiredSize));
PresentationFramework (168)
src\Framework\MS\Internal\Annotations\Component\AnnotationAdorner.cs (1)
158((UIElement)_annotationComponent).Arrange(new Rect(((UIElement)_annotationComponent).DesiredSize));
src\Framework\MS\Internal\Controls\InkCanvasInnerCanvas.cs (7)
105newSize.Width = Math.Max(newSize.Width, left + child.DesiredSize.Width); 109newSize.Width = Math.Max(newSize.Width, child.DesiredSize.Width); 115newSize.Height = Math.Max(newSize.Height, top + child.DesiredSize.Height); 119newSize.Height = Math.Max(newSize.Height, child.DesiredSize.Height); 164x = arrangeSize.Width - child.DesiredSize.Width - right; 179y = arrangeSize.Height - child.DesiredSize.Height - bottom; 183child.Arrange(new Rect(new Point(x, y), child.DesiredSize));
src\Framework\MS\Internal\Controls\TemplatedAdorner.cs (3)
149!DoubleUtil.AreClose(ReferenceElement.DesiredSize, AdornedElement.DesiredSize) 157return (_child).DesiredSize;
src\Framework\MS\Internal\Documents\FlowDocumentView.cs (1)
75desiredSize = this.DesiredSize;
src\Framework\MS\Internal\Documents\UIElementIsland.cs (2)
92islandSize.Width = horizontalAutoSize ? _child.DesiredSize.Width : availableSize.Width; 93islandSize.Height = verticalAutoSize ? _child.DesiredSize.Height : availableSize.Height;
src\Framework\MS\Internal\Helper.cs (6)
548return child.DesiredSize; 1101headerSize.Height = Math.Max(virtualizingElement.DesiredSize.Height, headerSize.Height); 1103headerSize.Width = Math.Max(virtualizingElement.DesiredSize.Width, headerSize.Width); 1126Size desiredSize = virtualizingElement.DesiredSize; 1195Rect parentRect = new Rect(new Point(), virtualizingElement.DesiredSize); 1204Rect itemsRect = itemsHost.TransformToAncestor(virtualizingElement).TransformBounds(new Rect(new Point(), itemsHost.DesiredSize));
src\Framework\MS\Internal\LayoutDump.cs (2)
250DumpSize(writer, "DesiredSize", element.DesiredSize); 551if (DoubleUtil.AreClose(extent, element.DesiredSize))
src\Framework\MS\Internal\PtsHost\Line.cs (2)
378desiredSize = inlineObject.UIElementIsland.Root.DesiredSize; 436if (!line.HasCollapsed || ((rect.Left + inlineObject.UIElementIsland.Root.DesiredSize.Width) < line.Width))
src\Framework\MS\Internal\PtsHost\PtsHost.cs (2)
2658dvrSumHeight = TextDpi.ToTextDpi(uiElement.DesiredSize.Height); 2659dvrMinHeight = TextDpi.ToTextDpi(uiElement.DesiredSize.Height);
src\Framework\MS\Internal\PtsHost\RunClient.cs (1)
84Size size = UIElementIsland.Root.DesiredSize;
src\Framework\MS\Internal\PtsHost\TextParaClient.cs (2)
1455uiElement.Arrange(new Rect(uiElement.DesiredSize)); 1488uiElement.Arrange(new Rect(uiElement.DesiredSize));
src\Framework\MS\Internal\Text\ComplexLine.cs (1)
220inlineObject.Element.Arrange(new Rect(inlineObject.Element.DesiredSize));
src\Framework\MS\Internal\Text\InlineObject.cs (1)
79Size size = _element.DesiredSize;
src\Framework\System\Windows\Annotations\AnnotationDocumentPaginator.cs (2)
320decorator.Arrange(new Rect(decorator.DesiredSize)); 361decorator.Arrange(new Rect(decorator.DesiredSize));
src\Framework\System\Windows\Controls\AccessText.cs (1)
428return TextBlock.DesiredSize;
src\Framework\System\Windows\Controls\Border.cs (1)
246Size childSize = child.DesiredSize;
src\Framework\System\Windows\Controls\Canvas.cs (3)
322x = arrangeSize.Width - child.DesiredSize.Width - right; 337y = arrangeSize.Height - child.DesiredSize.Height - bottom; 341child.Arrange(new Rect(new Point(x, y), child.DesiredSize));
src\Framework\System\Windows\Controls\Control.cs (1)
712return child.DesiredSize;
src\Framework\System\Windows\Controls\DataGridCellsPanel.cs (5)
84if (!DoubleUtil.AreClose(this.DesiredSize, measureSize) && MeasureDuringArrange) 124desiredWidth = child.DesiredSize.Width; 136Size childDesiredSize = child.DesiredSize; 579childSize = child.DesiredSize; 1486childWidth = child.DesiredSize.Width;
src\Framework\System\Windows\Controls\DataGridHelper.cs (2)
263if (!DoubleUtil.AreClose(element.DesiredSize.Width, constraintWidth)) 269desiredWidth = element.DesiredSize.Width;
src\Framework\System\Windows\Controls\DataGridRow.cs (1)
554double minHeight = Math.Max(RowHeader.DesiredSize.Height, MinHeight);
src\Framework\System\Windows\Controls\Decorator.cs (1)
204return (child.DesiredSize);
src\Framework\System\Windows\Controls\DockPanel.cs (2)
237childDesiredSize = child.DesiredSize; 293Size childDesiredSize = child.DesiredSize;
src\Framework\System\Windows\Controls\Grid.cs (8)
442gridDesiredSize.Width = Math.Max(gridDesiredSize.Width, child.DesiredSize.Width); 443gridDesiredSize.Height = Math.Max(gridDesiredSize.Height, child.DesiredSize.Height); 1284double oldWidth = children[i].DesiredSize.Width; 1288hasDesiredSizeUChanged |= !DoubleUtil.AreClose(oldWidth, children[i].DesiredSize.Width); 1294DefinitionsU[PrivateCells[i].ColumnIndex].UpdateMinSize(Math.Min(children[i].DesiredSize.Width, DefinitionsU[PrivateCells[i].ColumnIndex].UserMaxSize)); 1303children[i].DesiredSize.Width); 1311DefinitionsV[PrivateCells[i].RowIndex].UpdateMinSize(Math.Min(children[i].DesiredSize.Height, DefinitionsV[PrivateCells[i].RowIndex].UserMaxSize)); 1320children[i].DesiredSize.Height);
src\Framework\System\Windows\Controls\GridViewHeaderRowPresenter.cs (4)
279DesiredWidthList[column.ActualIndex] = column.EnsureWidth(child.DesiredSize.Width); 301maxHeight = Math.Max(maxHeight, child.DesiredSize.Height); 308maxHeight = Math.Max(maxHeight, _paddingHeader.DesiredSize.Height); 401_indicator.Arrange(new Rect(pos, new Size(_indicator.DesiredSize.Width, arrangeSize.Height)));
src\Framework\System\Windows\Controls\GridViewRowPresenter.cs (2)
170column.EnsureWidth(child.DesiredSize.Width); 194maxHeight = Math.Max(maxHeight, child.DesiredSize.Height);
src\Framework\System\Windows\Controls\GroupItem.cs (1)
299pixelHeaderSize = headerElement.DesiredSize;
src\Framework\System\Windows\Controls\InkCanvas.cs (1)
242return _localAdornerDecorator.DesiredSize;
src\Framework\System\Windows\Controls\Page.cs (1)
610return child.DesiredSize;
src\Framework\System\Windows\Controls\Primitives\BulletDecorator.cs (8)
251bulletSize = bullet.DesiredSize; 261contentSize = content.DesiredSize; 287bullet.Arrange(new Rect(bullet.DesiredSize)); 301contentSize.Width = Math.Max(content.DesiredSize.Width, arrangeSize.Width - bullet.DesiredSize.Width); 302contentSize.Height = Math.Max(content.DesiredSize.Height, arrangeSize.Height); 313bullet.Arrange(new Rect(0, bulletOffsetY, bullet.DesiredSize.Width, bullet.DesiredSize.Height));
src\Framework\System\Windows\Controls\Primitives\DataGridColumnHeadersPresenter.cs (2)
121indicatorSize = _columnHeaderDragIndicator.DesiredSize; 129indicatorSize = _columnHeaderDropLocationIndicator.DesiredSize;
src\Framework\System\Windows\Controls\Primitives\DocumentPageView.cs (3)
231desiredSize = this.DesiredSize; 617_visualCloneSize = this.DesiredSize; 638_visualCloneSize = this.DesiredSize;
src\Framework\System\Windows\Controls\Primitives\PopupRoot.cs (3)
173desiredSize = _transformDecorator.DesiredSize; 198desiredSize = _transformDecorator.DesiredSize; 234Size restricted2DDesiredSize = _transformDecorator.DesiredSize;
src\Framework\System\Windows\Controls\Primitives\ScrollContentPresenter.cs (1)
491Rect childRect = new Rect(child.DesiredSize);
src\Framework\System\Windows\Controls\Primitives\TabPanel.cs (2)
213desiredSizeWithoutMargin.Height = Math.Max(0d, element.DesiredSize.Height - margin.Top - margin.Bottom); 214desiredSizeWithoutMargin.Width = Math.Max(0d, element.DesiredSize.Width - margin.Left - margin.Right);
src\Framework\System\Windows\Controls\Primitives\ToolBarOverflowPanel.cs (5)
115Size childDesiredSize = child.DesiredSize; 128Size sz = child.DesiredSize; 172Size sz = children[i].DesiredSize; 214child.Arrange(new Rect(x, y, child.DesiredSize.Width, lineHeight)); 215x += child.DesiredSize.Width;
src\Framework\System\Windows\Controls\Primitives\ToolBarPanel.cs (6)
95Size childDesiredSize = child.DesiredSize; 181Size childDesiredSize = child.DesiredSize; 312previousChildSize = child.DesiredSize.Width; 314rcChild.Height = Math.Max(arrangeSize.Height, child.DesiredSize.Height); 319previousChildSize = child.DesiredSize.Height; 321rcChild.Width = Math.Max(arrangeSize.Width, child.DesiredSize.Width);
src\Framework\System\Windows\Controls\Primitives\Track.cs (3)
438desiredSize = Thumb.DesiredSize; 592thumbLength = Thumb == null ? 0 : Thumb.DesiredSize.Height; 597thumbLength = Thumb == null ? 0 : Thumb.DesiredSize.Width;
src\Framework\System\Windows\Controls\Primitives\UniformGrid.cs (1)
193Size childDesiredSize = child.DesiredSize;
src\Framework\System\Windows\Controls\ScrollViewer.cs (1)
1328desiredSize = child.DesiredSize;
src\Framework\System\Windows\Controls\Stack.cs (13)
604Size childDesiredSize = child.DesiredSize; 651if (fHorizontal) { projectedLogicalVisibleSpace -= children[firstViewport - 1].DesiredSize.Width; } 652else { projectedLogicalVisibleSpace -= children[firstViewport - 1].DesiredSize.Height; } 765previousChildSize = child.DesiredSize.Width; 767rcChild.Height = Math.Max(arrangeSize.Height, child.DesiredSize.Height); 772previousChildSize = child.DesiredSize.Height; 774rcChild.Width = Math.Max(arrangeSize.Width, child.DesiredSize.Width); 850? ((UIElement)children[i]).DesiredSize.Width 851: ((UIElement)children[i]).DesiredSize.Height; 956Size childDesiredSize = InternalChildren[childIndex].DesiredSize; 963childDesiredSize = InternalChildren[i].DesiredSize; 982newRect.Width = InternalChildren[childIndex].DesiredSize.Width; 988newRect.Height = InternalChildren[childIndex].DesiredSize.Height;
src\Framework\System\Windows\Controls\TextBlock.cs (2)
2070desiredSize = inlineObject.Element.DesiredSize; 2099desiredSize = inlineObject.Element.DesiredSize;
src\Framework\System\Windows\Controls\ToolBar.cs (2)
568extraLength = Math.Max(0.0, desiredSize.Width - toolBarPanel.DesiredSize.Width + margin.Left + margin.Right); 572extraLength = Math.Max(0.0, desiredSize.Height - toolBarPanel.DesiredSize.Height + margin.Top + margin.Bottom);
src\Framework\System\Windows\Controls\ToolBarTray.cs (8)
399bandThickness = Math.Max(bandThickness, fHorizontal ? toolBar.DesiredSize.Height : toolBar.DesiredSize.Width); 400bandLength += fHorizontal ? toolBar.DesiredSize.Width : toolBar.DesiredSize.Height; 401remainingLength -= fHorizontal ? toolBar.DesiredSize.Width : toolBar.DesiredSize.Height; 452Size toolBarArrangeSize = new Size(fHorizontal ? toolBar.DesiredSize.Width : bandThickness, fHorizontal ? bandThickness : toolBar.DesiredSize.Height );
src\Framework\System\Windows\Controls\TreeViewItem.cs (1)
377Size pixelHeaderSize = this.IsVisible && headerElement != null ? headerElement.DesiredSize : new Size();
src\Framework\System\Windows\Controls\ViewBox.cs (3)
329Size childSize = child.DesiredSize; 355Size childSize = child.DesiredSize; 363child.Arrange(new Rect(new Point(), child.DesiredSize));
src\Framework\System\Windows\Controls\VirtualizingStackPanel.cs (24)
3349childDesiredSize = child.DesiredSize; 3380Size previousChildSizeBeforeViewport = child.DesiredSize; 3387childSizeBeforeViewport = containerBeforeViewport.DesiredSize; 3900((isHorizontal && DoubleUtil.GreaterThanOrClose(DesiredSize.Width, PreviousConstraint.Width)) || 3901(!isHorizontal && DoubleUtil.GreaterThanOrClose(DesiredSize.Height, PreviousConstraint.Height))); 5743Size childDesiredSize = ((UIElement)children[i]).DesiredSize; 5936containerSize.Height = IsPixelBased ? DesiredSize.Height : 1; 5941containerSize.Width = IsPixelBased ? DesiredSize.Width : 1; 5966containerSize.Height = IsPixelBased ? DesiredSize.Height : 1; 5971containerSize.Width = IsPixelBased ? DesiredSize.Width : 1; 6040double pixelHeight = DesiredSize.Height; 6050double pixelWidth = DesiredSize.Width; 6332Rect childRect = new Rect(new Point(), child.DesiredSize); 6339Size itemsSize = itemsHost.DesiredSize; 7370childSize = child.DesiredSize; 7374childSize = new Size(DoubleUtil.GreaterThan(child.DesiredSize.Width, 0) ? 1 : 0, 7375DoubleUtil.GreaterThan(child.DesiredSize.Height, 0) ? 1 : 0); 7520childPixelSize = child.DesiredSize; 7537childPixelSize = child.DesiredSize; 7545childSize = new Size(DoubleUtil.GreaterThan(child.DesiredSize.Width, 0) ? 1 : 0, 7546DoubleUtil.GreaterThan(child.DesiredSize.Height, 0) ? 1 : 0); 8117childDesiredSize = child.DesiredSize; 11143childSize = container.DesiredSize; 12871info._desiredSize = child.DesiredSize;
src\Framework\System\Windows\Controls\WrapPanel.cs (6)
250(itemWidthSet ? itemWidth : child.DesiredSize.Width), 251(itemHeightSet ? itemHeight : child.DesiredSize.Height)); 306(itemWidthSet ? itemWidth : child.DesiredSize.Width), 307(itemHeightSet ? itemHeight : child.DesiredSize.Height)); 353UVSize childSize = new UVSize(Orientation, child.DesiredSize.Width, child.DesiredSize.Height);
src\Framework\System\Windows\Documents\AdornerLayer.cs (1)
483adornerInfo.Adorner.Arrange(new Rect(new Point(), adornerInfo.Adorner.DesiredSize));
src\Framework\System\Windows\Documents\FixedPage.cs (3)
824x = arrangeSize.Width - child.DesiredSize.Width - right; 839y = arrangeSize.Height - child.DesiredSize.Height - bottom; 843child.Arrange(new Rect(new Point(x, y), child.DesiredSize));
src\Framework\System\Windows\FrameworkElement.cs (2)
4601unclippedDesiredSize = new Size(Math.Max(0, this.DesiredSize.Width - marginWidth), 4602Math.Max(0, this.DesiredSize.Height - marginHeight));
src\Framework\System\Windows\Window.cs (1)
3498Size childDesiredSize = child.DesiredSize;
PresentationFramework.Aero (3)
Microsoft\Windows\Themes\ButtonChrome.cs (1)
427desired = child.DesiredSize;
Microsoft\Windows\Themes\ListBoxChrome.cs (1)
248desired = child.DesiredSize;
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
204Size desiredSize = child.DesiredSize;
PresentationFramework.Classic (2)
Microsoft\Windows\Themes\ClassicBorderDecorator.cs (1)
684desired = child.DesiredSize;
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
204Size desiredSize = child.DesiredSize;
PresentationFramework.Luna (2)
Microsoft\Windows\Themes\ButtonChrome.cs (1)
344desired = child.DesiredSize;
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
204Size desiredSize = child.DesiredSize;
PresentationFramework.Royale (2)
Microsoft\Windows\Themes\ButtonChrome.cs (1)
302desired = child.DesiredSize;
parent\Shared\Microsoft\Windows\Themes\DataGridHeaderBorder.cs (1)
204Size desiredSize = child.DesiredSize;
System.Activities.Core.Presentation (18)
System\Activities\Core\Presentation\FlowchartDesigner.Helpers.cs (4)
292location.X -= element.DesiredSize.Width / 2; 293location.Y -= element.DesiredSize.Height / 2; 301oldCenter = new Point(location.X + element.DesiredSize.Width / 2, location.Y + element.DesiredSize.Height / 2);
System\Activities\Core\Presentation\FlowchartDesigner.ModelChangeReactions.cs (2)
57double startHeight = this.StartSymbol.DesiredSize.Height; 58double startWidth = this.StartSymbol.DesiredSize.Width;
System\Activities\Core\Presentation\FlowchartDesigner.xaml.cs (2)
656this.ViewStateService.StoreViewState(storageModelItem, shapeSize, ((UIElement)sender).DesiredSize); 2597FreeFormPanel.SetChildSize(view, view.DesiredSize);
System\Activities\Core\Presentation\FlowchartExpressionAdorner.cs (3)
60Rect adornedElementRect = new Rect(this.AdornedElement.DesiredSize); 61Rect tooltipRect = new Rect(adornedElementRect.TopLeft + new Vector(adornedElementRect.Width, -tooltip.DesiredSize.Height), tooltip.DesiredSize);
System\Activities\Core\Presentation\StateContainerEditor.Utilities.cs (2)
139oldCenter = new Point(location.X + element.DesiredSize.Width / 2, location.Y + element.DesiredSize.Height / 2);
System\Activities\Core\Presentation\StateContainerEditor.xaml.cs (5)
482double startHeight = this.initialNode.DesiredSize.Height; 483double startWidth = this.initialNode.DesiredSize.Width; 1316this.ViewStateService.StoreViewState(storageModelItem, ShapeSizeViewStateKey, ((UIElement)sender).DesiredSize); 1966if (anchorPoint.X > view.DesiredSize.Width || anchorPoint.Y > view.DesiredSize.Height)
System.Activities.Presentation (40)
System.Activities.Presentation\System\Activities\Presentation\Annotations\AnnotationAdorner.cs (4)
127return this.content.DesiredSize; 140Size adornerSize = new Size(this.content.DesiredSize.Width * zoomLevel, this.content.DesiredSize.Height * zoomLevel); 145Point location = CalculateLocation(anchor, this.AdornedElement.RenderSize, this.content.DesiredSize);
System.Activities.Presentation\System\Activities\Presentation\Base\Core\Internal\PropertyEditing\PropertyPanel.cs (4)
198availableWidth -= child.DesiredSize.Width; 200actualSize.Height = Math.Max(actualSize.Height, child.DesiredSize.Height); 201actualSize.Width += child.DesiredSize.Width; 222double desiredWidth = child.DesiredSize.Width;
System.Activities.Presentation\System\Activities\Presentation\DockedAnnotationDecorator.cs (1)
21size.Height = this.Child.DesiredSize.Height;
System.Activities.Presentation\System\Activities\Presentation\DragDropHelper.cs (7)
865this.width = grid.DesiredSize.Width; 866this.height = grid.DesiredSize.Height; 917this.content.Arrange(new Rect(this.content.DesiredSize)); 918System.Diagnostics.Debug.WriteLine("DragShadow.ArrangeOverride " + this.content.DesiredSize); 919return this.content.DesiredSize; 925System.Diagnostics.Debug.WriteLine("DragShadow.MeasureOverride " + this.content.DesiredSize); 926return this.content.DesiredSize;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectionPoint.cs (2)
117double parentWidth = parent.DesiredSize.Width - parent.Margin.Left - parent.Margin.Right; 118double parentHeight = parent.DesiredSize.Height - parent.Margin.Top - parent.Margin.Bottom;
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\ConnectorRouter.cs (2)
132Size childSize = new Size(frameworkChild.DesiredSize.Width - margin.Left - margin.Right, frameworkChild.DesiredSize.Height - margin.Top - margin.Bottom);
System.Activities.Presentation\System\Activities\Presentation\FreeFormEditing\FreeFormPanel.cs (8)
331Size size = Children[i].DesiredSize; 432if (!child.DesiredSize.Equals(((Size)FreeFormPanel.GetChildSize(child)))) 434FreeFormPanel.SetChildSize(child, child.DesiredSize); 442lastYPosition += child.DesiredSize.Height + VerticalStackingDistance; 445if (height < child.DesiredSize.Height + pt.Y) 447height = child.DesiredSize.Height + pt.Y; 449if (width < child.DesiredSize.Width + pt.X) 451width = child.DesiredSize.Width + pt.X;
System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.Commands.cs (1)
517this.ContextMenu.MinWidth = this.ContextMenu.DesiredSize.Width;
System.Activities.Presentation\System\Activities\Presentation\View\ExtensionSurface.cs (7)
184if (IsInvalid(window.ActualWidth) || IsInvalid(window.ActualWidth) || IsInvalid(window.DesiredSize.Width) || IsInvalid(window.DesiredSize.Height)) 308position.X = CalculateInBoundsValue(position.X, window.DesiredSize.Width, this.ActualWidth, this.selectedChild.Value.X); 309position.Y = CalculateInBoundsValue(position.Y, window.DesiredSize.Height, this.ActualHeight, this.selectedChild.Value.Y); 381child.Arrange(new Rect(pos, child.DesiredSize)); 419offsetPlusX = Math.Max(offsetPlusX, pos.X + child.DesiredSize.Width); 420offsetPlusY = Math.Max(offsetPlusY, pos.Y + child.DesiredSize.Height);
System.Activities.Presentation\System\Activities\Presentation\View\SearchToolTipAdorner.cs (4)
57double Y = adornerElementToVisibleScrollViewDistance < tooltip.DesiredSize.Height ? 58tooltip.DesiredSize.Height : 59-tooltip.DesiredSize.Height; 60Rect tooltipRect = new Rect(new Point(0, Y), tooltip.DesiredSize);