csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.4 KiB
41 lines
1.4 KiB
// -----------------------------------------------------------------------
|
|
// <copyright file="TabItem.cs" company="Steven Kirk">
|
|
// Copyright 2013 MIT Licence. See licence.md for more information.
|
|
// </copyright>
|
|
// -----------------------------------------------------------------------
|
|
|
|
namespace Perspex.Controls
|
|
{
|
|
using Mixins;
|
|
using Perspex.Controls.Primitives;
|
|
|
|
/// <summary>
|
|
/// An item in a <see cref="TabStrip"/> or <see cref="TabControl"/>.
|
|
/// </summary>
|
|
public class TabItem : HeaderedContentControl, ISelectable
|
|
{
|
|
/// <summary>
|
|
/// Defines the <see cref="IsSelected"/> property.
|
|
/// </summary>
|
|
public static readonly PerspexProperty<bool> IsSelectedProperty =
|
|
ListBoxItem.IsSelectedProperty.AddOwner<TabItem>();
|
|
|
|
/// <summary>
|
|
/// Initializes static members of the <see cref="TabItem"/> class.
|
|
/// </summary>
|
|
static TabItem()
|
|
{
|
|
SelectableMixin.Attach<TabItem>(IsSelectedProperty);
|
|
FocusableProperty.OverrideDefaultValue(typeof(TabItem), true);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Gets or sets the selection state of the item.
|
|
/// </summary>
|
|
public bool IsSelected
|
|
{
|
|
get { return this.GetValue(IsSelectedProperty); }
|
|
set { this.SetValue(IsSelectedProperty, value); }
|
|
}
|
|
}
|
|
}
|
|
|