private View content = null;
+ private void Initialize()
+ {
+ Layout = new AbsoluteLayout();
+
+ this.Relayout += OnRelayout;
+ }
+
/// <summary>
/// Creates a new instance of Dialog.
/// </summary>
/// <since_tizen> 9 </since_tizen>
public Dialog() : base()
{
- Layout = new AbsoluteLayout();
+ Initialize();
+ }
- this.Relayout += OnRelayout;
+ /// <summary>
+ /// Creates a new instance of a Dialog with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created Dialog.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Dialog(ControlStyle style) : base(style)
+ {
+ Initialize();
}
/// <inheritdoc/>
Initialize();
}
+ /// <summary>
+ /// Creates a new instance of a Menu with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created Menu.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Menu(MenuStyle style) : base(style)
+ {
+ Initialize();
+ }
+
/// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(DisposeTypes type)
WidthSpecification = LayoutParamPolicies.WrapContent;
HeightSpecification = LayoutParamPolicies.WrapContent;
- BackgroundColor = Color.Transparent;
-
// Menu is added to Anchor so Menu should exclude layouting because
// if Anchor has Layout, then Menu is displayed at an incorrect position.
ExcludeLayouting = true;
Initialize();
}
+ /// <summary>
+ /// Creates a new instance of a MenuItem with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created MenuItem.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public MenuItem(ButtonStyle style) : base(style)
+ {
+ Initialize();
+ }
+
/// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void Dispose(DisposeTypes type)
private AppBar appBar = null;
private View content = null;
+ private void Initialize()
+ {
+ Layout = new ContentPageLayout();
+
+ // ContentPage matches to parent by default.
+ WidthSpecification = LayoutParamPolicies.MatchParent;
+ HeightSpecification = LayoutParamPolicies.MatchParent;
+ }
+
/// <summary>
/// Creates a new instance of a ContentPage.
/// </summary>
/// <since_tizen> 9 </since_tizen>
public ContentPage() : base()
{
- Layout = new ContentPageLayout();
+ Initialize();
+ }
- // ContentPage matches to parent by default.
- WidthSpecification = LayoutParamPolicies.MatchParent;
- HeightSpecification = LayoutParamPolicies.MatchParent;
+ /// <summary>
+ /// Creates a new instance of a ContentPage with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created ContentPage.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public ContentPage(ControlStyle style) : base(style)
+ {
+ Initialize();
}
/// <summary>
private View scrim = null;
private bool enableScrim = true;
- /// <summary>
- /// Creates a new instance of a DialogPage.
- /// </summary>
- /// <since_tizen> 9 </since_tizen>
- public DialogPage() : base()
+ private void Initialize()
{
Layout = new AbsoluteLayout();
}
/// <summary>
+ /// Creates a new instance of a DialogPage.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
+ public DialogPage() : base()
+ {
+ Initialize();
+ }
+
+ /// <summary>
+ /// Creates a new instance of a DialogPage with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created DialogPage.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public DialogPage(ControlStyle style) : base(style)
+ {
+ Initialize();
+ }
+
+ /// <summary>
/// Dispose DialogPage and all children on it.
/// </summary>
/// <param name="type">Dispose type.</param>
private List<Page> navigationPages = new List<Page>();
+ private void Initialize()
+ {
+ Layout = new AbsoluteLayout();
+ }
+
/// <summary>
/// Creates a new instance of a Navigator.
/// </summary>
/// <since_tizen> 9 </since_tizen>
public Navigator() : base()
{
- Layout = new AbsoluteLayout();
+ Initialize();
+ }
+
+ /// <summary>
+ /// Creates a new instance of a Navigator with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created Navigator.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Navigator(ControlStyle style) : base(style)
+ {
+ Initialize();
}
/// <inheritdoc/>
}
/// <summary>
+ /// Creates a new instance of a Page with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created Page.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public Page(ControlStyle style) : base(style)
+ {
+ }
+
+ /// <summary>
/// Navigator which has pushed the Page into its stack.
/// If this Page has not been pushed into any Navigator, then Navigator is null.
/// </summary>
private bool delayedIndexScrollTo;
private (int index, bool anim, ItemScrollTo scrollTo) delayedIndexScrollToParam;
+ private void Initialize()
+ {
+ FocusGroup = true;
+ SetKeyboardNavigationSupport(true);
+ }
+
/// <summary>
/// Base constructor.
/// </summary>
/// <since_tizen> 9 </since_tizen>
public CollectionView() : base()
{
- FocusGroup = true;
- SetKeyboardNavigationSupport(true);
+ Initialize();
}
/// <summary>
}
/// <summary>
+ /// Creates a new instance of a CollectionView with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created CollectionView.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public CollectionView(ControlStyle style) : base(style)
+ {
+ Initialize();
+ }
+
+ /// <summary>
/// Event of Selection changed.
/// previous selection list and current selection will be provided.
/// </summary>
return instance.InternalItemTemplate;
});
+ private void Initialize()
+ {
+ Scrolling += OnScrolling;
+ }
+
/// <summary>
/// Base Constructor
/// </summary>
/// <since_tizen> 9 </since_tizen>
public RecyclerView() : base()
{
- Scrolling += OnScrolling;
+ Initialize();
+ }
+
+ /// <summary>
+ /// Creates a new instance of a RecyclerView with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created RecyclerView.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public RecyclerView(ControlStyle style) : base(style)
+ {
+ Initialize();
}
/// <summary>
private bool isOverShootingShadowShown = false;
private float startShowShadowDisplacement;
- /// <summary>
- /// Default Constructor
- /// </summary>
- /// <since_tizen> 8 </since_tizen>
- public ScrollableBase() : base()
+ private void Initialize()
{
DecelerationRate = 0.998f;
SetKeyboardNavigationSupport(true);
}
+ /// <summary>
+ /// Default Constructor
+ /// </summary>
+ /// <since_tizen> 8 </since_tizen>
+ public ScrollableBase() : base()
+ {
+ Initialize();
+ }
+
+ /// <summary>
+ /// Creates a new instance of a ScrollableBase with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created ScrollableBase.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public ScrollableBase(ControlStyle style) : base(style)
+ {
+ Initialize();
+ }
+
private bool OnInterruptTouchingChildTouched(object source, View.TouchEventArgs args)
{
if (args.Touch.GetState(0) == PointStateType.Down)
private TabButtonGroup tabButtonGroup;
- /// <summary>
- /// Creates a new instance of TabBar.
- /// </summary>
- /// <since_tizen> 9 </since_tizen>
- public TabBar()
+ private void Initialize()
{
Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Horizontal };
}
/// <summary>
+ /// Creates a new instance of TabBar.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
+ public TabBar()
+ {
+ Initialize();
+ }
+
+ /// <summary>
+ /// Creates a new instance of a TabBar with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created TabBar.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public TabBar(ControlStyle style) : base(style)
+ {
+ Initialize();
+ }
+
+ /// <summary>
/// An event for the tab button selected signal which can be used to
/// subscribe or unsubscribe the event handler provided by a user.
/// </summary>
{
private IList<View> views;
+ private void Initialize()
+ {
+ SelectedIndex = -1;
+ views = new List<View>();
+ }
+
/// <summary>
/// Creates a new instance of TabContent.
/// </summary>
/// <since_tizen> 9 </since_tizen>
public TabContent()
{
- SelectedIndex = -1;
- views = new List<View>();
+ Initialize();
+ }
+
+ /// <summary>
+ /// Creates a new instance of a TabContent with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created TabContent.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public TabContent(ControlStyle style) : base(style)
+ {
+ Initialize();
}
/// <summary>
private TabContent content = null;
- /// <summary>
- /// Creates a new instance of TabView.
- /// </summary>
- /// <since_tizen> 9 </since_tizen>
- public TabView()
+ private void Initialize()
{
Layout = new LinearLayout() { LinearOrientation = LinearLayout.Orientation.Vertical };
WidthSpecification = LayoutParamPolicies.MatchParent;
TabBar.RaiseAbove(Content);
}
+ /// <summary>
+ /// Creates a new instance of TabView.
+ /// </summary>
+ /// <since_tizen> 9 </since_tizen>
+ public TabView()
+ {
+ Initialize();
+ }
+
+ /// <summary>
+ /// Creates a new instance of a TabView with style.
+ /// </summary>
+ /// <param name="style">A style applied to the newly created TabView.</param>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public TabView(ControlStyle style) : base(style)
+ {
+ Initialize();
+ }
+
/// <inheritdoc/>
[EditorBrowsable(EditorBrowsableState.Never)]
public override void OnInitialize()
// Menu base style
theme.AddStyleWithoutClone("Tizen.NUI.Components.Menu", new MenuStyle()
{
+ BackgroundColor = Color.Transparent,
Content = new ViewStyle()
{
BackgroundColor = new Color("#FFFEFE"),