FilePathTextBox Class

Control to implement the selection of a file or folder for a TextBox.

Definition

Namespace: Common.Wpf.Controls
Assembly: Common.Wpf.Controls (in Common.Wpf.Controls.dll) Version: 2.0.7
C#
public class FilePathTextBox : TextBox
Inheritance
Object    DispatcherObject    DependencyObject    Visual    UIElement    FrameworkElement    Control    TextBoxBase    TextBox    FilePathTextBox

Remarks

1. Add a namespace attribute to the root element of the markup file it is to be used in:
XAML
xmlns:cc="clr-namespace:Common.Wpf.Controls;assembly=Common.Wpf.Controls"
2. Define the control specifying the type of dialog. The default is File:
XAML
<cc:FilePathTextBox DialogType="Folder"... />

Constructors

FilePathTextBoxInitializes a new instance of the FilePathTextBox class

Properties

DialogTypeGets or sets the dialog type that will be shown to the user.
The default is File.
IsErrorShownGets or sets whether error messages are shown to the user below the control. The default is .
RelativePathGets or sets a relative path to a file.

Methods

OnApplyTemplateWhen overridden in a derived class, this is invoked whenever application code or internal processes call ApplyTemplate().
(Overrides TextBoxBaseOnApplyTemplate)

Fields

DialogTypePropertyIdentifies the DialogType dependency property.
IsErrorShownPropertyIdentifies the IsErrorShown dependency property.
RelativePathPropertyIdentifies the RelativePath dependency property.

See Also