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:
trueif items should be grouped by date; otherwise,false. The default value istrue.
DateTimeColumnText
The date/time column text.
public string DateTimeColumnText { get; set; }
Property Value
- string:
The default value is "Last opened".
GroupContainerStyle
GroupHeaderTemplate
The DataTemplate used for date grouping headers.
KeyTipText
The key tip text used to access the control.
[Localizability(LocalizationCategory.Label)]
public string? KeyTipText { get; set; }
Property Value
Manager
The RecentDocumentManager to use that provides document data.
NameColumnText
The name column text.
OpenCommand
The ICommand to execute when an item is clicked.
UseLargeSize
Indicates whether to use a large size.
public bool UseLargeSize { get; set; }
Property Value
- bool:
trueif a large size should be used; otherwise,false. The default value istrue.
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