BarTextBoxViewModel Class
Represents a view model for a textbox control within a bar control.
public class BarTextBoxViewModel : BarKeyedObjectViewModelBase, INotifyPropertyChanged, IHasKey, IHasVariantImages
- Inheritance:
- System.Object ObservableObjectBase BarKeyedObjectViewModelBase Object
- Implements:
- IHasKey IHasVariantImages
Constructors
BarTextBoxViewModel()
Initializes a new instance of the class.
public BarTextBoxViewModel()
BarTextBoxViewModel(String)
Initializes a new instance of the class with the specified key. The label and key tip text are auto-generated.
public BarTextBoxViewModel(string key)
Parameter | Type | Description |
---|---|---|
key | System.String | A string that uniquely identifies the control. |
BarTextBoxViewModel(String, String)
Initializes a new instance of the class with the specified key and label. The key tip text is auto-generated.
public BarTextBoxViewModel(string key, string label)
Parameter | Type | Description |
---|---|---|
key | System.String | A string that uniquely identifies the control. |
label | System.String | The text label to display, which is auto-generated from the |
BarTextBoxViewModel(String, String, String)
Initializes a new instance of the class with the specified key, label, and key tip text.
public BarTextBoxViewModel(string key, string label, string keyTipText)
Parameter | Type | Description |
---|---|---|
key | System.String | A string that uniquely identifies the control. |
label | System.String | The text label to display, which is auto-generated from the |
keyTipText | System.String | The key tip text, which is auto-generated from the |
BarTextBoxViewModel(String, String, String, ICommand)
Initializes a new instance of the class with the specified key, label, key tip text, and command.
public BarTextBoxViewModel(string key, string label, string keyTipText, ICommand command)
Parameter | Type | Description |
---|---|---|
key | System.String | A string that uniquely identifies the control. |
label | System.String | The text label to display, which is auto-generated from the |
keyTipText | System.String | The key tip text, which is auto-generated from the |
command | System.Windows.Input.ICommand | The command to attach to the control. |
BarTextBoxViewModel(String, String, ICommand)
Initializes a new instance of the class with the specified key, label, and command. The key tip text is auto-generated.
public BarTextBoxViewModel(string key, string label, ICommand command)
Parameter | Type | Description |
---|---|---|
key | System.String | A string that uniquely identifies the control. |
label | System.String | The text label to display, which is auto-generated from the |
command | System.Windows.Input.ICommand | The command to attach to the control. |
BarTextBoxViewModel(String, ICommand)
Initializes a new instance of the class with the specified key and command. The label and key tip text are auto-generated.
public BarTextBoxViewModel(string key, ICommand command)
Parameter | Type | Description |
---|---|---|
key | System.String | A string that uniquely identifies the control. |
command | System.Windows.Input.ICommand | The command to attach to the control. |
BarTextBoxViewModel(RoutedCommand)
Initializes a new instance of the class with the specified System.Windows.Input.RoutedCommand, also used to auto-generate a key, label, and key tip text.
public BarTextBoxViewModel(RoutedCommand routedCommand)
Parameter | Type | Description |
---|---|---|
routedCommand | System.Windows.Input.RoutedCommand | The command to attach to the control. |
Properties
CanCloneToRibbonQuickAccessToolBar
Gets or sets whether the control can be cloned to the ribbon quick-access toolbar.
public bool CanCloneToRibbonQuickAccessToolBar { get; set; }
Property Value
- System.Boolean:
true
if the control can be cloned to the ribbon quick-access toolbar; otherwise,false
. The default value istrue
.
Command
Gets or sets the System.Windows.Input.ICommand to attach to the control.
public ICommand Command { get; set; }
Property Value
- System.Windows.Input.ICommand:
The System.Windows.Input.ICommand to attach to the control.
CommandParameter
Gets or sets the parameter to pass to the Command property.
public object CommandParameter { get; set; }
Property Value
- System.Object:
The parameter to pass to the Command property.
Description
Gets or sets the text description to display in screen tips.
public string Description { get; set; }
Property Value
- System.String:
The text description to display in screen tips.
IsStarSizingAllowed
Gets or sets whether the control can star-size and fill available space when appropriate.
public bool IsStarSizingAllowed { get; set; }
Property Value
- System.Boolean:
true
if the control can star-size; otherwise,false
. The default value isfalse
.
KeyTipText
Gets or sets the key tip text used to access the control.
public string KeyTipText { get; set; }
Property Value
- System.String:
The key tip text used to access the control.
Label
Gets or sets the text label to display.
public string Label { get; set; }
Property Value
- System.String:
The text label to display.
PlaceholderText
Gets or sets the placeholder text to display when the control is empty.
public string PlaceholderText { get; set; }
Property Value
- System.String:
The placeholder text to display when the control is empty.
RequestedWidth
Gets or sets the requested width of the control.
public double RequestedWidth { get; set; }
Property Value
- System.Double:
The requested width of the control. The default value is
110
.
SmallImageSource
Gets or sets the System.Windows.Media.ImageSource for a small image, generally 16x16
size.
public ImageSource SmallImageSource { get; set; }
Property Value
- System.Windows.Media.ImageSource:
The System.Windows.Media.ImageSource for a small image.
Text
Gets or sets the text being edited in the control.
public string Text { get; set; }
Property Value
- System.String:
The text being edited in the control.
Title
Gets or sets the string title, which can override the Label when displayed in screen tips and customization UI.
public string Title { get; set; }
Property Value
- System.String:
The string title.
ToolBarItemCollapseBehavior
Gets or sets the ItemCollapseBehavior for the control when in a ribbon using Simplified layout mode.
public ItemCollapseBehavior ToolBarItemCollapseBehavior { get; set; }
Property Value
- ItemCollapseBehavior:
The ItemCollapseBehavior for the control when in a ribbon using Simplified layout mode. The default value is
Default
.
Explicit Interface Implementations
IHasVariantImages.LargeImageSource
Gets or sets the System.Windows.Media.ImageSource for a large image, generally 32x32
size.
ImageSource IHasVariantImages.LargeImageSource { get; set; }
Returns
- System.Windows.Media.ImageSource:
The System.Windows.Media.ImageSource for a large image.
IHasVariantImages.MediumImageSource
Gets or sets the System.Windows.Media.ImageSource for a medium image, generally 24x24
size.
ImageSource IHasVariantImages.MediumImageSource { get; set; }
Returns
- System.Windows.Media.ImageSource:
The System.Windows.Media.ImageSource for a medium image.
Inherited Members
- BarKeyedObjectViewModelBase.ToString()
- BarKeyedObjectViewModelBase.Key
- ObservableObjectBase.NotifyPropertyChanged(String)
- ObservableObjectBase.OnPropertyChanged(PropertyChangedEventArgs)
- ObservableObjectBase.PropertyChanged
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()