In This Article

RecentDocumentControl Class

Represents a control for displaying recently accessed documents.

public class RecentDocumentControl : ItemsControl
Inheritance:
object Visual UIElement FrameworkElement Control ItemsControl object

Constructors

RecentDocumentControl()

Initializes a new instance of the RecentDocumentControl class.

public RecentDocumentControl()

Properties

AllowGrouping

Gets or sets whether to group items by date.

public bool AllowGrouping { get; set; }

Property Value

bool:

true if items should be grouped by date; otherwise, false. The default value is true.

DateTimeColumnText

Gets or sets the date/time column text.

public string DateTimeColumnText { get; set; }

Property Value

string:

The date/time column text. The default value is "Last opened".

GroupContainerStyle

Gets or sets the Style that targets GroupItem, used to represent date groupings.

public Style GroupContainerStyle { get; set; }

Property Value

Style:

The Style that targets GroupItem, used to represent date groupings.

GroupHeaderTemplate

Gets or sets the DataTemplate used for date grouping headers.

public DataTemplate GroupHeaderTemplate { get; set; }

Property Value

DataTemplate:

The DataTemplate used for date grouping headers.

KeyTipText

Gets or sets the key tip text used to access the control.

[Localizability(LocalizationCategory.Label)]
public string KeyTipText { get; set; }

Property Value

string:

The key tip text used to access the control.

Manager

Gets or sets the RecentDocumentManager to use that provides document data.

public RecentDocumentManager Manager { get; set; }

Property Value

RecentDocumentManager:

The RecentDocumentManager to use that provides document data.

NameColumnText

Gets or sets the name column text.

public string NameColumnText { get; set; }

Property Value

string:

The name column text. The default value is "Name".

OpenCommand

Gets or sets the ICommand to execute when an item is clicked.

public ICommand OpenCommand { get; set; }

Property Value

ICommand:

The ICommand to execute when an item is clicked.

UseLargeSize

Gets or sets whether to use a large size.

public bool UseLargeSize { get; set; }

Property Value

bool:

true if a large size should be used; otherwise, false. The default value is true.

Remarks

Large size is better for backstage usage, while small size is better for application menu usage.

Methods

GetContainerForItemOverride()

Creates or identifies the element that is used to display the given item.

protected override DependencyObject GetContainerForItemOverride()

Returns

DependencyObject:

The element that is used to display the given item.

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

PrepareContainerForItemOverride(DependencyObject, object)

Prepares the specified element to display the specified item.

protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameter Type Description
element DependencyObject

Element used to display the specified item.

item object

Specified item.

Fields

AllowGroupingProperty

Identifies the AllowGrouping dependency property. This field is read-only.

public static readonly DependencyProperty AllowGroupingProperty

DateTimeColumnTextProperty

Identifies the DateTimeColumnText dependency property. This field is read-only.

public static readonly DependencyProperty DateTimeColumnTextProperty

GroupContainerStyleProperty

Identifies the GroupContainerStyle dependency property. This field is read-only.

public static readonly DependencyProperty GroupContainerStyleProperty

GroupHeaderTemplateProperty

Identifies the GroupHeaderTemplate dependency property. This field is read-only.

public static readonly DependencyProperty GroupHeaderTemplateProperty

KeyTipTextProperty

Identifies the KeyTipText dependency property. This field is read-only.

public static readonly DependencyProperty KeyTipTextProperty

ManagerProperty

Identifies the Manager dependency property. This field is read-only.

public static readonly DependencyProperty ManagerProperty

NameColumnTextProperty

Identifies the NameColumnText dependency property. This field is read-only.

public static readonly DependencyProperty NameColumnTextProperty

OpenCommandProperty

Identifies the OpenCommand dependency property. This field is read-only.

public static readonly DependencyProperty OpenCommandProperty

UseLargeSizeProperty

Identifies the UseLargeSize dependency property. This field is read-only.

public static readonly DependencyProperty UseLargeSizeProperty