// -----------------------------------------------------------------------
//
// Copyright 2015 MIT Licence. See licence.md for more information.
//
// -----------------------------------------------------------------------
namespace Perspex.Controls
{
using Perspex.Controls.Mixins;
///
/// A selectable item in a .
///
public class ListBoxItem : ContentControl, ISelectable
{
///
/// Defines the property.
///
public static readonly PerspexProperty IsSelectedProperty =
PerspexProperty.Register(nameof(IsSelected));
///
/// Initializes static members of the class.
///
static ListBoxItem()
{
SelectableMixin.Attach(IsSelectedProperty);
FocusableProperty.OverrideDefaultValue(true);
}
///
/// Gets or sets the selection state of the item.
///
public bool IsSelected
{
get { return this.GetValue(IsSelectedProperty); }
set { this.SetValue(IsSelectedProperty, value); }
}
}
}