ComponentOne Input Library for WPF
Input Library Overview / Tag Editor / Work with TagEditor / Display Mode
In This Topic
    Display Mode
    In This Topic

    TagEditor allows you to choose the appearance of items between text or tags. In text mode, the items are displayed as strings separated by a separator character. On the other hand, in tag mode, the items appear like labels or tags separated by a space. Tag mode is the default mode in TagEditor. You can choose how the items appear in the TagEditor by setting DisplayMode property of the C1TagEditor class, which accepts values from the DisplayMode enumeration.

    The following image shows the items displayed as text in the TagEditor.

    Tag Editor Text Display Mode

    To display the items as text in the TagEditor control, use the following code:

    <c1:C1TagEditor Name="te" DisplayMode="Text" HorizontalAlignment="Left" VerticalAlignment="Top" Height="40" Width="300" />
    
    C1TagEditor te= new C1TagEditor();
    te.DisplayMode = DisplayMode.Text;
    

    By default, the TagEditor control uses comma (,) as separator character to separate the items. However, you can specify a separator character of your choice using Separator property of the C1TagEditor class.

    The following image showcases the TagEditor with "/" set as the separator for displayed items.

    Tag Editor Text Display Mode with Separator

    The following code can be used to specify "/" as a separator using the Separator property.

    <c1:C1TagEditor Name="te" DisplayMode="Text" Separator="/" HorizontalAlignment="Left" VerticalAlignment="Top" Height="40" Width="300"  />
    
    C1TagEditor te= new C1TagEditor();
    te.DisplayMode = DisplayMode.Text;
    te.Separator = "/";