42 references to SizeToContent
PresentationCore (26)
System\Windows\InterOp\HwndSource.cs (26)
276_sizeToContent = SizeToContent.WidthAndHeight; 802if (_sizeToContent != SizeToContent.Manual && !_isWindowInMinimizeState ) 961public SizeToContent SizeToContent 975throw new InvalidEnumArgumentException("value", (int)value, typeof(SizeToContent)); 1040if (_sizeToContent == SizeToContent.WidthAndHeight) 1074(_sizeToContent == SizeToContent.Width ? double.PositiveInfinity : sizeFromHwndLogicalUnits.Width), 1075(_sizeToContent == SizeToContent.Height ? double.PositiveInfinity : sizeFromHwndLogicalUnits.Height)); 1092if (_sizeToContent == SizeToContent.Width) sz = new Size(rootUIElement.DesiredSize.Width, sizeFromHwndLogicalUnits.Height); 1093else if(_sizeToContent == SizeToContent.Height) sz = new Size(sizeFromHwndLogicalUnits.Width, rootUIElement.DesiredSize.Height); 1327if ((_myOwnUpdate != true) && (SizeToContent != SizeToContent.Manual)) 1371bool sizeToWidth = (SizeToContent == SizeToContent.Height) ? false : true; 1372bool sizeToHeight = (SizeToContent == SizeToContent.Width) ? false : true; 1416if ((!_myOwnUpdate) && (_sizeToContent != SizeToContent.WidthAndHeight) && !_isWindowInMinimizeState) 1436(_sizeToContent == SizeToContent.Width ? double.PositiveInfinity : relevantPt.X), 1437(_sizeToContent == SizeToContent.Height ? double.PositiveInfinity : relevantPt.Y)); 1463if (_sizeToContent == SizeToContent.Width) sz = new Size(rootUIElement.DesiredSize.Width, relevantPt.Y); 1464else if (_sizeToContent == SizeToContent.Height) sz = new Size(relevantPt.X, rootUIElement.DesiredSize.Height); 1486if (_sizeToContent != SizeToContent.Manual) 1488_sizeToContent = SizeToContent.Manual; 2646private static bool IsValidSizeToContent(SizeToContent value) 2648return value == SizeToContent.Manual || 2649value == SizeToContent.Width || 2650value == SizeToContent.Height || 2651value == SizeToContent.WidthAndHeight; 2777private SizeToContent _sizeToContent = SizeToContent.Manual;
PresentationFramework (16)
System\Windows\Window.cs (16)
911typeof(SizeToContent), 914SizeToContent.Manual, 931public SizeToContent SizeToContent 941return (SizeToContent) GetValue(SizeToContentProperty); 2686HwndSourceSizeToContent = (SizeToContent) GetValue(SizeToContentProperty); 2924if ((SizeToContent != SizeToContent.Manual) || (HwndCreatedButNotShown == true)) 5650return IsValidSizeToContent((SizeToContent)value); 5674w.OnSizeToContentChanged((SizeToContent) e.NewValue); 5677private void OnSizeToContentChanged(SizeToContent sizeToContent) 6983private static bool IsValidSizeToContent(SizeToContent value) 6985return value == SizeToContent.Manual || 6986value == SizeToContent.Width || 6987value == SizeToContent.Height || 6988value == SizeToContent.WidthAndHeight; 7159private SizeToContent HwndSourceSizeToContent 7491internal SizeToContent HwndSourceSizeToContent