SplitterPanel Class
Represents an oriented panel of items that are stacked, but sized to fit on the screen.
Namespace: Microsoft.VisualStudio.PlatformUI
Assembly: Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
Syntax
声明
Public Class SplitterPanel _
Inherits Panel
用法
Dim instance As SplitterPanel
public class SplitterPanel : Panel
public ref class SplitterPanel : public Panel
type SplitterPanel =
class
inherit Panel
end
public class SplitterPanel extends Panel
Remarks
This panel has layout similar to a grid. Each child UIElement has an attached SplitterLength, which is either a "Stretch" or "Fill" value. To understand the layout, it's best to consider two examples (plain numbers indicate a Stretch length, * numbers indicate Fill) 1. Consider that there are 3 elements with SplitterLengths of [100|*|200] with horizontal orientation, and that the panel is 500x100 in size.
We calculate that the stretch items require 300 units of space, and that there is 1 star item requiring 1 filled unit of space. Since there are 300 units of leftover space, the fill item is given that width. The stretch items are given their desired stretch length.
2. Consider that there are 2 elements with SplitterLengths of [100|150] with horizontal orientation, and that the panel is 500x100 in size.
Since there are no fill elements, we stretch the items to take up the entire space, keeping the ratios of their sizes constant. Thus, the items are arraged with widths of 200 and 300 to fill the 500 available units of space.
3. Consider that there are 3 elements with SplitterLengths of [1000|*|1500] with horizontal orientation, and that the panel is 500x100 in size.
Since the stretch items are too large to fit in the panel as is, the fill item is reduced to size 0. Then, the stretch items are scaled as in (2), receiving 200 and 300 units respectively.
Inheritance Hierarchy
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Panel
Microsoft.VisualStudio.PlatformUI.SplitterPanel
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.