menu

WinUI

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class KanbanColorMapping - WinUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class KanbanColorMapping

    Provides the color indication support which includes the indication properties.

    Inheritance
    System.Object
    KanbanColorMapping
    Namespace: Syncfusion.UI.Xaml.Kanban
    Assembly: Syncfusion.Kanban.WinUI.dll
    Syntax
    public class KanbanColorMapping : DependencyObject

    Constructors

    KanbanColorMapping()

    Declaration
    public KanbanColorMapping()

    Fields

    ColorProperty

    Using a DependencyProperty as the backing store for Color. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty ColorProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    KeyProperty

    Using a DependencyProperty as the backing store for Key. This enables animation, styling, binding, etc...

    Declaration
    public static readonly DependencyProperty KeyProperty
    Field Value
    Type
    Microsoft.UI.Xaml.DependencyProperty

    Properties

    Color

    Gets or sets a color value for the associated Key.

    Declaration
    public Color Color { get; set; }
    Property Value
    Type Description
    Windows.UI.Color

    The default value of Color is Microsoft.UI.Colors.Transparent.

    Remarks

    This color is used to identify or categorize items based on key properties within the model. It helps in visually distinguishing different categories or priorities of kanban cards.

    Examples

    The below examples shows, how to set Color property of KanbanColorMapping in the SfKanban.

    # [XAML](#tab/tabid-4)
    <kanban:SfKanban x:Name="kanban"
                     ItemsSource="{Binding TaskDetails}">
        <kanban:SfKanban.DataContext>
            <local:ViewModel />
        </kanban:SfKanban.DataContext>
       <kanban:SfKanban.IndicatorColorPalette>
            <kanban:KanbanColorMapping Key = "High" Color="Red"/>
       </kanban:SfKanban.IndicatorColorPalette>
        <kanban:KanbanColumn MaximumCount="10"
                             HeaderText="Open" 
                             Categories="Open">
           <kanban:KanbanColumn.ErrorBarSettings>
               <kanban:KanbanErrorBarSettings MaximumValidationColor="Red" />
               </kanban:KanbanColumn.ErrorBarSettings>
           </kanban:KanbanColumn>
    </kanban:SfKanban>
    # [C#](#tab/tabid-5)
    public class ViewModel
    {
        public ViewModel()
        {
            TaskDetails = new ObservableCollection<KanbanModel>();
            TaskDetails.Add(new KanbanModel()
            {
                Title = "Universal App",
                Id = "6593",
                Description = "Draft preliminary software specifications",
                Category = "Review",
                IndicatorColorKey = "High",
                Tags = new List<string> { "Analysis" },
            });
        }
        public ObservableCollection<KanbanModel> TaskDetails { get; set; }
    }
    # [C#](#tab/tabid-6)
    this.kanban.ItemsSource = new ViewModel().TaskDetails;
    this.kanban.IndicatorColorPalette = new KanbanColorMapping()
    {
       Color = Colors.Red,
       Key = "High"
    };
    this.kanban.Columns.Add(new KanbanColumn()
    {
       Categories = "Open",
       MaximumCount=10,
       ErrorBarSettings = new KanbanErrorBarSettings()
       {
          MaximumValidationColor = new SolidColorBrush(Colors.Red),
       }
    });
    See Also
    Key
    Syncfusion.UI.Xaml.Kanban.KanbanModel.indicatorColorKey

    Key

    Gets or sets a value which will be the color key in the KanbanModel item.

    Declaration
    public object Key { get; set; }
    Property Value
    Type Description
    System.Object

    The default value of Key is null.

    Remarks

    This key is used to identify or categorize items based on color within the model. It helps in visually distinguishing different categories or priorities of kanban cards.

    Examples

    The below examples shows, how to set Key property of KanbanColorMapping in the SfKanban.

    # [XAML](#tab/tabid-1)
    <kanban:SfKanban x:Name="kanban"
                     ItemsSource="{Binding TaskDetails}">
        <kanban:SfKanban.DataContext>
            <local:ViewModel />
        </kanban:SfKanban.DataContext>
       <kanban:SfKanban.IndicatorColorPalette>
            <kanban:KanbanColorMapping Key = "High" Color="Red"/>
       </kanban:SfKanban.IndicatorColorPalette>
        <kanban:KanbanColumn MaximumCount="10"
                             HeaderText="Open" 
                             Categories="Open">
           <kanban:KanbanColumn.ErrorBarSettings>
               <kanban:KanbanErrorBarSettings MaximumValidationColor="Red" />
               </kanban:KanbanColumn.ErrorBarSettings>
           </kanban:KanbanColumn>
    </kanban:SfKanban>
    # [C#](#tab/tabid-2)
    public class ViewModel
    {
        public ViewModel()
        {
            TaskDetails = new ObservableCollection<KanbanModel>();
            TaskDetails.Add(new KanbanModel()
            {
                Title = "Universal App",
                Id = "6593",
                Description = "Draft preliminary software specifications",
                Category = "Review",
                IndicatorColorKey = "High",
                Tags = new List<string> { "Analysis" },
            });
        }
        public ObservableCollection<KanbanModel> TaskDetails { get; set; }
    }
    # [C#](#tab/tabid-3)
    this.kanban.ItemsSource = new ViewModel().TaskDetails;
    this.kanban.IndicatorColorPalette = new KanbanColorMapping()
    {
       Color = Colors.Red,
       Key = "High"
    };
    this.kanban.Columns.Add(new KanbanColumn()
    {
       Categories = "Open",
       MaximumCount=10,
       ErrorBarSettings = new KanbanErrorBarSettings()
       {
          MaximumValidationColor = new SolidColorBrush(Colors.Red),
       }
    });
    See Also
    Color
    Syncfusion.UI.Xaml.Kanban.KanbanModel.indicatorColorKey
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved