[]
A text box-based control with ability to display and edit tags.
[TemplatePart(Name = "Container", Type = typeof(C1WrapPanel))]
[TemplatePart(Name = "Editor", Type = typeof(C1TextBoxBase))]
[TemplatePart(Name = "TagScrollViewer", Type = typeof(ScrollViewer))]
[TemplateVisualState(Name = "MouseOver", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Disabled", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Normal", GroupName = "CommonStates")]
[TemplateVisualState(Name = "Focused", GroupName = "FocusStates")]
[TemplateVisualState(Name = "Unfocused", GroupName = "FocusStates")]
[StyleTypedProperty(Property = "TagStyle", StyleTargetType = typeof(Border))]
public class C1TagEditor : Control, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient
<TemplatePart(Name:="Container", Type:=GetType(C1WrapPanel))>
<TemplatePart(Name:="Editor", Type:=GetType(C1TextBoxBase))>
<TemplatePart(Name:="TagScrollViewer", Type:=GetType(ScrollViewer))>
<TemplateVisualState(Name:="MouseOver", GroupName:="CommonStates")>
<TemplateVisualState(Name:="Disabled", GroupName:="CommonStates")>
<TemplateVisualState(Name:="Normal", GroupName:="CommonStates")>
<TemplateVisualState(Name:="Focused", GroupName:="FocusStates")>
<TemplateVisualState(Name:="Unfocused", GroupName:="FocusStates")>
<StyleTypedProperty(Property:="TagStyle", StyleTargetType:=GetType(Border))>
Public Class C1TagEditor
Inherits Control
Implements IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IQueryAmbient
| Name | Description |
|---|---|
| C1TagEditor() | Initializes a new instance of a C1TagEditor. |
| Name | Description |
|---|---|
| DisplayModeProperty | Identifies the DisplayMode dependency property. |
| FocusBrushProperty | Identifies the FocusBrush dependency property. |
| IsEditableProperty | Identifies the IsEditable dependency property. |
| IsFocusedProperty | Identifies the IsFocused dependency property. |
| IsTagEditableProperty | Identifies the IsTagEditable dependency property. |
| MouseOverBrushProperty | Identifies the MouseOverBrush dependency property. |
| PlaceHolderProperty | Identifies the PlaceHolder dependency property. |
| SeparatorProperty | Identifies the Separator dependency property. |
| TagStyleProperty | Identifies the TagStyle dependency property. |
| TagWrappingProperty | Identifies the TagWrapping dependency property. |
| TagsProperty | Identifies the Tags dependency property. |
| TextProperty | Identifies the Text dependency property. |
| Name | Description |
|---|---|
| DisplayMode | Gets or sets a value indicates whether to show tag mode or text mode. |
| FocusBrush | Gets or sets the Brush used to highlight the focused control. |
| IsEditable | Gets or sets a value that determines whether the content of the input element should be editable or not. |
| IsFocused | Returns true if the control has the focus. |
| IsTagEditable | Gets or sets a value that determines whether the tags are editable or not. |
| MouseOverBrush | Gets or sets the Brush used to highlight the control when it has the mouse over. |
| PlaceHolder | Gets or sets the string shown as a hint when the control is empty. |
| Separator | Gets or sets string which is used as separator in multi-select mode. |
| TagStyle | Gets or sets the style used for the tags. |
| TagWrapping | Gets or sets a value indicates whether to wrap the tags or not. |
| Tags | Gets the string collection of tags. |
| Text | Gets the text shown on the control. |
| Name | Description |
|---|---|
| ChangeVisualStateCommon(bool) | Updates the current visual state of the Common visual state group to match the object's properties. |
| ChangeVisualStateFocus(bool) | Updates the current visual state of the Focus visual state group to match the object's properties. |
| ClearTags() | Clear all tags. |
| ContainsTag(string) | Determines whether specified text already exists in tags collection. |
| GetEditorText() | Get the text of the inner editor. |
| InsertTag(int, string, object) | Insert a tag in a specific position. |
| InsertTag(string, object) | Insert a tag at last. |
| OnApplyTemplate() | Builds the visual tree for the C1TagEditor control when a new template is applied. |
| OnEditing(object, TagEidtorEditingEventArgs) | |
| OnPropertyChanged(DependencyPropertyChangedEventArgs) | Invoked whenever the effective value of any dependency property has been updated. |
| OnTagEdited(object, TagEditedEventArgs) | Occurs when a tag is edited. |
| OnTagExited(object, RoutedEventArgs) | Occurs when a tag is edited. |
| OnTagInserted(object, RoutedEventArgs) | Occurs when a tag is inserted. |
| OnTagInserting(object, CancelEventArgs) | Occurs before a tag is inserted. |
| OnTagRemoved(object, RoutedEventArgs) | Occurs when a tag is removed. |
| OnTagUpdating(object, CancelEventArgs) | Occurs before a tag is edited. |
| OnTagsReset(object, RoutedEventArgs) | |
| OnTextEdited(object, TextEditedEventArgs) | Occurs when text is edited. |
| RemoveTag(C1Tag) | Remove a specific tag. |
| RemoveTagAt(int) | Remove a tag in a specific position. |
| SetEditorText(string) | Set the text of the inner editor. |
| UpdateTextFromTags() | Update Text according to the tags when DisplayMode is Text. |
| Name | Description |
|---|---|
| Editing | |
| IsMouseOverChanged | Event raised when the IsMouseOver property has changed. |
| TagEdited | Occurs when a tag is edited. |
| TagExited | Occurs when a tag is exit edit mode. |
| TagInserted | Occurs when a tag is inserted. |
| TagInserting | Occurs before a tag is inserted. |
| TagRemoved | Occurs when a tag is removed. |
| TagUpdating | Occurs before a tag is edited. |
| TagsReset | |
| TextEdited | Occurs when text is edited. |