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 an instance of the class.

public RecentDocumentControl()

Properties

AllowGrouping

Indicates 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

The date/time column text.

public string DateTimeColumnText { get; set; }

Property Value

string:

The default value is "Last opened".

GroupContainerStyle

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

public Style? GroupContainerStyle { get; set; }

Property Value

Style

GroupHeaderTemplate

The DataTemplate used for date grouping headers.

public DataTemplate? GroupHeaderTemplate { get; set; }

Property Value

DataTemplate

KeyTipText

The key tip text used to access the control.

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

Property Value

string

Manager

The RecentDocumentManager to use that provides document data.

public RecentDocumentManager? Manager { get; set; }

Property Value

RecentDocumentManager

NameColumnText

The name column text.

public string? NameColumnText { get; set; }

Property Value

string:

The default value is "Name".

OpenCommand

The ICommand to execute when an item is clicked.

public ICommand? OpenCommand { get; set; }

Property Value

ICommand

UseLargeSize

Indicates 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

Defines the AllowGrouping property.

public static readonly DependencyProperty AllowGroupingProperty

DateTimeColumnTextProperty

Defines the DateTimeColumnText property.

public static readonly DependencyProperty DateTimeColumnTextProperty

GroupContainerStyleProperty

Defines the GroupContainerStyle property.

public static readonly DependencyProperty GroupContainerStyleProperty

GroupHeaderTemplateProperty

Defines the GroupHeaderTemplate property.

public static readonly DependencyProperty GroupHeaderTemplateProperty

KeyTipTextProperty

Defines the KeyTipText property.

public static readonly DependencyProperty KeyTipTextProperty

ManagerProperty

Defines the Manager property.

public static readonly DependencyProperty ManagerProperty

NameColumnTextProperty

Defines the NameColumnText property.

public static readonly DependencyProperty NameColumnTextProperty

OpenCommandProperty

Defines the OpenCommand property.

public static readonly DependencyProperty OpenCommandProperty

UseLargeSizeProperty

Defines the UseLargeSize property.

public static readonly DependencyProperty UseLargeSizeProperty

Extension Methods