Class TaskBar
Represents a TaskBar control.
Inheritance
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
[SkinType]
public class TaskBar : ItemsControl
Remarks
UI framework element based on System.Windows.Controls.ItemsControl class. Control is used for grouping content objects into special items called TaskBarItem.
Examples
This example shows how to create a TaskBar in XAML.
<Window x:Class="TaskBar.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Syncfusion.Windows.Tools.Controls;assembly=Syncfusion.Tools.WPF"
Title="TaskBar" Height="300" Width="300">
<StackPanel HorizontalAlignment="Center">
<local:TaskBar Name="taskBar" />
</StackPanel>
</Window>
This example shows how to create a TaskBar in C#.
using System.Windows;
using System.Windows.Controls;
namespace Sample1
{
public partial class Window1 : Window
{
public Window1()
{
InitializeComponent();
TaskBar TaskBar = new TaskBar();
stackPanel.Children.Add( TaskBar );
}
}
}
Constructors
TaskBar()
Declaration
public TaskBar()
Fields
ButtonSizeProperty
Identifies GroupPaddingProperty attached dependency property.
Declaration
public static readonly DependencyProperty ButtonSizeProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
GroupMarginProperty
Identifies GroupMargin dependency property.
Declaration
public static readonly DependencyProperty GroupMarginProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
GroupOrientationProperty
Identifies GroupOrientation dependency property.
Declaration
public static readonly DependencyProperty GroupOrientationProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
GroupPaddingProperty
Identifies GroupPaddingProperty attached dependency property.
Declaration
public static readonly DependencyProperty GroupPaddingProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
GroupWidthProperty
Identifies GroupWidth dependency property.
Declaration
public static readonly DependencyProperty GroupWidthProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
HeaderStyleProperty
Identifies HeaderStyleProperty attached dependency property.
Declaration
public static readonly DependencyProperty HeaderStyleProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
IsOpenedProperty
Identifies IsOpenedProperty attached dependency property.
Declaration
public static readonly DependencyProperty IsOpenedProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
LastChildFillProperty
Identifies LastChildFill dependency property.
Declaration
public static readonly DependencyProperty LastChildFillProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SelectedItemChangedEvent
Identifies SelectedItemChangedEvent routed event for TaskBar.
Declaration
public static readonly RoutedEvent SelectedItemChangedEvent
Field Value
Type |
---|
System.Windows.RoutedEvent |
SelectedItemProperty
Identifies SelectedItem dependency property.
Declaration
public static readonly DependencyProperty SelectedItemProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
SpeedProperty
Identifies SpeedProperty attached dependency property.
Declaration
public static readonly DependencyProperty SpeedProperty
Field Value
Type |
---|
System.Windows.DependencyProperty |
Properties
GroupMargin
Gets or sets the value that represents margins for all items.
Declaration
public Thickness GroupMargin { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Thickness | Type: System.Windows.Thickness A System.Windows.Thickness value that represents margins for all items. |
GroupOrientation
Gets or sets the value that represents orientation of items arrangement.
Declaration
public Orientation GroupOrientation { get; set; }
Property Value
Type | Description |
---|---|
System.Windows.Controls.Orientation | Type: System.Windows.Controls.Orientation Value that represents orientation of items arrangement. Default value is System.Windows.Controls.Orientation.Vertical. |
GroupWidth
Gets or sets value that limits width of TaskBarItem item, for all present TaskBarItem items in TaskBar.
Declaration
public double GroupWidth { get; set; }
Property Value
Type | Description |
---|---|
System.Double | Type: System.Double A System.Double value that limits width of TaskBarItem item, for all present TaskBarItem items in TaskBar. Default value is System.Double.NaN. |
LastChildFill
Gets or sets a value indicating whether [last child fill].
Declaration
public bool LastChildFill { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
SelectedItem
Gets or sets the value that represents selected item of the TaskBar.
Declaration
public TaskBarItem SelectedItem { get; set; }
Property Value
Type | Description |
---|---|
TaskBarItem | Type: TaskBarItem A TaskBarItem object that represents selected item of the TaskBar. Default value is null. |
Methods
ClearContainerForItemOverride(DependencyObject, Object)
Undoes the effects of the PrepareContainerForItemOverride(DependencyObject, Object) method.
Declaration
protected override void ClearContainerForItemOverride(DependencyObject element, object item)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | element | The container element. |
System.Object | item | The item clear container. |
GetButtonSize(DependencyObject)
Method gets the value of ButtonSizeProperty attached property from given object.
Declaration
public static double GetButtonSize(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj | Given object. |
Returns
Type | Description |
---|---|
System.Double | Value of ButtonSizeProperty attached property from given object. |
GetContainerForItemOverride()
Creates or identifies the element that is used to display the given item.
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
Type | Description |
---|---|
System.Windows.DependencyObject | The element that is used to display the given item. |
GetGroupPadding(DependencyObject)
Method gets the value of GroupPaddingProperty attached property from given object.
Declaration
public static Thickness GetGroupPadding(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj | Given object. |
Returns
Type | Description |
---|---|
System.Windows.Thickness | Value of GroupPaddingProperty attached property from given object. |
GetHeaderStyle(DependencyObject)
Method gets the value of HeaderStyleProperty attached property from given object.
Declaration
public static Style GetHeaderStyle(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj | Given object. |
Returns
Type | Description |
---|---|
System.Windows.Style | Value of HeaderStyleProperty attached property from given object. |
GetIsOpened(DependencyObject)
Method gets the value of IsOpenedProperty attached property from given object.
Declaration
public static bool GetIsOpened(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj | Given object. |
Returns
Type | Description |
---|---|
System.Boolean | System.Boolean value of IsOpenedProperty attached property from given object. |
GetSpeed(DependencyObject)
Method gets the value of SpeedProperty attached property from given object.
Declaration
public static double GetSpeed(DependencyObject obj)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj | Given object. |
Returns
Type | Description |
---|---|
System.Double | Value of SpeedProperty attached property from given object. |
IsItemItsOwnContainerOverride(Object)
Determines if the specified item is (or is eligible to be) its own container.
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item to check. |
Returns
Type | Description |
---|---|
System.Boolean | True if the item is (or is eligible to be) its own container; otherwise, false |
OnApplyTemplate()
Declaration
public override void OnApplyTemplate()
OnButtonSizeChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises ButtonSizeChanged event.
Declaration
protected virtual void OnButtonSizeChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnGroupMarginChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises GroupMarginChanged event.
Declaration
protected virtual void OnGroupMarginChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnGroupOrientationChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises GroupOrientationChanged event.
Declaration
protected virtual void OnGroupOrientationChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value |
OnGroupPaddingChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises GroupPaddingChanged event.
Declaration
protected virtual void OnGroupPaddingChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnGroupWidthChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises GroupWidthChanged event.
Declaration
protected virtual void OnGroupWidthChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property change details, such as old value and new value. |
OnHeaderStyleChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises HeaderStyleChanged event.
Declaration
protected virtual void OnHeaderStyleChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnInitialized(EventArgs)
Raises the System.Windows.FrameworkElement.Initialized event. This method is invoked whenever System.Windows.FrameworkElement.Initialized is set to true internally.
Declaration
protected override void OnInitialized(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | The System.Windows.RoutedEventArgs that contains the event data. |
OnIsOpenedChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises IsOpenedChanged event.
Declaration
protected virtual void OnIsOpenedChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnItemsChanged(NotifyCollectionChangedEventArgs)
Invoked when items colllection changed
Declaration
protected override void OnItemsChanged(NotifyCollectionChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Specialized.NotifyCollectionChangedEventArgs | e |
OnPropertyChanged(DependencyPropertyChangedEventArgs)
Declaration
protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e |
OnSpeedChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises SpeedChanged event.
Declaration
protected virtual void OnSpeedChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
OnVisualStyleChanged(DependencyPropertyChangedEventArgs)
Updates property value cache and raises VisualStyleChanged event.
Declaration
protected virtual void OnVisualStyleChanged(DependencyPropertyChangedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyPropertyChangedEventArgs | e | Property changes details, such as old value and new value. |
PrepareContainerForItemOverride(DependencyObject, Object)
Prepares the specified element to display the specified item.
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | element | Element used to display the specified item. |
System.Object | item | Specified item. |
SetButtonSize(DependencyObject, Double)
Method sets the value of ButtonSizeProperty property to given object.
Declaration
public static void SetButtonSize(DependencyObject obj, double value)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj | Given object. |
System.Double | value | New value. |
SetGroupPadding(DependencyObject, Thickness)
Method sets the value of GroupPaddingProperty property to given object.
Declaration
public static void SetGroupPadding(DependencyObject obj, Thickness value)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj | Given object. |
System.Windows.Thickness | value | New value. |
SetHeaderStyle(DependencyObject, Style)
Method sets the value of HeaderStyleProperty property to given object.
Declaration
public static void SetHeaderStyle(DependencyObject obj, Style value)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj | Given object. |
System.Windows.Style | value | New value. |
SetIsOpened(DependencyObject, Boolean)
Method sets the value of IsOpenedProperty property to given object.
Declaration
public static void SetIsOpened(DependencyObject obj, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj | Given object. |
System.Boolean | value | New value. |
SetSpeed(DependencyObject, Double)
Method sets the value of SpeedProperty property to given object.
Declaration
public static void SetSpeed(DependencyObject obj, double value)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.DependencyObject | obj | Given object. |
System.Double | value | New value. |
Events
ButtonSizeChanged
Event that is raised when ButtonSizeProperty property is changed.
Declaration
public event PropertyChangedCallback ButtonSizeChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
GroupMarginChanged
Event that is raised when GroupMargin property is changed.
Declaration
public event PropertyChangedCallback GroupMarginChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
GroupOrientationChanged
Event that is raised when GroupOrientation property is changed.
Declaration
public event PropertyChangedCallback GroupOrientationChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
GroupPaddingChanged
Event that is raised when GroupPaddingProperty property is changed.
Declaration
public event PropertyChangedCallback GroupPaddingChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
GroupWidthChanged
Event that is raised when GroupWidth property is changed.
Declaration
public event PropertyChangedCallback GroupWidthChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
HeaderStyleChanged
Event that is raised when HeaderStyleProperty property is changed.
Declaration
public event PropertyChangedCallback HeaderStyleChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
IsOpenedChanged
Event that is raised when IsOpenedProperty property is changed.
Declaration
public event PropertyChangedCallback IsOpenedChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
SelectedItemChanged
Occurs when [selected item changed].
Declaration
public event RoutedEventHandler SelectedItemChanged
Event Type
Type |
---|
System.Windows.RoutedEventHandler |
SpeedChanged
Event that is raised when SpeedProperty property is changed.
Declaration
public event PropertyChangedCallback SpeedChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |
VisualStyleChanged
Event that is raised when VisualStyle property is changed.
Declaration
public event PropertyChangedCallback VisualStyleChanged
Event Type
Type |
---|
System.Windows.PropertyChangedCallback |