|
|
|
@ -38,6 +38,14 @@ namespace Perspex.Controls.Primitives |
|
|
|
/// </remarks>
|
|
|
|
public class SelectingItemsControl : ItemsControl |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="AutoScrollToSelectedItem"/> property.
|
|
|
|
/// </summary>
|
|
|
|
public static readonly StyledProperty<bool> AutoScrollToSelectedItemProperty = |
|
|
|
PerspexProperty.Register<SelectingItemsControl, bool>( |
|
|
|
nameof(AutoScrollToSelectedItem), |
|
|
|
defaultValue: true); |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Defines the <see cref="SelectedIndex"/> property.
|
|
|
|
/// </summary>
|
|
|
|
@ -123,6 +131,15 @@ namespace Perspex.Controls.Primitives |
|
|
|
remove { RemoveHandler(SelectionChangedEvent, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets a value indicating whether to automatically scroll to newly selected items.
|
|
|
|
/// </summary>
|
|
|
|
public bool AutoScrollToSelectedItem |
|
|
|
{ |
|
|
|
get { return GetValue(AutoScrollToSelectedItemProperty); } |
|
|
|
set { SetValue(AutoScrollToSelectedItemProperty, value); } |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the index of the selected item.
|
|
|
|
/// </summary>
|
|
|
|
|