Browse Source

Added TabStripPlacement property

pull/325/head
Wiesław Šoltés 11 years ago
parent
commit
c47b8fef5b
  1. 16
      src/Perspex.Controls/TabControl.cs

16
src/Perspex.Controls/TabControl.cs

@ -28,6 +28,12 @@ namespace Perspex.Controls
private static readonly IMemberSelector s_contentSelector =
new FuncMemberSelector<object, object>(SelectContent);
/// <summary>
/// Defines the <see cref="TabStripPlacement"/> property.
/// </summary>
public static readonly PerspexProperty<Dock> TabStripPlacementProperty =
PerspexProperty.Register<TabControl, Dock>(nameof(TabStripPlacement), defaultValue: Dock.Top);
/// <summary>
/// Initializes static members of the <see cref="TabControl"/> class.
/// </summary>
@ -36,6 +42,7 @@ namespace Perspex.Controls
SelectionModeProperty.OverrideDefaultValue<TabControl>(SelectionMode.AlwaysSelected);
FocusableProperty.OverrideDefaultValue<TabControl>(false);
SelectedItemProperty.Changed.AddClassHandler<TabControl>(x => x.SelectedItemChanged);
AffectsMeasure(TabStripPlacementProperty);
}
/// <summary>
@ -64,6 +71,15 @@ namespace Perspex.Controls
set { SetValue(TransitionProperty, value); }
}
/// <summary>
/// Gets or sets the tabstrip placement of the tabcontrol.
/// </summary>
public Dock TabStripPlacement
{
get { return GetValue(TabStripPlacementProperty); }
set { SetValue(TabStripPlacementProperty, value); }
}
/// <summary>
/// Asks the control whether it wants to reparent the logical children of the specified
/// control.

Loading…
Cancel
Save