1234567891011121314151617181920212223242526272829303132333435 |
- using Avalonia;
- using Avalonia.Controls;
- using Avalonia.Controls.Mixins;
- using Avalonia.Controls.Primitives;
- using System;
-
- namespace Editopia.Control
- {
- public class TabItemIcon : HeaderedContentControl, ISelectable
- {
- /// <summary>
- /// Defines the <see cref="IsSelected"/> property.
- /// </summary>
- public static readonly StyledProperty<bool> IsSelectedProperty =
- ListBoxItem.IsSelectedProperty.AddOwner<TabItem>();
-
- /// <summary>
- /// Initializes static members of the <see cref="TabItem"/> class.
- /// </summary>
- static TabItemIcon()
- {
- SelectableMixin.Attach<TabItemIcon>(IsSelectedProperty);
- FocusableProperty.OverrideDefaultValue(typeof(TabItem), true);
- }
-
- /// <summary>
- /// Gets or sets the selection state of the item.
- /// </summary>
- public bool IsSelected
- {
- get { return GetValue(IsSelectedProperty); }
- set { SetValue(IsSelectedProperty, value); }
- }
- }
- }
|