'Declaration Public Shared Function GetRelativeSize( _ ByVal d As DependencyObject _ ) As Size
public static Size GetRelativeSize( DependencyObject d )
The SplitPane uses the RelativeSize of each visible child in its Panes collection to determine how to distribute the space between the children. Depending upon the SplitterOrientation, either the Width or Height of the RelativeSize will be used. When the SplitterOrientation of the SplitPane is Vertical, the children are arranged horizontally and therefore only the Width of the RelativeSize is evaluated. When the SplitterOrientation is Horizontal, the children are arranged vertically and therefore only the Height of the RelativeSize is evaluated. The ratio of RelativeSize is used to determine the percentange that a given child is provided. For example, consider a SplitPane that has 2 visible children - item 1 has a RelativeSize of 100x200 and item 2 has a RelativeSize of 200x50. If the SplitterOrientation is Horizontal, the Height of relative sizes are used. In this case that means there is a total relative height of 250 (item 1 has a relative height of 200 and item 2 has a relative height of 50) and so item 1 would get ~80 (i.e. 200/250) and item 2 would get ~20 (50/250). So if the SplitPane is 500 pixels tall, item 1 will have a height of 400 (.80 * 500) and item 2 will have a height of 100 (.20 * 500). Note, this value won't be exact since space must be provided to the Splitter displayed between the items.
Note: The minimum Width/Height for the RelativeSize is 1,1 so it is recommended that you not use values that are too small as that could leads to problems when resizing the element smaller.
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