Export (0) Print
Expand All

HwndSource.SizeToContent Property

Get or sets whether and how the window is sized to its content.

Namespace: System.Windows.Interop
Assembly: PresentationCore (in presentationcore.dll)

public SizeToContent SizeToContent { get; set; }
/** @property */
public SizeToContent get_SizeToContent ()

/** @property */
public void set_SizeToContent (SizeToContent value)

public function get SizeToContent () : SizeToContent

public function set SizeToContent (value : SizeToContent)

You cannot use this property in XAML.

Property Value

One of the enumeration values. The default value is Manual, which specifies that the window is not sized to its content.

End users might indirectly set this property through application UI, if that functionality is exposed by the application.

Scale transformations should not be applied to the RootVisual of an HwndSource, because this can disable SizeToContent behavior. See Remarks for RootVisual.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft