/*
- * Copyright(c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright(c) 2019-2021 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
/// <since_tizen> 3 </since_tizen>
public partial class View
{
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ /// <summary>
+ /// StyleNameProperty (DALi json)
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty StyleNameProperty = BindableProperty.Create("StyleName", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty StyleNameProperty = BindableProperty.Create(nameof(StyleName), typeof(string), typeof(View), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STYLE_NAME, new Tizen.NUI.PropertyValue((string)newValue));
+ string styleName = (string)newValue;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.StyleName, new Tizen.NUI.PropertyValue(styleName));
+
+ view.styleName = styleName;
+
+ if (string.IsNullOrEmpty(styleName)) return;
+
+ var style = ThemeManager.GetUpdateStyleWithoutClone(styleName);
+
+ if (style == null) return;
+
+ view.ApplyStyle(style);
+ view.SetThemeApplied();
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
+
+ if (!string.IsNullOrEmpty(view.styleName)) return view.styleName;
+
string temp;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STYLE_NAME).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.StyleName).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// KeyInputFocusProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create("BackgroundColor", typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty KeyInputFocusProperty = BindableProperty.Create(nameof(KeyInputFocus), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((Color)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.KeyInputFocus, new Tizen.NUI.PropertyValue((bool)newValue));
}
- },
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ bool temp = false;
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.KeyInputFocus).Get(out temp);
+ return temp;
+ }));
+
+ /// <summary>
+ /// BackgroundColorProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BackgroundColorProperty = BindableProperty.Create(nameof(BackgroundColor), typeof(Color), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+
+ view.themeData?.selectorData?.ClearBackground(view);
+
+ if (newValue is Selector<Color> selector)
+ {
+ if (selector.HasAll()) view.SetBackgroundColor(selector.All);
+ else view.EnsureSelectorData().BackgroundColor = new TriggerableSelector<Color>(view, selector, view.SetBackgroundColor, true);
+ }
+ else
+ {
+ view.SetBackgroundColor((Color)newValue);
+ }
+ }),
defaultValueCreator: (bindable) =>
{
var view = (View)bindable;
return backgroundColor;
});
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+
+ /// <summary>
+ /// ColorProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create("BackgroundImage", typeof(string), typeof(View), default(string), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty ColorProperty = BindableProperty.Create(nameof(Color), typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
{
var view = (View)bindable;
- if (newValue != null)
+
+ view.themeData?.selectorData?.Color?.Reset(view);
+
+ if (newValue is Selector<Color> selector)
+ {
+ if (selector.HasAll()) view.SetColor(selector.All);
+ else view.EnsureSelectorData().Color = new TriggerableSelector<Color>(view, selector, view.SetColor, true);
+ }
+ else
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((string)newValue));
- view.BackgroundImageSynchronosLoading = view._backgroundImageSynchronosLoading;
+ view.SetColor((Color)newValue);
}
},
defaultValueCreator: (bindable) =>
{
var view = (View)bindable;
+ Color color = new Color(0.0f, 0.0f, 0.0f, 0.0f);
+ view.GetProperty(Interop.ActorProperty.ColorGet()).Get(color);
+ return color;
+ });
+ /// <summary> BackgroundImageProperty </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BackgroundImageProperty = BindableProperty.Create(nameof(BackgroundImage), typeof(string), typeof(View), default(string), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+
+ if (view.themeData?.selectorData != null)
+ {
+ view.themeData.selectorData.BackgroundColor?.Reset(view);
+ view.themeData.selectorData.BackgroundImage?.Reset(view);
+ }
+
+ if (newValue is Selector<string> selector)
+ {
+ if (selector.HasAll()) view.SetBackgroundImage(selector.All);
+ else view.EnsureSelectorData().BackgroundImage = new TriggerableSelector<string>(view, selector, view.SetBackgroundImage, true);
+ }
+ else
+ {
+ view.SetBackgroundImage((string)newValue);
+ }
+ }),
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
string backgroundImage = "";
Tizen.NUI.PropertyMap background = view.Background;
- int visualType = 0;
- background.Find(Visual.Property.Type)?.Get(out visualType);
- if (visualType == (int)Visual.Type.Image)
+ background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
+
+ return backgroundImage;
+ });
+ /// <summary>BackgroundImageBorderProperty</summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BackgroundImageBorderProperty = BindableProperty.Create(nameof(BackgroundImageBorder), typeof(Rectangle), typeof(View), default(Rectangle), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+
+ view.themeData?.selectorData?.BackgroundImageBorder?.Reset(view);
+
+ if (newValue is Selector<Rectangle> selector)
+ {
+ if (selector.HasAll()) view.SetBackgroundImageBorder(selector.All);
+ else view.EnsureSelectorData().BackgroundImageBorder = new TriggerableSelector<Rectangle>(view, selector, view.SetBackgroundImageBorder, true);
+ }
+ else
{
- background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage);
+ view.SetBackgroundImageBorder((Rectangle)newValue);
}
+ }),
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
- return backgroundImage;
+ return view.backgroundExtraData?.BackgroundImageBorder;
});
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ /// <summary>
+ /// BackgroundProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty BackgroundProperty = BindableProperty.Create("Background", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty BackgroundProperty = BindableProperty.Create(nameof(Background), typeof(PropertyMap), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.BACKGROUND, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
+
+ view.backgroundExtraData = null;
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.BACKGROUND).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.BACKGROUND).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// StateProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty StateProperty = BindableProperty.Create("State", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty StateProperty = BindableProperty.Create(nameof(State), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.STATE, new Tizen.NUI.PropertyValue((int)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
int temp = 0;
- if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.STATE).Get(out temp) == false)
+ if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.STATE).Get(out temp) == false)
{
NUILog.Error("State get error!");
}
case 2: return States.Disabled;
default: return States.Normal;
}
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// SubStateProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SubStateProperty = BindableProperty.Create("SubState", typeof(States), typeof(View), States.Normal, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty SubStateProperty = BindableProperty.Create(nameof(SubState), typeof(States), typeof(View), States.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
string valueToString = "";
if (newValue != null)
{
- switch ((States)newValue)
- {
- case States.Normal: { valueToString = "NORMAL"; break; }
- case States.Focused: { valueToString = "FOCUSED"; break; }
- case States.Disabled: { valueToString = "DISABLED"; break; }
- default: { valueToString = "NORMAL"; break; }
- }
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SUB_STATE, new Tizen.NUI.PropertyValue(valueToString));
+ valueToString = ((States)newValue).GetDescription();
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SubState, new Tizen.NUI.PropertyValue(valueToString));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
string temp;
- if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SUB_STATE).Get(out temp) == false)
+ if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SubState).Get(out temp) == false)
{
NUILog.Error("subState get error!");
}
- switch (temp)
- {
- case "NORMAL": return States.Normal;
- case "FOCUSED": return States.Focused;
- case "DISABLED": return States.Disabled;
- default: return States.Normal;
- }
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ return temp.GetValueByDescription<States>();
+ }));
+
+ /// <summary>
+ /// TooltipProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty TooltipProperty = BindableProperty.Create("Tooltip", typeof(PropertyMap), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty TooltipProperty = BindableProperty.Create(nameof(Tooltip), typeof(PropertyMap), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((PropertyMap)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Tizen.NUI.PropertyMap temp = new Tizen.NUI.PropertyMap();
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.TOOLTIP).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.TOOLTIP).Get(temp);
return temp;
- });
+ }));
- /// Only for XAML property binding. No need to open as public. (keep as Hidden/InhouseAPI)
+ /// <summary>
+ /// FlexProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty FlexProperty = BindableProperty.Create(nameof(Flex), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FLEX, new Tizen.NUI.PropertyValue((float)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FLEX).Get(out temp);
return temp;
- });
+ }));
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ /// <summary>
+ /// AlignSelfProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create("AlignSelf", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty AlignSelfProperty = BindableProperty.Create(nameof(AlignSelf), typeof(int), typeof(View), default(int), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF, new Tizen.NUI.PropertyValue((int)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf, new Tizen.NUI.PropertyValue((int)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
int temp = 0;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.ALIGN_SELF).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.AlignSelf).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// FlexMarginProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create("FlexMargin", typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty FlexMarginProperty = BindableProperty.Create(nameof(FlexMargin), typeof(Vector4), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN, new Tizen.NUI.PropertyValue((Vector4)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin, new Tizen.NUI.PropertyValue((Vector4)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, FlexContainer.ChildProperty.FLEX_MARGIN).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, FlexContainer.ChildProperty.FlexMargin).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// CellIndexProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty CellIndexProperty = BindableProperty.Create("CellIndex", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty CellIndexProperty = BindableProperty.Create(nameof(CellIndex), typeof(Vector2), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX, new Tizen.NUI.PropertyValue((Vector2)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellIndex, new Tizen.NUI.PropertyValue((Vector2)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Vector2 temp = new Vector2(0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_INDEX).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellIndex).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// RowSpanProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty RowSpanProperty = BindableProperty.Create("RowSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty RowSpanProperty = BindableProperty.Create(nameof(RowSpan), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.RowSpan, new Tizen.NUI.PropertyValue((float)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.ROW_SPAN).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.RowSpan).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// ColumnSpanProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create("ColumnSpan", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty ColumnSpanProperty = BindableProperty.Create(nameof(ColumnSpan), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN, new Tizen.NUI.PropertyValue((float)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.ColumnSpan, new Tizen.NUI.PropertyValue((float)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.COLUMN_SPAN).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.ColumnSpan).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// CellHorizontalAlignmentProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create("CellHorizontalAlignment", typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty CellHorizontalAlignmentProperty = BindableProperty.Create(nameof(CellHorizontalAlignment), typeof(HorizontalAlignmentType), typeof(View), HorizontalAlignmentType.Left, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
string valueToString = "";
if (newValue != null)
{
- switch ((HorizontalAlignmentType)newValue)
- {
- case Tizen.NUI.HorizontalAlignmentType.Left: { valueToString = "left"; break; }
- case Tizen.NUI.HorizontalAlignmentType.Center: { valueToString = "center"; break; }
- case Tizen.NUI.HorizontalAlignmentType.Right: { valueToString = "right"; break; }
- default: { valueToString = "left"; break; }
- }
- Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
+ valueToString = ((HorizontalAlignmentType)newValue).GetDescription();
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment, new Tizen.NUI.PropertyValue(valueToString));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
string temp;
- if (Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
+ if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellHorizontalAlignment).Get(out temp) == false)
{
NUILog.Error("CellHorizontalAlignment get error!");
}
- switch (temp)
- {
- case "left": return Tizen.NUI.HorizontalAlignmentType.Left;
- case "center": return Tizen.NUI.HorizontalAlignmentType.Center;
- case "right": return Tizen.NUI.HorizontalAlignmentType.Right;
- default: return Tizen.NUI.HorizontalAlignmentType.Left;
- }
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ return temp.GetValueByDescription<HorizontalAlignmentType>();
+ }));
+
+ /// <summary>
+ /// CellVerticalAlignmentProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create("CellVerticalAlignment", typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty CellVerticalAlignmentProperty = BindableProperty.Create(nameof(CellVerticalAlignment), typeof(VerticalAlignmentType), typeof(View), VerticalAlignmentType.Top, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
string valueToString = "";
if (newValue != null)
{
- switch ((VerticalAlignmentType)newValue)
- {
- case Tizen.NUI.VerticalAlignmentType.Top: { valueToString = "top"; break; }
- case Tizen.NUI.VerticalAlignmentType.Center: { valueToString = "center"; break; }
- case Tizen.NUI.VerticalAlignmentType.Bottom: { valueToString = "bottom"; break; }
- default: { valueToString = "top"; break; }
- }
- Tizen.NUI.Object.SetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue(valueToString));
+ valueToString = ((VerticalAlignmentType)newValue).GetDescription();
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment, new Tizen.NUI.PropertyValue(valueToString));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
string temp;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, TableView.ChildProperty.CellVerticalAlignment).Get(out temp);
{
NUILog.Error("CellVerticalAlignment get error!");
}
- switch (temp)
- {
- case "top": return Tizen.NUI.VerticalAlignmentType.Top;
- case "center": return Tizen.NUI.VerticalAlignmentType.Center;
- case "bottom": return Tizen.NUI.VerticalAlignmentType.Bottom;
- default: return Tizen.NUI.VerticalAlignmentType.Top;
- }
- });
+ return temp.GetValueByDescription<VerticalAlignmentType>();
+ }));
/// <summary>
/// "Please DO NOT use! This will be deprecated! Please use 'View Weight' instead of BindableProperty"
/// This needs to be hidden as inhouse API until all applications using it have been updated. Do not make public.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty WeightProperty = BindableProperty.Create("Weight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty WeightProperty = BindableProperty.Create(nameof(Weight), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
return view.Weight;
});
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ /// <summary>
+ /// LeftFocusableViewProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
{
if (view.LeftFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.LeftFocusableViewId); }
return null;
});
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+
+ /// <summary>
+ /// RightFocusableViewProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
{
if (view.RightFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.RightFocusableViewId); }
return null;
});
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+
+ /// <summary>
+ /// UpFocusableViewProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
{
if (view.UpFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.UpFocusableViewId); }
return null;
});
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+
+ /// <summary>
+ /// DownFocusableViewProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
{
if (view.DownFocusableViewId >= 0) { return view.ConvertIdToView((uint)view.DownFocusableViewId); }
return null;
});
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+
+ /// <summary>
+ /// FocusableProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty FocusableProperty = BindableProperty.Create("Focusable", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty FocusableProperty = BindableProperty.Create(nameof(Focusable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null) { view.SetKeyboardFocusable((bool)newValue); }
var view = (View)bindable;
return view.IsKeyboardFocusable();
});
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+
+ /// <summary>
+ /// FocusableChildrenProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty FocusableChildrenProperty = BindableProperty.Create(nameof(FocusableChildren), typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null) { view.SetKeyboardFocusableChildren((bool)newValue); }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ return view.AreChildrenKeyBoardFocusable();
+ });
+
+ /// <summary>
+ /// FocusableInTouchProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty FocusableInTouchProperty = BindableProperty.Create(nameof(FocusableInTouch), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null) { view.SetFocusableInTouch((bool)newValue); }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ return view.IsFocusableInTouch();
+ });
+
+ /// <summary>
+ /// Size2DProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty Size2DProperty = BindableProperty.Create("Size2D", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty Size2DProperty = BindableProperty.Create(nameof(Size2D), typeof(Size2D), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(new Size((Size2D)newValue)));
+ view.widthPolicy = ((Size2D)newValue).Width;
+ view.heightPolicy = ((Size2D)newValue).Height;
+
+ view.layout?.RequestLayout();
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Size temp = new Size(0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SIZE).Get(temp);
Size2D size = new Size2D((int)temp.Width, (int)temp.Height);
return size;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// OpacityProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty OpacityProperty = BindableProperty.Create("Opacity", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty OpacityProperty = BindableProperty.Create(nameof(Opacity), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
- if (newValue != null)
+
+ view.themeData?.selectorData?.Opacity?.Reset(view);
+
+ if (newValue is Selector<float?> selector)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)newValue));
+ if (selector.HasAll()) view.SetOpacity(selector.All);
+ else view.EnsureSelectorData().Opacity = new TriggerableSelector<float?>(view, selector, view.SetOpacity, true);
}
- },
- defaultValueCreator: (bindable) =>
+ else
+ {
+ view.SetOpacity((float?)newValue);
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.OPACITY).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.OPACITY).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// Position2DProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty Position2DProperty = BindableProperty.Create("Position2D", typeof(Position2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty Position2DProperty = BindableProperty.Create(nameof(Position2D), typeof(Position2D), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue(new Position((Position2D)newValue)));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Position temp = new Position(0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.POSITION).Get(temp);
return new Position2D(temp);
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// PositionUsesPivotPointProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create("PositionUsesPivotPoint", typeof(bool), typeof(View), true, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty PositionUsesPivotPointProperty = BindableProperty.Create(nameof(PositionUsesPivotPoint), typeof(bool), typeof(View), true, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT, new Tizen.NUI.PropertyValue((bool)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionUsesAnchorPoint, new Tizen.NUI.PropertyValue((bool)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
bool temp = false;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_USES_ANCHOR_POINT).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionUsesAnchorPoint).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// SiblingOrderProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create("SiblingOrder", typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty SiblingOrderProperty = BindableProperty.Create(nameof(SiblingOrder), typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
{
var view = (View)bindable;
int value;
return 0;
});
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+
+ /// <summary>
+ /// ParentOriginProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create("ParentOrigin", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty ParentOriginProperty = BindableProperty.Create(nameof(ParentOrigin), typeof(Position), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN, new Tizen.NUI.PropertyValue((Position)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ParentOrigin, new Tizen.NUI.PropertyValue((Position)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Position temp = new Position(0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PARENT_ORIGIN).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ParentOrigin).Get(temp);
return temp;
- }
+ })
);
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+
+ /// <summary>
+ /// PivotPointProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PivotPointProperty = BindableProperty.Create("PivotPoint", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty PivotPointProperty = BindableProperty.Create(nameof(PivotPoint), typeof(Position), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ANCHOR_POINT, new Tizen.NUI.PropertyValue((Position)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AnchorPoint, new Tizen.NUI.PropertyValue((Position)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Position temp = new Position(0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ANCHOR_POINT).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AnchorPoint).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// SizeWidthProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create("SizeWidth", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty SizeWidthProperty = BindableProperty.Create(nameof(SizeWidth), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_WIDTH, new Tizen.NUI.PropertyValue((float)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, new Tizen.NUI.PropertyValue((float)newValue));
+ view.WidthSpecification = (int)System.Math.Ceiling((float)newValue);
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_WIDTH).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// SizeHeightProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create("SizeHeight", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty SizeHeightProperty = BindableProperty.Create(nameof(SizeHeight), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT, new Tizen.NUI.PropertyValue((float)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, new Tizen.NUI.PropertyValue((float)newValue));
+ view.HeightSpecification = (int)System.Math.Ceiling((float)newValue);
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_HEIGHT).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// PositionProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PositionProperty = BindableProperty.Create("Position", typeof(Position), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty PositionProperty = BindableProperty.Create(nameof(Position), typeof(Position), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.POSITION, new Tizen.NUI.PropertyValue((Position)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Position temp = new Position(0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.POSITION).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// PositionXProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PositionXProperty = BindableProperty.Create("PositionX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty PositionXProperty = BindableProperty.Create(nameof(PositionX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_X, new Tizen.NUI.PropertyValue((float)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionX, new Tizen.NUI.PropertyValue((float)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_X).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionX).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// PositionYProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PositionYProperty = BindableProperty.Create("PositionY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty PositionYProperty = BindableProperty.Create(nameof(PositionY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Y, new Tizen.NUI.PropertyValue((float)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionY, new Tizen.NUI.PropertyValue((float)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Y).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionY).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// PositionZProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PositionZProperty = BindableProperty.Create("PositionZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty PositionZProperty = BindableProperty.Create(nameof(PositionZ), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.POSITION_Z, new Tizen.NUI.PropertyValue((float)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionZ, new Tizen.NUI.PropertyValue((float)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.POSITION_Z).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PositionZ).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// OrientationProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty OrientationProperty = BindableProperty.Create("Orientation", typeof(Rotation), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty OrientationProperty = BindableProperty.Create(nameof(Orientation), typeof(Rotation), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION, new Tizen.NUI.PropertyValue((Rotation)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Rotation temp = new Rotation();
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.ORIENTATION).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ORIENTATION).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// ScaleProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ScaleProperty = BindableProperty.Create("Scale", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty ScaleProperty = BindableProperty.Create(nameof(Scale), typeof(Vector3), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SCALE, new Tizen.NUI.PropertyValue((Vector3)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SCALE).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// ScaleXProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ScaleXProperty = BindableProperty.Create("ScaleX", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty ScaleXProperty = BindableProperty.Create(nameof(ScaleX), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_X, new Tizen.NUI.PropertyValue((float)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleX, new Tizen.NUI.PropertyValue((float)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_X).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleX).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// ScaleYProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ScaleYProperty = BindableProperty.Create("ScaleY", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty ScaleYProperty = BindableProperty.Create(nameof(ScaleY), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Y, new Tizen.NUI.PropertyValue((float)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleY, new Tizen.NUI.PropertyValue((float)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Y).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleY).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// ScaleZProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ScaleZProperty = BindableProperty.Create("ScaleZ", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty ScaleZProperty = BindableProperty.Create(nameof(ScaleZ), typeof(float), typeof(View), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SCALE_Z, new Tizen.NUI.PropertyValue((float)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleZ, new Tizen.NUI.PropertyValue((float)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
float temp = 0.0f;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SCALE_Z).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ScaleZ).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// NameProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty NameProperty = BindableProperty.Create("Name", typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty NameProperty = BindableProperty.Create(nameof(Name), typeof(string), typeof(View), string.Empty, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.NAME, new Tizen.NUI.PropertyValue((string)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
string temp;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.NAME).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.NAME).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// SensitiveProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SensitiveProperty = BindableProperty.Create("Sensitive", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty SensitiveProperty = BindableProperty.Create(nameof(Sensitive), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SENSITIVE, new Tizen.NUI.PropertyValue((bool)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
bool temp = false;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SENSITIVE).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SENSITIVE).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// LeaveRequiredProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create("LeaveRequired", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty LeaveRequiredProperty = BindableProperty.Create(nameof(LeaveRequired), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED, new Tizen.NUI.PropertyValue((bool)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LeaveRequired, new Tizen.NUI.PropertyValue((bool)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
bool temp = false;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LEAVE_REQUIRED).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LeaveRequired).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// InheritOrientationProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create("InheritOrientation", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty InheritOrientationProperty = BindableProperty.Create(nameof(InheritOrientation), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION, new Tizen.NUI.PropertyValue((bool)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritOrientation, new Tizen.NUI.PropertyValue((bool)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
bool temp = false;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_ORIENTATION).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritOrientation).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// InheritScaleProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create("InheritScale", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty InheritScaleProperty = BindableProperty.Create(nameof(InheritScale), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_SCALE, new Tizen.NUI.PropertyValue((bool)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritScale, new Tizen.NUI.PropertyValue((bool)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
bool temp = false;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_SCALE).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritScale).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// DrawModeProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty DrawModeProperty = BindableProperty.Create("DrawMode", typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty DrawModeProperty = BindableProperty.Create(nameof(DrawMode), typeof(DrawModeType), typeof(View), DrawModeType.Normal, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.DRAW_MODE, new Tizen.NUI.PropertyValue((int)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DrawMode, new Tizen.NUI.PropertyValue((int)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
- string temp;
- if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.DRAW_MODE).Get(out temp) == false)
+ int temp;
+ if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.DrawMode).Get(out temp) == false)
{
NUILog.Error("DrawMode get error!");
}
- switch (temp)
- {
- case "NORMAL": return DrawModeType.Normal;
- case "OVERLAY_2D": return DrawModeType.Overlay2D;
-#pragma warning disable CS0618 // Disable deprecated warning as we do need to use the deprecated API here.
- case "STENCIL": return DrawModeType.Stencil;
-#pragma warning restore CS0618
- default: return DrawModeType.Normal;
- }
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ return (DrawModeType)temp;
+ }));
+
+ /// <summary>
+ /// SizeModeFactorProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create("SizeModeFactor", typeof(Vector3), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty SizeModeFactorProperty = BindableProperty.Create(nameof(SizeModeFactor), typeof(Vector3), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR, new Tizen.NUI.PropertyValue((Vector3)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeModeFactor, new Tizen.NUI.PropertyValue((Vector3)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_MODE_FACTOR).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeModeFactor).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// WidthResizePolicyProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create("WidthResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty WidthResizePolicyProperty = BindableProperty.Create(nameof(WidthResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
+ if((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
+ {
+ if(view.widthConstraint == null)
+ {
+ view.widthConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeWidth, View.Property.SizeWidth);
+ view.widthConstraint.Apply();
+ }
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthResizePolicy, new Tizen.NUI.PropertyValue((int)ResizePolicyType.FillToParent));
+ }
+ else
+ {
+ view.widthConstraint?.Remove();
+ view.widthConstraint?.Dispose();
+ view.widthConstraint = null;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthResizePolicy, new Tizen.NUI.PropertyValue((int)newValue));
+ }
+ // Match ResizePolicy to new Layouting.
+ // Parent relative policies can not be mapped at this point as parent size unknown.
+ switch ((ResizePolicyType)newValue)
+ {
+ case ResizePolicyType.UseNaturalSize:
+ {
+ view.WidthSpecification = LayoutParamPolicies.WrapContent;
+ break;
+ }
+ case ResizePolicyType.FillToParent:
+ {
+ view.WidthSpecification = LayoutParamPolicies.MatchParent;
+ break;
+ }
+ case ResizePolicyType.FitToChildren:
+ {
+ view.WidthSpecification = LayoutParamPolicies.WrapContent;
+ break;
+ }
+ default:
+ break;
+ }
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
string temp;
- if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
+ if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthResizePolicy).Get(out temp) == false)
{
NUILog.Error("WidthResizePolicy get error!");
}
- switch (temp)
- {
- case "FIXED": return ResizePolicyType.Fixed;
- case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
- case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
- case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
- case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
- case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
- case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
- case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
- default: return ResizePolicyType.Fixed;
- }
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ return temp.GetValueByDescription<ResizePolicyType>();
+ }));
+
+ /// <summary>
+ /// HeightResizePolicyProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create("HeightResizePolicy", typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty HeightResizePolicyProperty = BindableProperty.Create(nameof(HeightResizePolicy), typeof(ResizePolicyType), typeof(View), ResizePolicyType.Fixed, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY, new Tizen.NUI.PropertyValue((int)newValue));
+ if((ResizePolicyType)newValue == ResizePolicyType.KeepSizeFollowingParent)
+ {
+ if(view.heightConstraint == null)
+ {
+ view.heightConstraint = new EqualConstraintWithParentFloat((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeHeight, View.Property.SizeHeight);
+ view.heightConstraint.Apply();
+ }
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightResizePolicy, new Tizen.NUI.PropertyValue((int)ResizePolicyType.FillToParent));
+ }
+ else
+ {
+ view.heightConstraint?.Remove();
+ view.heightConstraint?.Dispose();
+ view.heightConstraint = null;
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightResizePolicy, new Tizen.NUI.PropertyValue((int)newValue));
+ }
+ // Match ResizePolicy to new Layouting.
+ // Parent relative policies can not be mapped at this point as parent size unknown.
+ switch ((ResizePolicyType)newValue)
+ {
+ case ResizePolicyType.UseNaturalSize:
+ {
+ view.HeightSpecification = LayoutParamPolicies.WrapContent;
+ break;
+ }
+ case ResizePolicyType.FillToParent:
+ {
+ view.HeightSpecification = LayoutParamPolicies.MatchParent;
+ break;
+ }
+ case ResizePolicyType.FitToChildren:
+ {
+ view.HeightSpecification = LayoutParamPolicies.WrapContent;
+ break;
+ }
+ default:
+ break;
+ }
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
string temp;
- if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
+ if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightResizePolicy).Get(out temp) == false)
{
NUILog.Error("HeightResizePolicy get error!");
}
- switch (temp)
- {
- case "FIXED": return ResizePolicyType.Fixed;
- case "USE_NATURAL_SIZE": return ResizePolicyType.UseNaturalSize;
- case "FILL_TO_PARENT": return ResizePolicyType.FillToParent;
- case "SIZE_RELATIVE_TO_PARENT": return ResizePolicyType.SizeRelativeToParent;
- case "SIZE_FIXED_OFFSET_FROM_PARENT": return ResizePolicyType.SizeFixedOffsetFromParent;
- case "FIT_TO_CHILDREN": return ResizePolicyType.FitToChildren;
- case "DIMENSION_DEPENDENCY": return ResizePolicyType.DimensionDependency;
- case "USE_ASSIGNED_SIZE": return ResizePolicyType.UseAssignedSize;
- default: return ResizePolicyType.Fixed;
- }
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ return temp.GetValueByDescription<ResizePolicyType>();
+ }));
+
+ /// <summary>
+ /// SizeScalePolicyProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create("SizeScalePolicy", typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty SizeScalePolicyProperty = BindableProperty.Create(nameof(SizeScalePolicy), typeof(SizeScalePolicyType), typeof(View), SizeScalePolicyType.UseSizeSet, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
string valueToString = "";
if (newValue != null)
{
- switch ((SizeScalePolicyType)newValue)
- {
- case SizeScalePolicyType.UseSizeSet: { valueToString = "USE_SIZE_SET"; break; }
- case SizeScalePolicyType.FitWithAspectRatio: { valueToString = "FIT_WITH_ASPECT_RATIO"; break; }
- case SizeScalePolicyType.FillWithAspectRatio: { valueToString = "FILL_WITH_ASPECT_RATIO"; break; }
- default: { valueToString = "USE_SIZE_SET"; break; }
- }
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY, new Tizen.NUI.PropertyValue(valueToString));
+ valueToString = ((SizeScalePolicyType)newValue).GetDescription();
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeScalePolicy, new Tizen.NUI.PropertyValue(valueToString));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
- string temp;
- if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
+ int temp;
+ if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SizeScalePolicy).Get(out temp) == false)
{
NUILog.Error("SizeScalePolicy get error!");
}
- switch (temp)
- {
- case "USE_SIZE_SET": return SizeScalePolicyType.UseSizeSet;
- case "FIT_WITH_ASPECT_RATIO": return SizeScalePolicyType.FitWithAspectRatio;
- case "FILL_WITH_ASPECT_RATIO": return SizeScalePolicyType.FillWithAspectRatio;
- default: return SizeScalePolicyType.UseSizeSet;
- }
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ return (SizeScalePolicyType)temp;
+ }));
+
+ /// <summary>
+ /// WidthForHeightProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create("WidthForHeight", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty WidthForHeightProperty = BindableProperty.Create(nameof(WidthForHeight), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT, new Tizen.NUI.PropertyValue((bool)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthForHeight, new Tizen.NUI.PropertyValue((bool)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
bool temp = false;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.WIDTH_FOR_HEIGHT).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.WidthForHeight).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// HeightForWidthProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create("HeightForWidth", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty HeightForWidthProperty = BindableProperty.Create(nameof(HeightForWidth), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH, new Tizen.NUI.PropertyValue((bool)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightForWidth, new Tizen.NUI.PropertyValue((bool)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
bool temp = false;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.HEIGHT_FOR_WIDTH).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.HeightForWidth).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// PaddingProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PaddingProperty = BindableProperty.Create("Padding", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty PaddingProperty = BindableProperty.Create(nameof(Padding), typeof(Extents), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PADDING, new Tizen.NUI.PropertyValue((Extents)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Extents temp = new Extents(0, 0, 0, 0);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.PADDING).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.PADDING).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// SizeProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SizeProperty = BindableProperty.Create("Size", typeof(Size), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty SizeProperty = BindableProperty.Create(nameof(Size), typeof(Size), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue((Size)newValue));
+ Size size = (Size)newValue;
+ // Set Specification so when layouts measure this View it matches the value set here.
+ // All Views are currently Layouts.
+ view.WidthSpecification = (int)System.Math.Ceiling(size.Width);
+ view.HeightSpecification = (int)System.Math.Ceiling(size.Height);
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SIZE, new Tizen.NUI.PropertyValue(size));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Size temp = new Size(0, 0, 0);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.SIZE).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SIZE).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// MinimumSizeProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create("MinimumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty MinimumSizeProperty = BindableProperty.Create(nameof(MinimumSize), typeof(Size2D), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
- if (newValue != null)
+ Size2D temp = newValue as Size2D;
+ if (temp != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MinimumSize, new Tizen.NUI.PropertyValue(temp));
}
- },
- defaultValueCreator: (bindable) =>
+ else
+ {
+ Tizen.Log.Fatal("NUI", $"[ERROR] can't set MinimumSizeProperty!");
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Size2D temp = new Size2D(0, 0);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MINIMUM_SIZE).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MinimumSize).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// MaximumSizeProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create("MaximumSize", typeof(Size2D), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty MaximumSizeProperty = BindableProperty.Create(nameof(MaximumSize), typeof(Size2D), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
- if (newValue != null)
+ Size2D temp = newValue as Size2D;
+ if (temp != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE, new Tizen.NUI.PropertyValue((Size2D)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MaximumSize, new Tizen.NUI.PropertyValue(temp));
}
- },
- defaultValueCreator: (bindable) =>
+ else
+ {
+ Tizen.Log.Fatal("NUI", $"[ERROR] can't set MaximumSizeProperty!");
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
Size2D temp = new Size2D(0, 0);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MAXIMUM_SIZE).Get(temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MaximumSize).Get(temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// InheritPositionProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create("InheritPosition", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty InheritPositionProperty = BindableProperty.Create(nameof(InheritPosition), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_POSITION, new Tizen.NUI.PropertyValue((bool)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritPosition, new Tizen.NUI.PropertyValue((bool)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
bool temp = false;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_POSITION).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritPosition).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// ClippingModeProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create("ClippingMode", typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty ClippingModeProperty = BindableProperty.Create(nameof(ClippingMode), typeof(ClippingModeType), typeof(View), ClippingModeType.Disabled, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.CLIPPING_MODE, new Tizen.NUI.PropertyValue((int)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ClippingMode, new Tizen.NUI.PropertyValue((int)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
int temp = 0;
- if (Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.CLIPPING_MODE).Get(out temp) == false)
+ if (Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.ClippingMode).Get(out temp) == false)
{
NUILog.Error("ClippingMode get error!");
}
return (ClippingModeType)temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// InheritLayoutDirectionProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create("InheritLayoutDirection", typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty InheritLayoutDirectionProperty = BindableProperty.Create(nameof(InheritLayoutDirection), typeof(bool), typeof(View), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((bool)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritLayoutDirection, new Tizen.NUI.PropertyValue((bool)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
bool temp = false;
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.INHERIT_LAYOUT_DIRECTION).Get(out temp);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.InheritLayoutDirection).Get(out temp);
return temp;
- });
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ }));
+
+ /// <summary>
+ /// LayoutDirectionProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create("LayoutDirection", typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty LayoutDirectionProperty = BindableProperty.Create(nameof(LayoutDirection), typeof(ViewLayoutDirectionType), typeof(View), ViewLayoutDirectionType.LTR, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION, new Tizen.NUI.PropertyValue((int)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LayoutDirection, new Tizen.NUI.PropertyValue((int)newValue));
}
- },
- defaultValueCreator: (bindable) =>
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
{
var view = (View)bindable;
int temp;
- if (false == Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.LAYOUT_DIRECTION).Get(out temp))
+ if (false == Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.LayoutDirection).Get(out temp))
{
NUILog.Error("LAYOUT_DIRECTION get error!");
}
return (ViewLayoutDirectionType)temp;
+ }));
+
+ /// <summary>
+ /// MarginProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty MarginProperty = BindableProperty.Create(nameof(Margin), typeof(Extents), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+ Extents temp = new Extents(0, 0, 0, 0);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.MARGIN).Get(temp);
+ return temp;
+ }));
+
+ /// <summary>
+ /// UpdateSizeHintProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty UpdateSizeHintProperty = BindableProperty.Create(nameof(UpdateSizeHint), typeof(Vector2), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, Interop.ViewProperty.UpdateSizeHintGet(), new Tizen.NUI.PropertyValue((Vector2)newValue));
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+
+ Vector2 temp = new Vector2(0.0f, 0.0f);
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, Interop.ViewProperty.UpdateSizeHintGet()).Get(temp);
+ return temp;
+ }));
+
+ /// <summary>
+ /// ImageShadow Property
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ImageShadowProperty = BindableProperty.Create(nameof(ImageShadow), typeof(ImageShadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+
+ view.themeData?.selectorData?.ClearShadow(view);
+
+ if (newValue is Selector<ImageShadow> selector)
+ {
+ if (selector.HasAll()) view.SetShadow(selector.All);
+ else view.EnsureSelectorData().ImageShadow = new TriggerableSelector<ImageShadow>(view, selector, view.SetShadow, true);
+ }
+ else
+ {
+ view.SetShadow((ImageShadow)newValue);
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+
+ PropertyMap map = new PropertyMap();
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
+
+ var shadow = new ImageShadow(map);
+ return shadow.IsEmpty() ? null : shadow;
+ }));
+
+ /// <summary>
+ /// Shadow Property
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BoxShadowProperty = BindableProperty.Create(nameof(BoxShadow), typeof(Shadow), typeof(View), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+
+ view.themeData?.selectorData?.ClearShadow(view);
+
+ if (newValue is Selector<Shadow> selector)
+ {
+ if (selector.HasAll()) view.SetShadow(selector.All);
+ else view.EnsureSelectorData().BoxShadow = new TriggerableSelector<Shadow>(view, selector, view.SetShadow, true);
+ }
+ else
+ {
+ view.SetShadow((Shadow)newValue);
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var view = (View)bindable;
+
+ PropertyMap map = new PropertyMap();
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.SHADOW).Get(map);
+
+ var shadow = new Shadow(map);
+ return shadow.IsEmpty() ? null : shadow;
+ }));
+
+ /// <summary>
+ /// CornerRadius Property
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty CornerRadiusProperty = BindableProperty.Create(nameof(CornerRadius), typeof(Vector4), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadius = (Vector4)newValue;
+ view.ApplyCornerRadius();
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.CornerRadius;
+ });
+
+ /// <summary>
+ /// CornerRadiusPolicy Property
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty CornerRadiusPolicyProperty = BindableProperty.Create(nameof(CornerRadiusPolicy), typeof(VisualTransformPolicyType), typeof(View), VisualTransformPolicyType.Absolute, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).CornerRadiusPolicy = (VisualTransformPolicyType)newValue;
+
+ if (view.backgroundExtraData.CornerRadius != null)
+ {
+ view.ApplyCornerRadius();
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ return view.backgroundExtraData == null ? VisualTransformPolicyType.Absolute : view.backgroundExtraData.CornerRadiusPolicy;
+ });
+
+ /// <summary>
+ /// BorderlineWidth Property
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BorderlineWidthProperty = BindableProperty.Create(nameof(BorderlineWidth), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineWidth = (float)newValue;
+ view.ApplyBorderline();
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineWidth;
+ });
+
+ /// <summary>
+ /// BorderlineColor Property
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BorderlineColorProperty = BindableProperty.Create(nameof(BorderlineColor), typeof(Color), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineColor = (Color)newValue;
+ view.ApplyBorderline();
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ return view.backgroundExtraData == null ? Color.Black : view.backgroundExtraData.BorderlineColor;
+ });
+
+ /// <summary>
+ /// BorderlineOffset Property
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BorderlineOffsetProperty = BindableProperty.Create(nameof(BorderlineOffset), typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ (view.backgroundExtraData ?? (view.backgroundExtraData = new BackgroundExtraData())).BorderlineOffset = (float)newValue;
+ view.ApplyBorderline();
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ return view.backgroundExtraData == null ? 0.0f : view.backgroundExtraData.BorderlineOffset;
+ });
+
+ /// <summary>
+ /// EnableControlState property
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty EnableControlStateProperty = BindableProperty.Create(nameof(EnableControlState), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ bool prev = view.enableControlState;
+ view.enableControlState = (bool)newValue;
+
+ if (prev != view.enableControlState)
+ {
+ if (prev)
+ {
+ view.TouchEvent -= view.EmptyOnTouch;
+ }
+ else
+ {
+ view.TouchEvent += view.EmptyOnTouch;
+ }
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ return ((View)bindable).enableControlState;
+ });
+
+ /// <summary>
+ /// ThemeChangeSensitive property
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ThemeChangeSensitiveProperty = BindableProperty.Create(nameof(ThemeChangeSensitive), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+
+ if (view.ThemeChangeSensitive == (bool)newValue) return;
+
+ if (view.themeData == null) view.themeData = new ThemeData();
+
+ view.themeData.ThemeChangeSensitive = (bool)newValue;
+
+ if (!view.themeData.ThemeApplied) return;
+
+ if (view.themeData.ThemeChangeSensitive && !view.themeData.ListeningThemeChangeEvent)
+ {
+ view.themeData.ListeningThemeChangeEvent = true;
+ ThemeManager.ThemeChangedInternal.Add(view.OnThemeChanged);
+ }
+ else if (!view.themeData.ThemeChangeSensitive && view.themeData.ListeningThemeChangeEvent)
+ {
+ view.themeData.ListeningThemeChangeEvent = false;
+ ThemeManager.ThemeChangedInternal.Remove(view.OnThemeChanged);
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ return ((View)bindable).themeData?.ThemeChangeSensitive ?? ThemeManager.ApplicationThemeChangeSensitive;
+ });
+
+ /// <summary>
+ /// AccessibilityNameProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty AccessibilityNameProperty = BindableProperty.Create(nameof(AccessibilityName), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityName, new Tizen.NUI.PropertyValue((string)newValue));
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+
+ string temp;
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityName).Get(out temp);
+ return temp;
});
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+
+ /// <summary>
+ /// AccessibilityDescriptionProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty MarginProperty = BindableProperty.Create("Margin", typeof(Extents), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty AccessibilityDescriptionProperty = BindableProperty.Create(nameof(AccessibilityDescription), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.MARGIN, new Tizen.NUI.PropertyValue((Extents)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityDescription, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var view = (View)bindable;
- Extents temp = new Extents(0, 0, 0, 0);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, View.Property.MARGIN).Get(temp);
+
+ string temp;
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityDescription).Get(out temp);
return temp;
});
- /// This will be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+
+ /// <summary>
+ /// AccessibilityTranslationDomainProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty UpdateSizeHintProperty = BindableProperty.Create("UpdateSizeHint", typeof(Vector2), typeof(View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty AccessibilityTranslationDomainProperty = BindableProperty.Create(nameof(AccessibilityTranslationDomain), typeof(string), typeof(View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
{
- Tizen.NUI.Object.SetProperty(view.swigCPtr, Interop.ViewProperty.View_Property_UPDATE_SIZE_HINT_get(), new Tizen.NUI.PropertyValue((Vector2)newValue));
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityTranslationDomain, new Tizen.NUI.PropertyValue((string)newValue));
}
},
defaultValueCreator: (bindable) =>
{
var view = (View)bindable;
- Vector2 temp = new Vector2(0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty(view.swigCPtr, Interop.ViewProperty.View_Property_UPDATE_SIZE_HINT_get()).Get(temp);
+ string temp;
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityTranslationDomain).Get(out temp);
return temp;
});
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+
+ /// <summary>
+ /// AccessibilityRoleProperty
+ /// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty XamlStyleProperty = BindableProperty.Create("XamlStyle", typeof(Style), typeof(View), default(Style), propertyChanged: (bindable, oldvalue, newvalue) => ((View)bindable)._mergedStyle.Style = (Style)newvalue);
+ public static readonly BindableProperty AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityRole, new Tizen.NUI.PropertyValue((int)newValue));
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+
+ int temp = 0;
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityRole).Get(out temp);
+ return temp;
+ });
+
+ /// <summary>
+ /// AccessibilityHighlightableProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty AccessibilityHighlightableProperty = BindableProperty.Create(nameof(AccessibilityHighlightable), typeof(bool), typeof(View), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var view = (View)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHighlightable, new Tizen.NUI.PropertyValue((bool)newValue));
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var view = (View)bindable;
+ bool temp = false;
+ Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityHighlightable).Get(out temp);
+ return temp;
+ });
+
+ private void SetBackgroundImage(string value)
+ {
+ if (string.IsNullOrEmpty(value))
+ {
+ // Clear background
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue());
+ return;
+ }
+
+ if (value.StartsWith("*Resource*"))
+ {
+ string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
+ value = value.Replace("*Resource*", resource);
+ }
+
+ if (backgroundExtraData == null)
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(value));
+ BackgroundImageSynchronosLoading = backgroundImageSynchronosLoading;
+
+ return;
+ }
+
+ PropertyMap map = new PropertyMap();
+
+ map.Add(ImageVisualProperty.URL, new PropertyValue(value))
+ .Add(Visual.Property.CornerRadius, new PropertyValue(backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius)))
+ .Add(Visual.Property.CornerRadiusPolicy, new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy)))
+ .Add(Visual.Property.BorderlineWidth, new PropertyValue(backgroundExtraData.BorderlineWidth))
+ .Add(Visual.Property.BorderlineColor, new PropertyValue(backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor)))
+ .Add(Visual.Property.BorderlineOffset, new PropertyValue(backgroundExtraData.BorderlineOffset))
+ .Add(ImageVisualProperty.SynchronousLoading, new PropertyValue(backgroundImageSynchronosLoading));
+
+ if (backgroundExtraData.BackgroundImageBorder != null)
+ {
+ map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.NPatch))
+ .Add(NpatchImageVisualProperty.Border, new PropertyValue(backgroundExtraData.BackgroundImageBorder));
+ }
+ else
+ {
+ map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Image));
+ }
+
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
+ }
+
+ private void SetBackgroundImageBorder(Rectangle value)
+ {
+ bool isEmptyValue = Rectangle.IsNullOrZero(value);
+
+ var backgroundImageBorder = isEmptyValue ? null : value;
+
+ (backgroundExtraData ?? (backgroundExtraData = new BackgroundExtraData())).BackgroundImageBorder = backgroundImageBorder;
+
+ if (isEmptyValue)
+ {
+ return;
+ }
+
+ PropertyMap map = Background;
+
+ if (map.Empty())
+ {
+ return;
+ }
+
+ map[NpatchImageVisualProperty.Border] = new PropertyValue(backgroundImageBorder);
+
+ int visualType = 0;
+
+ map.Find(Visual.Property.Type)?.Get(out visualType);
+
+ if (visualType == (int)Visual.Type.Image)
+ {
+ map[Visual.Property.Type] = new PropertyValue((int)Visual.Type.NPatch);
+ }
+
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
+ }
+
+ private void SetBackgroundColor(Color value)
+ {
+ if (value == null)
+ {
+ return;
+ }
+
+ if (backgroundExtraData == null)
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(value));
+ return;
+ }
+
+ PropertyMap map = new PropertyMap();
+
+ map.Add(Visual.Property.Type, new PropertyValue((int)Visual.Type.Color))
+ .Add(ColorVisualProperty.MixColor, new PropertyValue(value))
+ .Add(Visual.Property.CornerRadius, new PropertyValue(new PropertyValue(backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius))))
+ .Add(Visual.Property.CornerRadiusPolicy, new PropertyValue((int)(backgroundExtraData.CornerRadiusPolicy)))
+ .Add(Visual.Property.BorderlineWidth, new PropertyValue(backgroundExtraData.BorderlineWidth))
+ .Add(Visual.Property.BorderlineColor, new PropertyValue(backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor)))
+ .Add(Visual.Property.BorderlineOffset, new PropertyValue(backgroundExtraData.BorderlineOffset));
+
+
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.BACKGROUND, new PropertyValue(map));
+ }
+
+ private void SetColor(Color value)
+ {
+ if (value == null)
+ {
+ return;
+ }
+
+ Interop.ActorInternal.SetColor(SwigCPtr, value.SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+
+ private void SetOpacity(float? value)
+ {
+ if (value == null)
+ {
+ return;
+ }
+
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.OPACITY, new Tizen.NUI.PropertyValue((float)value));
+ }
+
+ private void SetShadow(ShadowBase value)
+ {
+ Tizen.NUI.Object.SetProperty((System.Runtime.InteropServices.HandleRef)SwigCPtr, View.Property.SHADOW, value == null ? new PropertyValue() : value.ToPropertyValue(this));
+ }
}
}