Skip to content

Commit

Permalink
chore(PagerControl): Porting
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinZikmund committed Jan 29, 2021
1 parent 10f0dba commit 723ea79
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
using Windows.UI.Xaml.Controls;

namespace Microsoft.UI.Xaml.Controls
{
public class PagerControl : Control
{

}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
namespace Uno.UI.Microsoft.UI.Xaml.Controls.PagerControl
{
public enum PagerControlButtonVisibility
{
Visible,
HiddenOnEdge,
Hidden,
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
namespace Uno.UI.Microsoft.UI.Xaml.Controls.PagerControl
{
public enum PagerControlDisplayMode
{
Auto,
ComboBox,
NumberBox,
ButtonPanel,
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Microsoft.UI.Xaml.Controls
{
public class PagerControlSelectedIndexChangedEventArgs
{
public PagerControlSelectedIndexChangedEventArgs(int previousIndex, int newIndex)
{
PreviousPageIndex = previousIndex;
NewPageIndex = newIndex;
}

public int PreviousPageIndex { get; }

public int NewPageIndex { get; }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
using System.Collections.Generic;
using Windows.UI.Xaml;

namespace Microsoft.UI.Xaml.Controls
{
public class PagerControlTemplateSettings : DependencyObject
{
public PagerControlTemplateSettings()
{
}

public IList<object> Pages
{
get => (IList<object>)GetValue(PagesProperty);
set => SetValue(PagesProperty, value);
}

public static DependencyProperty PagesProperty { get; } =
DependencyProperty.Register(nameof(Pages), typeof(IList<object>), typeof(PagerControlTemplateSettings), new PropertyMetadata(null));

public IList<object> NumberPanelItems
{
get { return (IList<object>)GetValue(NumberPanelItemsProperty); }
set { SetValue(NumberPanelItemsProperty, value); }
}

public static DependencyProperty NumberPanelItemsProperty { get; } =
DependencyProperty.Register(nameof(NumberPanelItems), typeof(IList<object>), typeof(PagerControlTemplateSettings), new PropertyMetadata(null));
}
}

0 comments on commit 723ea79

Please sign in to comment.