MasterDetailsView Class

Definition

Panel that allows for a Master/Details pattern.

[Windows.UI.Xaml.TemplatePart(Name="DetailsPresenter", Type=typeof(Windows.UI.Xaml.Controls.ContentPresenter))]
[Windows.UI.Xaml.TemplatePart(Name="DetailsPanel", Type=typeof(Windows.UI.Xaml.FrameworkElement))]
[Windows.UI.Xaml.TemplateVisualState(GroupName="SelectionStates", Name="NoSelectionNarrow")]
[Windows.UI.Xaml.TemplateVisualState(GroupName="SelectionStates", Name="NoSelectionWide")]
[Windows.UI.Xaml.TemplateVisualState(GroupName="SelectionStates", Name="HasSelectionWide")]
[Windows.UI.Xaml.TemplateVisualState(GroupName="SelectionStates", Name="HasSelectionNarrow")]
[Windows.UI.Xaml.TemplateVisualState(GroupName="WidthStates", Name="NarrowState")]
[Windows.UI.Xaml.TemplateVisualState(GroupName="WidthStates", Name="WideState")]
public class MasterDetailsView : Windows.UI.Xaml.Controls.ItemsControl
[<Windows.UI.Xaml.TemplatePart(Name="DetailsPresenter", Type=typeof(Windows.UI.Xaml.Controls.ContentPresenter))>]
[<Windows.UI.Xaml.TemplatePart(Name="DetailsPanel", Type=typeof(Windows.UI.Xaml.FrameworkElement))>]
[<Windows.UI.Xaml.TemplateVisualState(GroupName="SelectionStates", Name="NoSelectionNarrow")>]
[<Windows.UI.Xaml.TemplateVisualState(GroupName="SelectionStates", Name="NoSelectionWide")>]
[<Windows.UI.Xaml.TemplateVisualState(GroupName="SelectionStates", Name="HasSelectionWide")>]
[<Windows.UI.Xaml.TemplateVisualState(GroupName="SelectionStates", Name="HasSelectionNarrow")>]
[<Windows.UI.Xaml.TemplateVisualState(GroupName="WidthStates", Name="NarrowState")>]
[<Windows.UI.Xaml.TemplateVisualState(GroupName="WidthStates", Name="WideState")>]
type MasterDetailsView = class
    inherit ItemsControl
Public Class MasterDetailsView
Inherits ItemsControl
Inheritance
Windows.UI.Xaml.Controls.ItemsControl
MasterDetailsView
Attributes
Windows.UI.Xaml.TemplatePartAttribute Windows.UI.Xaml.TemplateVisualStateAttribute

Constructors

MasterDetailsView()

Initializes a new instance of the MasterDetailsView class.

Fields

BackButtonBehaviorProperty

Identifies the BackButtonBehavior dependency property

CompactModeThresholdWidthProperty

Identifies the CompactModeThresholdWidth dependency property

DetailsCommandBarProperty

Identifies the DetailsCommandBar dependency property

DetailsHeaderProperty

Identifies the DetailsHeader dependency property.

DetailsHeaderTemplateProperty

Identifies the DetailsHeaderTemplate dependency property.

DetailsTemplateProperty

Identifies the DetailsTemplate dependency property.

MasterCommandBarProperty

Identifies the MasterCommandBar dependency property

MasterHeaderProperty

Identifies the MasterHeader dependency property.

MasterHeaderTemplateProperty

Identifies the MasterHeaderTemplate dependency property.

MasterPaneBackgroundProperty

Identifies the MasterPaneBackground dependency property.

MasterPaneWidthProperty

Identifies the MasterPaneWidth dependency property.

NoSelectionContentProperty

Identifies the NoSelectionContent dependency property.

NoSelectionContentTemplateProperty

Identifies the NoSelectionContentTemplate dependency property.

SelectedIndexProperty

Identifies the SelectedIndex dependency property.

SelectedItemProperty

Identifies the SelectedItem dependency property.

ViewStateProperty

Identifies the ViewState dependency property

Properties

BackButtonBehavior

Gets or sets the behavior to use for the back button

CompactModeThresholdWidth

Gets or sets the Threshold width that witll trigger the control to go into compact mode

DetailsCommandBar

Gets or sets the Windows.UI.Xaml.Controls.CommandBar for the details section.

DetailsHeader

Gets or sets the content for the details pane's header

DetailsHeaderTemplate

Gets or sets the DataTemplate used to display the content of the details pane's header.

DetailsTemplate

Gets or sets the DataTemplate used to display the details.

MapDetails

Gets or sets a function for mapping the selected item to a different model. This new model will be the DataContext of the Details area.

MasterCommandBar

Gets or sets the Windows.UI.Xaml.Controls.CommandBar for the master section.

MasterHeader

Gets or sets the content for the master pane's header

MasterHeaderTemplate

Gets or sets the DataTemplate used to display the content of the master pane's header.

MasterPaneBackground

Gets or sets the Brush to apply to the background of the list area of the control.

MasterPaneWidth

Gets or sets the width of the master pane when the view is expanded.

NoSelectionContent

Gets or sets the content to dsiplay when there is no item selected in the master list.

NoSelectionContentTemplate

Gets or sets the DataTemplate used to display the content when there is no selection.

SelectedIndex

Gets or sets the index of the current selection.

SelectedItem

Gets or sets the selected item.

ViewState

Gets the current visual state of the control

Methods

OnApplyTemplate()

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.

Events

SelectionChanged

Occurs when the currently selected item changes.

ViewStateChanged

Occurs when the view state changes

Applies to

See also

  • <xref:Windows.UI.Xaml.Controls.ItemsControl>