'Declaration Public Shared Sub SetPreferredWidth( _ ByVal d As DependencyObject, _ ByVal value As Double _ )
public static void SetPreferredWidth( DependencyObject d, double value )
PreferredWidth property is different from setting the Width property of the element directly. When you set Width property of the element, that will be its final width. It may be desirable instead to specify a preferred width and then let the layout panel adjust the size (make it bigger or smaller) based on the availability of space.
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2