SizeToContent 枚举

定义

指定窗口将如何自动调整自身大小以适合其内容大小。 SizeToContent 属性使用。Used by the SizeToContent property.

public enum class SizeToContent
[System.Windows.Localizability(System.Windows.LocalizationCategory.None, Readability=System.Windows.Readability.Unreadable)]
public enum SizeToContent
type SizeToContent = 
Public Enum SizeToContent
继承
SizeToContent
属性

字段

Height 2

指定窗口将自动设置其高度以适合其内容的高度,而非宽度。Specifies that a window will automatically set its height to fit the height of its content, but not the width.

Manual 0

指定窗口将如何自动设置其大小以适合其内容大小。Specifies that a window will not automatically set its size to fit the size of its content. 此外,窗口大小还可以由其他属性确定,其中包括 WidthHeightMaxWidthMaxHeightMinWidthMinHeightInstead, the size of a window is determined by other properties, including Width, Height, MaxWidth, MaxHeight, MinWidth, and MinHeight. 请参阅 WPF 窗口概述See WPF Windows Overview.

Width 1

指定窗口将自动设置其宽度以适合其内容的宽度,而非高度。Specifies that a window will automatically set its width to fit the width of its content, but not the height.

WidthAndHeight 3

指定窗口将自动设置其宽度和高度以适合其内容的宽度和高度。Specifies that a window will automatically set both its width and height to fit the width and height of its content.

适用于