TreeView Class

ViewBase derived class that defines settings and defaults for a view that arranges data using a classic grid layout. The TreeView object is used by XamDataGrid and XamDataPresenter
Public Class TreeView 
   Inherits GridViewBase
public class TreeView : GridViewBase 

The TreeView object is used by XamDataGrid and XamDataPresenter to provide settings and defaults that DataPresenterBase (the base class for the XamDataGrid and XamDataPresenter controls) can query when it provides UI element generation and field layout generation services in support of the View. While the TreeView is not actually reponsible for arranging items, it does expose a property called ItemsPanelType that returns the System.Windows.Controls.Panel derived type that should be used to provide layout functionality for DataRecords displayed in the view. DataPresenterBase will ensure that a panel of ItemsPanelType is generated for use by the embedded RecordListControl (the System.Windows.Controls.ListBox derived class used to display DataRecords).

The TreeView object exposes a property called ViewSettings that returns a GridViewSettings object. (Note: This property is not found on the ViewBase class but is specific to the TreeView). GridViewSettings in turn exposes properties that let you control features supported by the TreeView. Refer to GridViewSettings object for detailed information on these properties.

Note: TreeView is only used by the XamDataPresenter control (as described above) when the XamDataPresenter control's XamDataPresenter.View property is set to an instance of TreeView.

The following ViewBase properties are overridden by the CarouselView:

Property Description Overridden Value
AutoFitToRecord Returns a boolean indicating whether the cell area of a DataRecordPresenter will be auto sized to the RecordPresenter itself or based on the root RecordListControl when DataPresenterBase.AutoFitResolved is true. false
CellPresentation Returns the type of CellPresentation used by the view which determines the default manner in which the cells within each row are laid out by the FieldLayoutTemplateGenerator. CellPresentation.TreeView
DefaultAutoArrangeCells Returns the default value for AutoArrangeCells for field layout templates generated on behalf of the View. If LogicalOrientation is Vertical then AutoArrangeCells.LeftToRight otherwise AutoArrangeCells.LeftToRight
HasLogicalOrientation Returns a value that indicates whether this View arranges its descendants in a particular dimension. true
IsAutoFitHeightSupported Returns true if the height of the cells within in each row should be adjusted so that all cells will fit within the vertical space available for the row. If ViewSettings.Orientation is System.Windows.Controls.Orientation.Horizontal then true, otherwise false
IsAutoFitWidthSupported Returns true if the width of the cells within in each row should be adjusted so that all cells will fit within the horizontal space available for the row. If ViewSettings.Orientation is System.Windows.Controls.Orientation.Vertical then true, otherwise false
IsFixedRecordsSupported Returns true if the DataPresenterBase should allow records to be fixed at the top or bottomof the UI. true
ItemsPanelType Returns the type of System.Windows.Controls.Panel used by the view to layout items in the list. typeof(GridViewPanel)
LogicalOrientation The System.Windows.Controls.Orientation of the View, if the view only supports layout in a particular dimension. ViewSettings.Orientation
SupportedDataDisplayMode Returns a value that indicates the DataDisplayMode supported by the View. DataDisplayMode.Hierarchical


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

See Also