{
/// This will be released at Tizen.NET API Level 6, so currently this would be used as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public class Camera : View
+ public partial class Camera : View
{
internal Camera(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
get
{
+ return GetValue(TypeProperty) as string;
+ }
+ set
+ {
+ SetValue(TypeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private string InternalType
+ {
+ get
+ {
string returnValue = "";
PropertyValue type = GetProperty(Camera.Property.TYPE);
type?.Get(out returnValue);
{
get
{
+ return GetValue(ProjectionModeProperty) as string;
+ }
+ set
+ {
+ SetValue(ProjectionModeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private string InternalProjectionMode
+ {
+ get
+ {
string returnValue = "";
PropertyValue projectionMode = GetProperty(Camera.Property.ProjectionMode);
projectionMode?.Get(out returnValue);
setValue.Dispose();
}
}
+
public float FieldOfView
{
get
{
+ return (float)GetValue(FieldOfViewProperty);
+ }
+ set
+ {
+ SetValue(FieldOfViewProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalFieldOfView
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue fieldView = GetProperty(Camera.Property.FieldOfView);
fieldView?.Get(out returnValue);
setValue.Dispose();
}
}
+
public float AspectRatio
{
get
{
+ return (float)GetValue(AspectRatioProperty);
+ }
+ set
+ {
+ SetValue(AspectRatioProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalAspectRatio
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue aspectRatio = GetProperty(Camera.Property.AspectRatio);
aspectRatio?.Get(out returnValue);
setValue.Dispose();
}
}
+
public float NearPlaneDistance
{
get
{
+ return (float)GetValue(NearPlaneDistanceProperty);
+ }
+ set
+ {
+ SetValue(NearPlaneDistanceProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalNearPlaneDistance
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue nearPlaneDistance = GetProperty(Camera.Property.NearPlaneDistance);
nearPlaneDistance?.Get(out returnValue);
setValue.Dispose();
}
}
+
public float FarPlaneDistance
{
get
{
+ return (float)GetValue(FarPlaneDistanceProperty);
+ }
+ set
+ {
+ SetValue(FarPlaneDistanceProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalFarPlaneDistance
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue farPlaneDistance = GetProperty(Camera.Property.FarPlaneDistance);
farPlaneDistance?.Get(out returnValue);
setValue.Dispose();
}
}
+
public float LeftPlaneDistance
{
get
{
+ return (float)GetValue(LeftPlaneDistanceProperty);
+ }
+ set
+ {
+ SetValue(LeftPlaneDistanceProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalLeftPlaneDistance
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue leftPlaneDistance = GetProperty(Camera.Property.LeftPlaneDistance);
leftPlaneDistance?.Get(out returnValue);
setValue.Dispose();
}
}
+
public float RightPlaneDistance
{
get
{
+ return (float)GetValue(RightPlaneDistanceProperty);
+ }
+ set
+ {
+ SetValue(RightPlaneDistanceProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalRightPlaneDistance
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue rightPlaneDistance = GetProperty(Camera.Property.RightPlaneDistance);
rightPlaneDistance?.Get(out returnValue);
setValue.Dispose();
}
}
+
public float TopPlaneDistance
{
get
{
+ return (float)GetValue(TopPlaneDistanceProperty);
+ }
+ set
+ {
+ SetValue(TopPlaneDistanceProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalTopPlaneDistance
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue topPlaneDistance = GetProperty(Camera.Property.TopPlaneDistance);
topPlaneDistance?.Get(out returnValue);
setValue.Dispose();
}
}
+
public float BottomPlaneDistance
{
get
{
+ return (float)GetValue(BottomPlaneDistanceProperty);
+ }
+ set
+ {
+ SetValue(BottomPlaneDistanceProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalBottomPlaneDistance
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue bottomPlaneDistance = GetProperty(Camera.Property.BottomPlaneDistance);
bottomPlaneDistance?.Get(out returnValue);
setValue.Dispose();
}
}
+
public Vector3 TargetPosition
{
get
{
+ return GetValue(TargetPositionProperty) as Vector3;
+ }
+ set
+ {
+ SetValue(TargetPositionProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private Vector3 InternalTargetPosition
+ {
+ get
+ {
Vector3 returnValue = new Vector3(0.0f, 0.0f, 0.0f);
PropertyValue targetPosition = GetProperty(Camera.Property.TargetPosition);
targetPosition?.Get(returnValue);
return returnValue;
}
}
+
public bool InvertYAxis
{
get
{
+ return (bool)GetValue(InvertYAxisProperty);
+ }
+ set
+ {
+ SetValue(InvertYAxisProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalInvertYAxis
+ {
+ get
+ {
bool returnValue = false;
PropertyValue invertYAxis = GetProperty(Camera.Property.InvertYAxis);
invertYAxis?.Get(out returnValue);
--- /dev/null
+/*
+ * Copyright(c) 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System.ComponentModel;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI
+{
+ public partial class Camera
+ {
+ /// <summary>
+ /// TypeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TypeProperty = BindableProperty.Create(nameof(Type), typeof(string), typeof(Tizen.NUI.Camera), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalType = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalType;
+ });
+
+ /// <summary>
+ /// ProjectionModeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ProjectionModeProperty = BindableProperty.Create(nameof(ProjectionMode), typeof(string), typeof(Tizen.NUI.Camera), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalProjectionMode = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalProjectionMode;
+ });
+
+ /// <summary>
+ /// FieldOfViewProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty FieldOfViewProperty = BindableProperty.Create(nameof(FieldOfView), typeof(float), typeof(Tizen.NUI.Camera), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalFieldOfView = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalFieldOfView;
+ });
+
+ /// <summary>
+ /// AspectRatioProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty AspectRatioProperty = BindableProperty.Create(nameof(AspectRatio), typeof(float), typeof(Tizen.NUI.Camera), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalAspectRatio = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalAspectRatio;
+ });
+
+ /// <summary>
+ /// NearPlaneDistanceProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty NearPlaneDistanceProperty = BindableProperty.Create(nameof(NearPlaneDistance), typeof(float), typeof(Tizen.NUI.Camera), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalNearPlaneDistance = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalNearPlaneDistance;
+ });
+
+ /// <summary>
+ /// FarPlaneDistanceProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty FarPlaneDistanceProperty = BindableProperty.Create(nameof(FarPlaneDistance), typeof(float), typeof(Tizen.NUI.Camera), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalFarPlaneDistance = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalFarPlaneDistance;
+ });
+
+ /// <summary>
+ /// LeftPlaneDistanceProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty LeftPlaneDistanceProperty = BindableProperty.Create(nameof(LeftPlaneDistance), typeof(float), typeof(Tizen.NUI.Camera), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalLeftPlaneDistance = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalLeftPlaneDistance;
+ });
+
+ /// <summary>
+ /// RightPlaneDistanceProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty RightPlaneDistanceProperty = BindableProperty.Create(nameof(RightPlaneDistance), typeof(float), typeof(Tizen.NUI.Camera), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalRightPlaneDistance = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalRightPlaneDistance;
+ });
+
+ /// <summary>
+ /// TopPlaneDistanceProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TopPlaneDistanceProperty = BindableProperty.Create(nameof(TopPlaneDistance), typeof(float), typeof(Tizen.NUI.Camera), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalTopPlaneDistance = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalTopPlaneDistance;
+ });
+
+ /// <summary>
+ /// BottomPlaneDistanceProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BottomPlaneDistanceProperty = BindableProperty.Create(nameof(BottomPlaneDistance), typeof(float), typeof(Tizen.NUI.Camera), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalBottomPlaneDistance = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalBottomPlaneDistance;
+ });
+
+ /// <summary>
+ /// TargetPositionProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TargetPositionProperty = BindableProperty.Create(nameof(TargetPosition), typeof(Tizen.NUI.Vector3), typeof(Tizen.NUI.Camera), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalTargetPosition = (Tizen.NUI.Vector3)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalTargetPosition;
+ });
+
+ /// <summary>
+ /// InvertYAxisProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty InvertYAxisProperty = BindableProperty.Create(nameof(InvertYAxis), typeof(bool), typeof(Tizen.NUI.Camera), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ if (newValue != null)
+ {
+ instance.InternalInvertYAxis = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Camera)bindable;
+ return instance.InternalInvertYAxis;
+ });
+ }
+}
{
/// This will be public opened in next tizen after ACR done. Before ACR, need to be hidden as inhouse API.
[EditorBrowsable(EditorBrowsableState.Never)]
- public class ItemView : Scrollable
+ public partial class ItemView : Scrollable
{
internal ItemView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(cPtr, cMemoryOwn)
{
get
{
+ return GetValue(LayoutProperty) as PropertyArray;
+ }
+ set
+ {
+ SetValue(LayoutProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private Tizen.NUI.PropertyArray InternalLayout
+ {
+ get
+ {
Tizen.NUI.PropertyArray temp = new Tizen.NUI.PropertyArray();
PropertyValue layout = GetProperty(ItemView.Property.LAYOUT);
layout?.Get(temp);
{
get
{
+ return (float)GetValue(MinimumSwipeSpeedProperty);
+ }
+ set
+ {
+ SetValue(MinimumSwipeSpeedProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalMinimumSwipeSpeed
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue minimumSwipeSpeed = GetProperty(ItemView.Property.MinimumSwipeSpeed);
minimumSwipeSpeed?.Get(out returnValue);
{
get
{
+ return (float)GetValue(MinimumSwipeDistanceProperty);
+ }
+ set
+ {
+ SetValue(MinimumSwipeDistanceProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalMinimumSwipeDistance
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue minimumSwipDistance = GetProperty(ItemView.Property.MinimumSwipeDistance);
minimumSwipDistance?.Get(out returnValue);
{
get
{
+ return (float)GetValue(WheelScrollDistanceStepProperty);
+ }
+ set
+ {
+ SetValue(WheelScrollDistanceStepProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalWheelScrollDistanceStep
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue wheelScrollDistanceStep = GetProperty(ItemView.Property.WheelScrollDistanceStep);
wheelScrollDistanceStep?.Get(out returnValue);
{
get
{
+ return (bool)GetValue(SnapToItemEnabledProperty);
+ }
+ set
+ {
+ SetValue(SnapToItemEnabledProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalSnapToItemEnabled
+ {
+ get
+ {
bool returnValue = false;
PropertyValue snapToItemEnabled = GetProperty(ItemView.Property.SnapToItemEnabled);
snapToItemEnabled?.Get(out returnValue);
{
get
{
+ return (float)GetValue(RefreshIntervalProperty);
+ }
+ set
+ {
+ SetValue(RefreshIntervalProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalRefreshInterval
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue refreshIntervalu = GetProperty(ItemView.Property.RefreshInterval);
refreshIntervalu?.Get(out returnValue);
{
get
{
+ return (float)GetValue(LayoutPositionProperty);
+ }
+ set
+ {
+ SetValue(LayoutPositionProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalLayoutPosition
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue layoutPosition = GetProperty(ItemView.Property.LayoutPosition);
layoutPosition?.Get(out returnValue);
{
get
{
+ return (float)GetValue(ScrollSpeedProperty);
+ }
+ set
+ {
+ SetValue(ScrollSpeedProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalScrollSpeed
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue scrollSpeed = GetProperty(ItemView.Property.ScrollSpeed);
scrollSpeed?.Get(out returnValue);
{
get
{
+ return (float)GetValue(OvershootProperty);
+ }
+ set
+ {
+ SetValue(OvershootProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalOvershoot
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue overShoot = GetProperty(ItemView.Property.OVERSHOOT);
overShoot?.Get(out returnValue);
{
get
{
+ return GetValue(ScrollDirectionProperty) as Vector2;
+ }
+ set
+ {
+ SetValue(ScrollDirectionProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private Vector2 InternalScrollDirection
+ {
+ get
+ {
Vector2 returnValue = new Vector2(0.0f, 0.0f);
PropertyValue scrollDirection = GetProperty(ItemView.Property.ScrollDirection);
scrollDirection?.Get(returnValue);
{
get
{
+ return (int)GetValue(LayoutOrientationProperty);
+ }
+ set
+ {
+ SetValue(LayoutOrientationProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalLayoutOrientation
+ {
+ get
+ {
int returnValue = 0;
PropertyValue layoutOrientation = GetProperty(ItemView.Property.LayoutOrientation);
layoutOrientation?.Get(out returnValue);
{
get
{
+ return (float)GetValue(ScrollContentSizeProperty);
+ }
+ set
+ {
+ SetValue(ScrollContentSizeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private float InternalScrollContentSize
+ {
+ get
+ {
float returnValue = 0.0f;
PropertyValue scrollContentSize = GetProperty(ItemView.Property.ScrollContentSize);
scrollContentSize?.Get(out returnValue);
--- /dev/null
+/*
+ * Copyright(c) 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System.ComponentModel;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI
+{
+ public partial class ItemView
+ {
+ /// <summary>
+ /// LayoutProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static new readonly BindableProperty LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(Tizen.NUI.PropertyArray), typeof(Tizen.NUI.ItemView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalLayout = (Tizen.NUI.PropertyArray)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalLayout;
+ });
+
+ /// <summary>
+ /// MinimumSwipeSpeedProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty MinimumSwipeSpeedProperty = BindableProperty.Create(nameof(MinimumSwipeSpeed), typeof(float), typeof(Tizen.NUI.ItemView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalMinimumSwipeSpeed = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalMinimumSwipeSpeed;
+ });
+
+ /// <summary>
+ /// MinimumSwipeDistanceProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty MinimumSwipeDistanceProperty = BindableProperty.Create(nameof(MinimumSwipeDistance), typeof(float), typeof(Tizen.NUI.ItemView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalMinimumSwipeDistance = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalMinimumSwipeDistance;
+ });
+
+ /// <summary>
+ /// WheelScrollDistanceStepProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty WheelScrollDistanceStepProperty = BindableProperty.Create(nameof(WheelScrollDistanceStep), typeof(float), typeof(Tizen.NUI.ItemView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalWheelScrollDistanceStep = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalWheelScrollDistanceStep;
+ });
+
+ /// <summary>
+ /// SnapToItemEnabledProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty SnapToItemEnabledProperty = BindableProperty.Create(nameof(SnapToItemEnabled), typeof(bool), typeof(Tizen.NUI.ItemView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalSnapToItemEnabled = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalSnapToItemEnabled;
+ });
+
+ /// <summary>
+ /// RefreshIntervalProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty RefreshIntervalProperty = BindableProperty.Create(nameof(RefreshInterval), typeof(float), typeof(Tizen.NUI.ItemView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalRefreshInterval = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalRefreshInterval;
+ });
+
+ /// <summary>
+ /// LayoutPositionProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty LayoutPositionProperty = BindableProperty.Create(nameof(LayoutPosition), typeof(float), typeof(Tizen.NUI.ItemView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalLayoutPosition = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalLayoutPosition;
+ });
+
+ /// <summary>
+ /// ScrollSpeedProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ScrollSpeedProperty = BindableProperty.Create(nameof(ScrollSpeed), typeof(float), typeof(Tizen.NUI.ItemView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalScrollSpeed = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalScrollSpeed;
+ });
+
+ /// <summary>
+ /// OvershootProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty OvershootProperty = BindableProperty.Create(nameof(Overshoot), typeof(float), typeof(Tizen.NUI.ItemView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalOvershoot = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalOvershoot;
+ });
+
+ /// <summary>
+ /// ScrollDirectionProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ScrollDirectionProperty = BindableProperty.Create(nameof(ScrollDirection), typeof(Tizen.NUI.Vector2), typeof(Tizen.NUI.ItemView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalScrollDirection = (Tizen.NUI.Vector2)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalScrollDirection;
+ });
+
+ /// <summary>
+ /// LayoutOrientationProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty LayoutOrientationProperty = BindableProperty.Create(nameof(LayoutOrientation), typeof(int), typeof(Tizen.NUI.ItemView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalLayoutOrientation = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalLayoutOrientation;
+ });
+
+ /// <summary>
+ /// ScrollContentSizeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ScrollContentSizeProperty = BindableProperty.Create(nameof(ScrollContentSize), typeof(float), typeof(Tizen.NUI.ItemView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalScrollContentSize = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.ItemView)bindable;
+ return instance.InternalScrollContentSize;
+ });
+ }
+}
/// </summary>
// This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
[EditorBrowsable(EditorBrowsableState.Never)]
- public class AnimatedImageView : ImageView
+ public partial class AnimatedImageView : ImageView
{
#region Constructor, Destructor, Dispose
/// <summary>
{
get
{
+ return GetValue(ResourceUrlProperty) as string;
+ }
+ set
+ {
+ SetValue(ResourceUrlProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private string InternalResourceUrl
+ {
+ get
+ {
return url;
}
set
{
get
{
+ return (int)GetValue(BatchSizeProperty);
+ }
+ set
+ {
+ SetValue(BatchSizeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalBatchSize
+ {
+ get
+ {
return batchSize;
}
set
{
get
{
+ return (int)GetValue(CacheSizeProperty);
+ }
+ set
+ {
+ SetValue(CacheSizeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalCacheSize
+ {
+ get
+ {
return cacheSize;
}
set
{
get
{
+ return (int)GetValue(FrameDelayProperty);
+ }
+ set
+ {
+ SetValue(FrameDelayProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalFrameDelay
+ {
+ get
+ {
return frameDelay;
}
set
{
get
{
+ return (int)GetValue(LoopCountProperty);
+ }
+ set
+ {
+ SetValue(LoopCountProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalLoopCount
+ {
+ get
+ {
return loopCount;
}
set
[EditorBrowsable(EditorBrowsableState.Never)]
public StopBehaviorType StopBehavior
{
+ get
+ {
+ return (StopBehaviorType)GetValue(StopBehaviorProperty);
+ }
+ set
+ {
+ SetValue(StopBehaviorProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private StopBehaviorType InternalStopBehavior
+ {
set
{
stopBehavior = (StopBehaviorType)value;
[EditorBrowsable(EditorBrowsableState.Never)]
public int CurrentFrame
{
+ get
+ {
+ return (int)GetValue(CurrentFrameProperty);
+ }
+ set
+ {
+ SetValue(CurrentFrameProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalCurrentFrame
+ {
set
{
DoAction(ImageView.Property.IMAGE, (int)ActionType.jumpTo, new PropertyValue(value));
--- /dev/null
+/*
+ * Copyright(c) 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System.ComponentModel;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.BaseComponents
+{
+ public partial class AnimatedImageView
+ {
+ /// <summary>
+ /// ResourceUrlProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static new readonly BindableProperty ResourceUrlProperty = BindableProperty.Create(nameof(ResourceUrl), typeof(string), typeof(Tizen.NUI.BaseComponents.AnimatedImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalResourceUrl = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ return instance.InternalResourceUrl;
+ });
+
+ /// <summary>
+ /// BatchSizeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BatchSizeProperty = BindableProperty.Create(nameof(BatchSize), typeof(int), typeof(Tizen.NUI.BaseComponents.AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalBatchSize = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ return instance.InternalBatchSize;
+ });
+
+ /// <summary>
+ /// CacheSizeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty CacheSizeProperty = BindableProperty.Create(nameof(CacheSize), typeof(int), typeof(Tizen.NUI.BaseComponents.AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalCacheSize = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ return instance.InternalCacheSize;
+ });
+
+ /// <summary>
+ /// FrameDelayProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty FrameDelayProperty = BindableProperty.Create(nameof(FrameDelay), typeof(int), typeof(Tizen.NUI.BaseComponents.AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalFrameDelay = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ return instance.InternalFrameDelay;
+ });
+
+ /// <summary>
+ /// LoopCountProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty LoopCountProperty = BindableProperty.Create(nameof(LoopCount), typeof(int), typeof(Tizen.NUI.BaseComponents.AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalLoopCount = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ return instance.InternalLoopCount;
+ });
+
+ /// <summary>
+ /// StopBehaviorProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty StopBehaviorProperty = BindableProperty.Create(nameof(StopBehavior), typeof(Tizen.NUI.BaseComponents.AnimatedImageView.StopBehaviorType), typeof(Tizen.NUI.BaseComponents.AnimatedImageView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalStopBehavior = (Tizen.NUI.BaseComponents.AnimatedImageView.StopBehaviorType)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ return instance.InternalStopBehavior;
+ });
+
+ /// <summary>
+ /// CurrentFrameProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty CurrentFrameProperty = BindableProperty.Create(nameof(CurrentFrame), typeof(int), typeof(Tizen.NUI.BaseComponents.AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalCurrentFrame = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
+ return instance.InternalCurrentFrame;
+ });
+ }
+}
/// AnimatedVectorImageView is a class for displaying a vector resource.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public class AnimatedVectorImageView : LottieAnimationView
+ public partial class AnimatedVectorImageView : LottieAnimationView
{
#region Constructor, Destructor, Dispose
/// <summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public string ResourceURL
{
+ get
+ {
+ return GetValue(ResourceURLProperty) as string;
+ }
+ set
+ {
+ SetValue(ResourceURLProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private string InternalResourceURL
+ {
set
{
tlog.Fatal(tag, $"[AnimatedVectorImageView START[ [{GetId()}] ResourceURL SET");
[EditorBrowsable(EditorBrowsableState.Never)]
public new string ResourceUrl
{
+ get
+ {
+ return GetValue(ResourceUrlProperty) as string;
+ }
+ set
+ {
+ SetValue(ResourceUrlProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private string InternalResourceUrl
+ {
set
{
tlog.Fatal(tag, $"[AnimatedVectorImageView START[ [{GetId()}] ResourceUrl SET");
[EditorBrowsable(EditorBrowsableState.Never)]
public int RepeatCount
{
+ get
+ {
+ return (int)GetValue(RepeatCountProperty);
+ }
+ set
+ {
+ SetValue(RepeatCountProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalRepeatCount
+ {
set
{
tlog.Fatal(tag, $"[AnimatedVectorImageView START[ [{GetId()}] RepeatCount SET");
[EditorBrowsable(EditorBrowsableState.Never)]
public new int CurrentFrame
{
+ get
+ {
+ return (int)GetValue(CurrentFrameProperty);
+ }
+ set
+ {
+ SetValue(CurrentFrameProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalCurrentFrame
+ {
set
{
tlog.Fatal(tag, $"[AnimatedVectorImageView START[ [{GetId()}] CurrentFrame SET");
[EditorBrowsable(EditorBrowsableState.Never)]
public RepeatModes RepeatMode
{
+ get
+ {
+ return (RepeatModes)GetValue(RepeatModeProperty);
+ }
+ set
+ {
+ SetValue(RepeatModeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private RepeatModes InternalRepeatMode
+ {
set
{
tlog.Fatal(tag, $"[AnimatedVectorImageView START[ [{GetId()}] RepeatMode SET");
--- /dev/null
+/*
+ * Copyright(c) 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System.ComponentModel;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.BaseComponents
+{
+ public partial class AnimatedVectorImageView
+ {
+ /// <summary>
+ /// ResourceURLProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ResourceURLProperty = BindableProperty.Create(nameof(ResourceURL), typeof(string), typeof(Tizen.NUI.BaseComponents.AnimatedVectorImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalResourceURL = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
+ return instance.InternalResourceURL;
+ });
+
+ /// <summary>
+ /// ResourceUrlProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static new readonly BindableProperty ResourceUrlProperty = BindableProperty.Create(nameof(ResourceUrl), typeof(string), typeof(Tizen.NUI.BaseComponents.AnimatedVectorImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalResourceUrl = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
+ return instance.InternalResourceUrl;
+ });
+
+ /// <summary>
+ /// RepeatCountProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty RepeatCountProperty = BindableProperty.Create(nameof(RepeatCount), typeof(int), typeof(Tizen.NUI.BaseComponents.AnimatedVectorImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalRepeatCount = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
+ return instance.InternalRepeatCount;
+ });
+
+ /// <summary>
+ /// CurrentFrameProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static new readonly BindableProperty CurrentFrameProperty = BindableProperty.Create(nameof(CurrentFrame), typeof(int), typeof(Tizen.NUI.BaseComponents.AnimatedVectorImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalCurrentFrame = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
+ return instance.InternalCurrentFrame;
+ });
+
+ /// <summary>
+ /// RepeatModeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty RepeatModeProperty = BindableProperty.Create(nameof(RepeatMode), typeof(Tizen.NUI.BaseComponents.AnimatedVectorImageView.RepeatModes), typeof(Tizen.NUI.BaseComponents.AnimatedVectorImageView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalRepeatMode = (Tizen.NUI.BaseComponents.AnimatedVectorImageView.RepeatModes)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
+ return instance.InternalRepeatMode;
+ });
+ }
+}
/// An instance of ImageView can be created using a URL or an image instance.<br />
/// </summary>
/// <since_tizen> 3 </since_tizen>
- public class ImageView : View
+ public partial class ImageView : View
{
static ImageView() { }
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ResourceUrlProperty = BindableProperty.Create(nameof(ImageView.ResourceUrl), typeof(string), typeof(ImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var imageView = (ImageView)bindable;
-
- if (newValue is Selector<string> selector)
- {
- imageView.ResourceUrlSelector = selector;
- }
- else
- {
- imageView.resourceUrlSelector?.Reset(imageView);
- imageView.SetResourceUrl((string)newValue);
- }
- },
- defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
- {
- var imageView = (ImageView)bindable;
- string ret = "";
-
- PropertyMap imageMap = new PropertyMap();
- Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.IMAGE).Get(imageMap);
- imageMap.Find(ImageVisualProperty.URL)?.Get(out ret);
- return ret;
- }));
-
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ImageProperty = BindableProperty.Create(nameof(ImageView.Image), typeof(PropertyMap), typeof(ImageView), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
- {
- var imageView = (ImageView)bindable;
- if (newValue != null)
- {
- PropertyMap map = (PropertyMap)newValue;
- if (imageView.IsCreateByXaml)
- {
- string url = "", alphaMaskURL = "", auxiliaryImageURL = "";
- string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
- PropertyValue urlValue = map.Find(NDalic.ImageVisualUrl);
- bool ret = false;
- if (urlValue != null) ret = urlValue.Get(out url);
- PropertyMap mmap = new PropertyMap();
- if (ret && url.StartsWith("*Resource*"))
- {
- url = url.Replace("*Resource*", resource);
- mmap.Insert(NDalic.ImageVisualUrl, new PropertyValue(url));
- }
-
- ret = false;
- PropertyValue alphaMaskUrlValue = map.Find(NDalic.ImageVisualAlphaMaskUrl);
- if (alphaMaskUrlValue != null) ret = alphaMaskUrlValue.Get(out alphaMaskURL);
- if (ret && alphaMaskURL.StartsWith("*Resource*"))
- {
- alphaMaskURL = alphaMaskURL.Replace("*Resource*", resource);
- mmap.Insert(NDalic.ImageVisualUrl, new PropertyValue(alphaMaskURL));
- }
-
- ret = false;
- PropertyValue auxiliaryImageURLValue = map.Find(NDalic.ImageVisualAuxiliaryImageUrl);
- if (auxiliaryImageURLValue != null) ret = auxiliaryImageURLValue.Get(out auxiliaryImageURL);
- if (ret && auxiliaryImageURL.StartsWith("*Resource*"))
- {
- auxiliaryImageURL = auxiliaryImageURL.Replace("*Resource*", resource);
- mmap.Insert(NDalic.ImageVisualAuxiliaryImageUrl, new PropertyValue(auxiliaryImageURL));
- }
-
- map.Merge(mmap);
- }
- if (imageView._border == null)
- {
- Tizen.NUI.Object.SetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.IMAGE, new Tizen.NUI.PropertyValue(map));
- }
- }
- }),
- defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
- {
- var imageView = (ImageView)bindable;
- if (imageView._border == null)
- {
- PropertyMap temp = new PropertyMap();
- Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.IMAGE).Get(temp);
- return temp;
- }
- else
- {
- return null;
- }
- }));
-
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PreMultipliedAlphaProperty = BindableProperty.Create(nameof(PreMultipliedAlpha), typeof(bool), typeof(ImageView), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
- {
- var imageView = (ImageView)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.PreMultipliedAlpha, new Tizen.NUI.PropertyValue((bool)newValue));
- }
- }),
- defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
- {
- var imageView = (ImageView)bindable;
- bool temp = false;
- Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.PreMultipliedAlpha).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.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty PixelAreaProperty = BindableProperty.Create(nameof(PixelArea), typeof(RelativeVector4), typeof(ImageView), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
- {
- var imageView = (ImageView)bindable;
- if (newValue != null)
- {
- Tizen.NUI.Object.SetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.PixelArea, new Tizen.NUI.PropertyValue((RelativeVector4)newValue));
- }
- }),
- defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
- {
- var imageView = (ImageView)bindable;
- Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
- Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.PixelArea).Get(temp);
- RelativeVector4 relativeTemp = new RelativeVector4(temp.X, temp.Y, temp.Z, temp.W);
- return relativeTemp;
- }));
-
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty BorderProperty = BindableProperty.Create(nameof(Border), typeof(Rectangle), typeof(ImageView), null, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var imageView = (ImageView)bindable;
- imageView.borderSelector?.Reset(imageView);
-
- if (newValue is Selector<Rectangle> selector)
- {
- if (selector.HasAll()) imageView.SetBorder(selector.All);
- else imageView.borderSelector = new TriggerableSelector<Rectangle>(imageView, selector, imageView.SetBorder, true);
- }
- else
- {
- imageView.SetBorder((Rectangle)newValue);
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var imageView = (ImageView)bindable;
- return imageView._border;
- });
-
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty BorderOnlyProperty = BindableProperty.Create(nameof(BorderOnly), typeof(bool), typeof(ImageView), false, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var imageView = (ImageView)bindable;
- if (newValue != null)
- {
- imageView.UpdateImage(NpatchImageVisualProperty.BorderOnly, new PropertyValue((bool)newValue));
- }
- },
- defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
- {
- var imageView = (ImageView)bindable;
- bool ret = false;
- PropertyMap imageMap = new PropertyMap();
- Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.IMAGE).Get(imageMap);
- imageMap.Find(ImageVisualProperty.BorderOnly)?.Get(out ret);
- return ret;
- }));
-
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SynchronosLoadingProperty = BindableProperty.Create(nameof(SynchronousLoading), typeof(bool), typeof(ImageView), false, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var imageView = (ImageView)bindable;
- if (newValue != null)
- {
- imageView._synchronousLoading = (bool)newValue;
- imageView.UpdateImage(NpatchImageVisualProperty.SynchronousLoading, new PropertyValue((bool)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var imageView = (ImageView)bindable;
- return imageView._synchronousLoading;
- });
-
- /// This will be public opened in tizen_7.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty SynchronousLoadingProperty = BindableProperty.Create(nameof(SynchronousLoading), typeof(bool), typeof(ImageView), false, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var imageView = (ImageView)bindable;
- if (newValue != null)
- {
- imageView._synchronousLoading = (bool)newValue;
- imageView.UpdateImage(NpatchImageVisualProperty.SynchronousLoading, new PropertyValue((bool)newValue));
- }
- },
- defaultValueCreator: (bindable) =>
- {
- var imageView = (ImageView)bindable;
- return imageView._synchronousLoading;
- });
-
- /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.
- [EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty OrientationCorrectionProperty = BindableProperty.Create(nameof(OrientationCorrection), typeof(bool), typeof(ImageView), false, propertyChanged: (bindable, oldValue, newValue) =>
- {
- var imageView = (ImageView)bindable;
- if (newValue != null)
- {
- imageView.UpdateImage(ImageVisualProperty.OrientationCorrection, new PropertyValue((bool)newValue));
- }
- },
- defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
- {
- var imageView = (ImageView)bindable;
-
- bool ret = false;
- PropertyMap imageMap = new PropertyMap();
- Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.IMAGE).Get(imageMap);
- imageMap?.Find(ImageVisualProperty.OrientationCorrection)?.Get(out ret);
-
- return ret;
- }));
-
private EventHandler<ResourceReadyEventArgs> _resourceReadyEventHandler;
private ResourceReadyEventCallbackType _resourceReadyEventCallback;
private EventHandler<ResourceLoadedEventArgs> _resourceLoadedEventHandler;
{
get
{
+ return GetValue(ImageMapProperty) as PropertyMap;
+ }
+ set
+ {
+ SetValue(ImageMapProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+ private PropertyMap InternalImageMap
+ {
+ get
+ {
if (_border == null)
{
PropertyMap returnValue = new PropertyMap();
{
get
{
+ return GetValue(AlphaMaskURLProperty) as string;
+ }
+ set
+ {
+ SetValue(AlphaMaskURLProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private string InternalAlphaMaskURL
+ {
+ get
+ {
string ret = "";
PropertyMap imageMap = new PropertyMap();
PropertyValue image = Tizen.NUI.Object.GetProperty(SwigCPtr, ImageView.Property.IMAGE);
{
get
{
+ return (bool)GetValue(CropToMaskProperty);
+ }
+ set
+ {
+ SetValue(CropToMaskProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+ private bool InternalCropToMask
+ {
+ get
+ {
bool ret = false;
PropertyMap imageMap = new PropertyMap();
PropertyValue image = Tizen.NUI.Object.GetProperty(SwigCPtr, ImageView.Property.IMAGE);
{
get
{
+ return (FittingModeType)GetValue(FittingModeProperty);
+ }
+ set
+ {
+ SetValue(FittingModeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private FittingModeType InternalFittingMode
+ {
+ get
+ {
int ret = (int)_fittingMode;
PropertyMap imageMap = new PropertyMap();
PropertyValue image = Tizen.NUI.Object.GetProperty(SwigCPtr, ImageView.Property.IMAGE);
{
get
{
+ return (int)GetValue(DesiredWidthProperty);
+ }
+ set
+ {
+ SetValue(DesiredWidthProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+ private int InternalDesiredWidth
+ {
+ get
+ {
PropertyMap imageMap = new PropertyMap();
PropertyValue image = Tizen.NUI.Object.GetProperty(SwigCPtr, ImageView.Property.IMAGE);
image?.Get(imageMap);
{
get
{
+ return (int)GetValue(DesiredHeightProperty);
+ }
+ set
+ {
+ SetValue(DesiredHeightProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+ private int InternalDesiredHeight
+ {
+ get
+ {
PropertyMap imageMap = new PropertyMap();
PropertyValue image = Tizen.NUI.Object.GetProperty(SwigCPtr, ImageView.Property.IMAGE);
image?.Get(imageMap);
{
get
{
+ return (ReleasePolicyType)GetValue(ReleasePolicyProperty);
+ }
+ set
+ {
+ SetValue(ReleasePolicyProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private ReleasePolicyType InternalReleasePolicy
+ {
+ get
+ {
int ret = (int)ReleasePolicyType.Detached;
PropertyMap imageMap = new PropertyMap();
PropertyValue image = Tizen.NUI.Object.GetProperty(SwigCPtr, ImageView.Property.IMAGE);
{
get
{
+ return (WrapModeType)GetValue(WrapModeUProperty);
+ }
+ set
+ {
+ SetValue(WrapModeUProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private WrapModeType InternalWrapModeU
+ {
+ get
+ {
int ret = (int)WrapModeType.Default;
PropertyMap imageMap = new PropertyMap();
PropertyValue image = Tizen.NUI.Object.GetProperty(SwigCPtr, ImageView.Property.IMAGE);
{
get
{
+ return (WrapModeType)GetValue(WrapModeVProperty);
+ }
+ set
+ {
+ SetValue(WrapModeVProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private WrapModeType InternalWrapModeV
+ {
+ get
+ {
int ret = (int)WrapModeType.Default;
PropertyMap imageMap = new PropertyMap();
PropertyValue image = Tizen.NUI.Object.GetProperty(SwigCPtr, ImageView.Property.IMAGE);
/// AdjustViewSize works only if ImageView is added to a View having Layout.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public bool AdjustViewSize { get; set; } = false;
+ public bool AdjustViewSize
+ {
+ get
+ {
+ return (bool)GetValue(AdjustViewSizeProperty);
+ }
+ set
+ {
+ SetValue(AdjustViewSizeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+ private bool adjustViewSize = false;
internal Selector<string> ResourceUrlSelector
{
--- /dev/null
+/*
+ * Copyright(c) 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System.ComponentModel;
+using System.Runtime.InteropServices;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.BaseComponents
+{
+ public partial class ImageView
+ {
+ /// Intenal used, will never be opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ResourceUrlProperty = BindableProperty.Create(nameof(ImageView.ResourceUrl), typeof(string), typeof(ImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var imageView = (ImageView)bindable;
+
+ if (newValue is Selector<string> selector)
+ {
+ imageView.ResourceUrlSelector = selector;
+ }
+ else
+ {
+ imageView.resourceUrlSelector?.Reset(imageView);
+ imageView.SetResourceUrl((string)newValue);
+ }
+ },
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var imageView = (ImageView)bindable;
+ string ret = "";
+
+ PropertyMap imageMap = new PropertyMap();
+ Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.IMAGE).Get(imageMap);
+ imageMap.Find(ImageVisualProperty.URL)?.Get(out ret);
+ return ret;
+ }));
+
+ /// Intenal used, will never be opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ImageProperty = BindableProperty.Create(nameof(ImageView.Image), typeof(PropertyMap), typeof(ImageView), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var imageView = (ImageView)bindable;
+ if (newValue != null)
+ {
+ PropertyMap map = (PropertyMap)newValue;
+ if (imageView.IsCreateByXaml)
+ {
+ string url = "", alphaMaskURL = "", auxiliaryImageURL = "";
+ string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
+ PropertyValue urlValue = map.Find(NDalic.ImageVisualUrl);
+ bool ret = false;
+ if (urlValue != null) ret = urlValue.Get(out url);
+ PropertyMap mmap = new PropertyMap();
+ if (ret && url.StartsWith("*Resource*"))
+ {
+ url = url.Replace("*Resource*", resource);
+ mmap.Insert(NDalic.ImageVisualUrl, new PropertyValue(url));
+ }
+
+ ret = false;
+ PropertyValue alphaMaskUrlValue = map.Find(NDalic.ImageVisualAlphaMaskUrl);
+ if (alphaMaskUrlValue != null) ret = alphaMaskUrlValue.Get(out alphaMaskURL);
+ if (ret && alphaMaskURL.StartsWith("*Resource*"))
+ {
+ alphaMaskURL = alphaMaskURL.Replace("*Resource*", resource);
+ mmap.Insert(NDalic.ImageVisualUrl, new PropertyValue(alphaMaskURL));
+ }
+
+ ret = false;
+ PropertyValue auxiliaryImageURLValue = map.Find(NDalic.ImageVisualAuxiliaryImageUrl);
+ if (auxiliaryImageURLValue != null) ret = auxiliaryImageURLValue.Get(out auxiliaryImageURL);
+ if (ret && auxiliaryImageURL.StartsWith("*Resource*"))
+ {
+ auxiliaryImageURL = auxiliaryImageURL.Replace("*Resource*", resource);
+ mmap.Insert(NDalic.ImageVisualAuxiliaryImageUrl, new PropertyValue(auxiliaryImageURL));
+ }
+
+ map.Merge(mmap);
+ }
+ if (imageView._border == null)
+ {
+ Tizen.NUI.Object.SetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.IMAGE, new Tizen.NUI.PropertyValue(map));
+ }
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var imageView = (ImageView)bindable;
+ if (imageView._border == null)
+ {
+ PropertyMap temp = new PropertyMap();
+ Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.IMAGE).Get(temp);
+ return temp;
+ }
+ else
+ {
+ return null;
+ }
+ }));
+
+ /// Intenal used, will never be opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty PreMultipliedAlphaProperty = BindableProperty.Create(nameof(PreMultipliedAlpha), typeof(bool), typeof(ImageView), false, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var imageView = (ImageView)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.PreMultipliedAlpha, new Tizen.NUI.PropertyValue((bool)newValue));
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var imageView = (ImageView)bindable;
+ bool temp = false;
+ Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.PreMultipliedAlpha).Get(out temp);
+ return temp;
+ }));
+
+ /// Intenal used, will never be opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty PixelAreaProperty = BindableProperty.Create(nameof(PixelArea), typeof(RelativeVector4), typeof(ImageView), null, propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ {
+ var imageView = (ImageView)bindable;
+ if (newValue != null)
+ {
+ Tizen.NUI.Object.SetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.PixelArea, new Tizen.NUI.PropertyValue((RelativeVector4)newValue));
+ }
+ }),
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var imageView = (ImageView)bindable;
+ Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
+ Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.PixelArea).Get(temp);
+ RelativeVector4 relativeTemp = new RelativeVector4(temp.X, temp.Y, temp.Z, temp.W);
+ return relativeTemp;
+ }));
+
+ /// Intenal used, will never be opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BorderProperty = BindableProperty.Create(nameof(Border), typeof(Rectangle), typeof(ImageView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var imageView = (ImageView)bindable;
+ imageView.borderSelector?.Reset(imageView);
+
+ if (newValue is Selector<Rectangle> selector)
+ {
+ if (selector.HasAll()) imageView.SetBorder(selector.All);
+ else imageView.borderSelector = new TriggerableSelector<Rectangle>(imageView, selector, imageView.SetBorder, true);
+ }
+ else
+ {
+ imageView.SetBorder((Rectangle)newValue);
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var imageView = (ImageView)bindable;
+ return imageView._border;
+ });
+
+ /// Intenal used, will never be opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BorderOnlyProperty = BindableProperty.Create(nameof(BorderOnly), typeof(bool), typeof(ImageView), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var imageView = (ImageView)bindable;
+ if (newValue != null)
+ {
+ imageView.UpdateImage(NpatchImageVisualProperty.BorderOnly, new PropertyValue((bool)newValue));
+ }
+ },
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var imageView = (ImageView)bindable;
+ bool ret = false;
+ PropertyMap imageMap = new PropertyMap();
+ Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.IMAGE).Get(imageMap);
+ imageMap.Find(ImageVisualProperty.BorderOnly)?.Get(out ret);
+ return ret;
+ }));
+
+ /// Intenal used, will never be opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty SynchronosLoadingProperty = BindableProperty.Create(nameof(SynchronousLoading), typeof(bool), typeof(ImageView), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var imageView = (ImageView)bindable;
+ if (newValue != null)
+ {
+ imageView._synchronousLoading = (bool)newValue;
+ imageView.UpdateImage(NpatchImageVisualProperty.SynchronousLoading, new PropertyValue((bool)newValue));
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var imageView = (ImageView)bindable;
+ return imageView._synchronousLoading;
+ });
+
+ /// This will be public opened in tizen_7.0 after ACR done. Before ACR, need to be hidden as inhouse API.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty SynchronousLoadingProperty = BindableProperty.Create(nameof(SynchronousLoading), typeof(bool), typeof(ImageView), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var imageView = (ImageView)bindable;
+ if (newValue != null)
+ {
+ imageView._synchronousLoading = (bool)newValue;
+ imageView.UpdateImage(NpatchImageVisualProperty.SynchronousLoading, new PropertyValue((bool)newValue));
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var imageView = (ImageView)bindable;
+ return imageView._synchronousLoading;
+ });
+
+ /// Intenal used, will never be opened.
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty OrientationCorrectionProperty = BindableProperty.Create(nameof(OrientationCorrection), typeof(bool), typeof(ImageView), false, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var imageView = (ImageView)bindable;
+ if (newValue != null)
+ {
+ imageView.UpdateImage(ImageVisualProperty.OrientationCorrection, new PropertyValue((bool)newValue));
+ }
+ },
+ defaultValueCreator: (BindableProperty.CreateDefaultValueDelegate)((bindable) =>
+ {
+ var imageView = (ImageView)bindable;
+
+ bool ret = false;
+ PropertyMap imageMap = new PropertyMap();
+ Tizen.NUI.Object.GetProperty((HandleRef)imageView.SwigCPtr, ImageView.Property.IMAGE).Get(imageMap);
+ imageMap?.Find(ImageVisualProperty.OrientationCorrection)?.Get(out ret);
+
+ return ret;
+ }));
+
+ /// <summary>
+ /// ImageMapProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ImageMapProperty = BindableProperty.Create(nameof(ImageMap), typeof(Tizen.NUI.PropertyMap), typeof(Tizen.NUI.BaseComponents.ImageView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalImageMap = (Tizen.NUI.PropertyMap)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return instance.InternalImageMap;
+ });
+
+ /// <summary>
+ /// AlphaMaskURLProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty AlphaMaskURLProperty = BindableProperty.Create(nameof(AlphaMaskURL), typeof(string), typeof(Tizen.NUI.BaseComponents.ImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalAlphaMaskURL = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return instance.InternalAlphaMaskURL;
+ });
+
+ /// <summary>
+ /// CropToMaskProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty CropToMaskProperty = BindableProperty.Create(nameof(CropToMask), typeof(bool), typeof(Tizen.NUI.BaseComponents.ImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalCropToMask = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return instance.InternalCropToMask;
+ });
+
+ /// <summary>
+ /// FittingModeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty FittingModeProperty = BindableProperty.Create(nameof(FittingMode), typeof(Tizen.NUI.FittingModeType), typeof(Tizen.NUI.BaseComponents.ImageView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalFittingMode = (Tizen.NUI.FittingModeType)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return instance.InternalFittingMode;
+ });
+
+ /// <summary>
+ /// DesiredWidthProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty DesiredWidthProperty = BindableProperty.Create(nameof(DesiredWidth), typeof(int), typeof(Tizen.NUI.BaseComponents.ImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalDesiredWidth = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return instance.InternalDesiredWidth;
+ });
+
+ /// <summary>
+ /// DesiredHeightProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty DesiredHeightProperty = BindableProperty.Create(nameof(DesiredHeight), typeof(int), typeof(Tizen.NUI.BaseComponents.ImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalDesiredHeight = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return instance.InternalDesiredHeight;
+ });
+
+ /// <summary>
+ /// ReleasePolicyProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ReleasePolicyProperty = BindableProperty.Create(nameof(ReleasePolicy), typeof(Tizen.NUI.ReleasePolicyType), typeof(Tizen.NUI.BaseComponents.ImageView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalReleasePolicy = (Tizen.NUI.ReleasePolicyType)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return instance.InternalReleasePolicy;
+ });
+
+ /// <summary>
+ /// WrapModeUProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty WrapModeUProperty = BindableProperty.Create(nameof(WrapModeU), typeof(Tizen.NUI.WrapModeType), typeof(Tizen.NUI.BaseComponents.ImageView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalWrapModeU = (Tizen.NUI.WrapModeType)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return instance.InternalWrapModeU;
+ });
+
+ /// <summary>
+ /// WrapModeVProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty WrapModeVProperty = BindableProperty.Create(nameof(WrapModeV), typeof(Tizen.NUI.WrapModeType), typeof(Tizen.NUI.BaseComponents.ImageView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalWrapModeV = (Tizen.NUI.WrapModeType)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return instance.InternalWrapModeV;
+ });
+
+ /// <summary>
+ /// AdjustViewSizeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty AdjustViewSizeProperty = BindableProperty.Create(nameof(AdjustViewSize), typeof(bool), typeof(Tizen.NUI.BaseComponents.ImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ if (newValue != null)
+ {
+ instance.adjustViewSize = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.ImageView)bindable;
+ return instance.adjustViewSize;
+ });
+ }
+}
/// LottieAnimationView renders an animated vector image (Lottie file).
/// </summary>
/// <since_tizen> 7 </since_tizen>
- public class LottieAnimationView : ImageView
+ public partial class LottieAnimationView : ImageView
{
#region Constructor, Destructor, Dispose
/// <summary>
/// <since_tizen> 7 </since_tizen>
public string URL
{
+ get
+ {
+ return GetValue(URLProperty) as string;
+ }
+ set
+ {
+ SetValue(URLProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private string InternalURL
+ {
set
{
string ret = (value == null ? "" : value);
/// <since_tizen> 7 </since_tizen>
public int CurrentFrame
{
+ get
+ {
+ return (int)GetValue(CurrentFrameProperty);
+ }
+ set
+ {
+ SetValue(CurrentFrameProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalCurrentFrame
+ {
set
{
currentStates.frame = value;
/// <since_tizen> 7 </since_tizen>
public LoopingModeType LoopingMode
{
+ get
+ {
+ return (LoopingModeType)GetValue(LoopingModeProperty);
+ }
+ set
+ {
+ SetValue(LoopingModeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private LoopingModeType InternalLoopingMode
+ {
set
{
currentStates.loopMode = (LoopingModeType)value;
/// <since_tizen> 7 </since_tizen>
public int LoopCount
{
+ get
+ {
+ return (int)GetValue(LoopCountProperty);
+ }
+ set
+ {
+ SetValue(LoopCountProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalLoopCount
+ {
set
{
currentStates.changed = true;
/// <since_tizen> 7 </since_tizen>
public StopBehaviorType StopBehavior
{
+ get
+ {
+ return (StopBehaviorType)GetValue(StopBehaviorProperty);
+ }
+ set
+ {
+ SetValue(StopBehaviorProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private StopBehaviorType InternalStopBehavior
+ {
set
{
currentStates.stopEndAction = (StopBehaviorType)value;
[EditorBrowsable(EditorBrowsableState.Never)]
public bool RedrawInScalingDown
{
+ get
+ {
+ return (bool)GetValue(RedrawInScalingDownProperty);
+ }
+ set
+ {
+ SetValue(RedrawInScalingDownProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalRedrawInScalingDown
+ {
set
{
currentStates.changed = true;
--- /dev/null
+/*
+ * Copyright(c) 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System.ComponentModel;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.BaseComponents
+{
+ public partial class LottieAnimationView
+ {
+ /// <summary>
+ /// URLProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty URLProperty = BindableProperty.Create(nameof(URL), typeof(string), typeof(Tizen.NUI.BaseComponents.LottieAnimationView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalURL = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ return instance.InternalURL;
+ });
+
+ /// <summary>
+ /// CurrentFrameProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty CurrentFrameProperty = BindableProperty.Create(nameof(CurrentFrame), typeof(int), typeof(Tizen.NUI.BaseComponents.LottieAnimationView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalCurrentFrame = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ return instance.InternalCurrentFrame;
+ });
+
+ /// <summary>
+ /// LoopingModeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty LoopingModeProperty = BindableProperty.Create(nameof(LoopingMode), typeof(Tizen.NUI.BaseComponents.LottieAnimationView.LoopingModeType), typeof(Tizen.NUI.BaseComponents.LottieAnimationView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalLoopingMode = (Tizen.NUI.BaseComponents.LottieAnimationView.LoopingModeType)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ return instance.InternalLoopingMode;
+ });
+
+ /// <summary>
+ /// LoopCountProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty LoopCountProperty = BindableProperty.Create(nameof(LoopCount), typeof(int), typeof(Tizen.NUI.BaseComponents.LottieAnimationView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalLoopCount = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ return instance.InternalLoopCount;
+ });
+
+ /// <summary>
+ /// StopBehaviorProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty StopBehaviorProperty = BindableProperty.Create(nameof(StopBehavior), typeof(Tizen.NUI.BaseComponents.LottieAnimationView.StopBehaviorType), typeof(Tizen.NUI.BaseComponents.LottieAnimationView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalStopBehavior = (Tizen.NUI.BaseComponents.LottieAnimationView.StopBehaviorType)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ return instance.InternalStopBehavior;
+ });
+
+ /// <summary>
+ /// RedrawInScalingDownProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty RedrawInScalingDownProperty = BindableProperty.Create(nameof(RedrawInScalingDown), typeof(bool), typeof(Tizen.NUI.BaseComponents.LottieAnimationView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalRedrawInScalingDown = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.LottieAnimationView)bindable;
+ return instance.InternalRedrawInScalingDown;
+ });
+ }
+}
{
get
{
+ return GetValue(TranslatableTextProperty) as string;
+ }
+ set
+ {
+ SetValue(TranslatableTextProperty, value);
+ }
+ }
+
+ private string InternalTranslatableText
+ {
+ get
+ {
return textEditorTextSid;
}
set
{
get
{
+ return GetValue(TranslatablePlaceholderTextProperty) as string;
+ }
+ set
+ {
+ SetValue(TranslatablePlaceholderTextProperty, value);
+ }
+ }
+
+ private string InternalTranslatablePlaceholderText
+ {
+ get
+ {
return textEditorPlaceHolderTextSid;
}
set
{
get
{
+ return (bool)GetValue(EnableEditingProperty);
+ }
+ set
+ {
+ SetValue(EnableEditingProperty, value);
+ }
+ }
+
+ private bool InternalEnableEditing
+ {
+ get
+ {
bool temp;
GetProperty(TextEditor.Property.EnableEditing).Get(out temp);
return temp;
{
get
{
+ return (int)GetValue(HorizontalScrollPositionProperty);
+ }
+ set
+ {
+ SetValue(HorizontalScrollPositionProperty, value);
+ }
+ }
+
+ private int InternalHorizontalScrollPosition
+ {
+ get
+ {
int temp;
using (PropertyValue propertyValue = GetProperty(TextEditor.Property.HorizontalScrollPosition))
{
{
get
{
+ return (int)GetValue(VerticalScrollPositionProperty);
+ }
+ set
+ {
+ SetValue(VerticalScrollPositionProperty, value);
+ }
+ }
+
+ private int InternalVerticalScrollPosition
+ {
+ get
+ {
int temp;
using (PropertyValue propertyValue = GetProperty(TextEditor.Property.VerticalScrollPosition))
{
{
get
{
+ return (int)GetValue(PrimaryCursorPositionProperty);
+ }
+ set
+ {
+ SetValue(PrimaryCursorPositionProperty, value);
+ }
+ }
+
+ private int InternalPrimaryCursorPosition
+ {
+ get
+ {
int temp;
using (PropertyValue propertyValue = GetProperty(TextEditor.Property.PrimaryCursorPosition))
{
Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textEditor.SwigCPtr, TextEditor.Property.MinLineSize).Get(out temp);
return temp;
}));
+
+ /// <summary>
+ /// TranslatableTextProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TranslatableTextProperty = BindableProperty.Create(nameof(TranslatableText), typeof(string), typeof(Tizen.NUI.BaseComponents.TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ if (newValue != null)
+ {
+ instance.InternalTranslatableText = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ return instance.InternalTranslatableText;
+ });
+
+ /// <summary>
+ /// TranslatablePlaceholderTextProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TranslatablePlaceholderTextProperty = BindableProperty.Create(nameof(TranslatablePlaceholderText), typeof(string), typeof(Tizen.NUI.BaseComponents.TextEditor), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ if (newValue != null)
+ {
+ instance.InternalTranslatablePlaceholderText = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ return instance.InternalTranslatablePlaceholderText;
+ });
+
+ /// <summary>
+ /// EnableEditingProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty EnableEditingProperty = BindableProperty.Create(nameof(EnableEditing), typeof(bool), typeof(Tizen.NUI.BaseComponents.TextEditor), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ if (newValue != null)
+ {
+ instance.InternalEnableEditing = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ return instance.InternalEnableEditing;
+ });
+
+ /// <summary>
+ /// HorizontalScrollPositionProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty HorizontalScrollPositionProperty = BindableProperty.Create(nameof(HorizontalScrollPosition), typeof(int), typeof(Tizen.NUI.BaseComponents.TextEditor), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ if (newValue != null)
+ {
+ instance.InternalHorizontalScrollPosition = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ return instance.InternalHorizontalScrollPosition;
+ });
+
+ /// <summary>
+ /// VerticalScrollPositionProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty VerticalScrollPositionProperty = BindableProperty.Create(nameof(VerticalScrollPosition), typeof(int), typeof(Tizen.NUI.BaseComponents.TextEditor), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ if (newValue != null)
+ {
+ instance.InternalVerticalScrollPosition = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ return instance.InternalVerticalScrollPosition;
+ });
+
+ /// <summary>
+ /// PrimaryCursorPositionProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty PrimaryCursorPositionProperty = BindableProperty.Create(nameof(PrimaryCursorPosition), typeof(int), typeof(Tizen.NUI.BaseComponents.TextEditor), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ if (newValue != null)
+ {
+ instance.InternalPrimaryCursorPosition = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextEditor)bindable;
+ return instance.InternalPrimaryCursorPosition;
+ });
}
}
{
get
{
+ return GetValue(ShadowOffsetProperty) as Vector2;
+ }
+ set
+ {
+ SetValue(ShadowOffsetProperty, value);
+ }
+ }
+
+ private Vector2 InternalShadowOffset
+ {
+ get
+ {
PropertyMap map = new PropertyMap();
GetProperty(TextField.Property.SHADOW).Get(map);
Vector2 shadowOffset = new Vector2();
{
get
{
+ return GetValue(ShadowColorProperty) as Vector4;
+ }
+ set
+ {
+ SetValue(ShadowColorProperty, value);
+ }
+ }
+
+ private Vector4 InternalShadowColor
+ {
+ get
+ {
PropertyMap map = new PropertyMap();
GetProperty(TextField.Property.SHADOW).Get(map);
Vector4 shadowColor = new Vector4();
{
get
{
+ return (bool)GetValue(EnableEditingProperty);
+ }
+ set
+ {
+ SetValue(EnableEditingProperty, value);
+ }
+ }
+
+ private bool InternalEnableEditing
+ {
+ get
+ {
bool temp;
GetProperty(TextField.Property.EnableEditing).Get(out temp);
return temp;
{
get
{
+ return (int)GetValue(PrimaryCursorPositionProperty);
+ }
+ set
+ {
+ SetValue(PrimaryCursorPositionProperty, value);
+ }
+ }
+
+ private int InternalPrimaryCursorPosition
+ {
+ get
+ {
int temp;
using (PropertyValue propertyValue = GetProperty(TextField.Property.PrimaryCursorPosition))
{
}));
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float), typeof(TextLabel), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
+ public static readonly BindableProperty FontSizeScaleProperty = BindableProperty.Create(nameof(FontSizeScale), typeof(float), typeof(TextField), default(float), propertyChanged: (BindableProperty.BindingPropertyChangedDelegate)((bindable, oldValue, newValue) =>
{
var textField = (TextField)bindable;
if (newValue != null)
Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)textField.SwigCPtr, TextField.Property.GrabHandleColor).Get(temp);
return temp;
}));
+
+ /// <summary>
+ /// ShadowOffsetProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ShadowOffsetProperty = BindableProperty.Create(nameof(ShadowOffset), typeof(Tizen.NUI.Vector2), typeof(Tizen.NUI.BaseComponents.TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextField)bindable;
+ if (newValue != null)
+ {
+ instance.InternalShadowOffset = (Tizen.NUI.Vector2)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextField)bindable;
+ return instance.InternalShadowOffset;
+ });
+
+ /// <summary>
+ /// ShadowColorProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ShadowColorProperty = BindableProperty.Create(nameof(ShadowColor), typeof(Tizen.NUI.Vector4), typeof(Tizen.NUI.BaseComponents.TextField), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextField)bindable;
+ if (newValue != null)
+ {
+ instance.InternalShadowColor = (Tizen.NUI.Vector4)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextField)bindable;
+ return instance.InternalShadowColor;
+ });
+
+ /// <summary>
+ /// EnableEditingProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty EnableEditingProperty = BindableProperty.Create(nameof(EnableEditing), typeof(bool), typeof(Tizen.NUI.BaseComponents.TextField), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextField)bindable;
+ if (newValue != null)
+ {
+ instance.InternalEnableEditing = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextField)bindable;
+ return instance.InternalEnableEditing;
+ });
+
+ /// <summary>
+ /// PrimaryCursorPositionProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty PrimaryCursorPositionProperty = BindableProperty.Create(nameof(PrimaryCursorPosition), typeof(int), typeof(Tizen.NUI.BaseComponents.TextField), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextField)bindable;
+ if (newValue != null)
+ {
+ instance.InternalPrimaryCursorPosition = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextField)bindable;
+ return instance.InternalPrimaryCursorPosition;
+ });
}
}
{
get
{
+ return GetValue(ShadowOffsetProperty) as Vector2;
+ }
+ set
+ {
+ SetValue(ShadowOffsetProperty, value);
+ }
+ }
+
+ private Vector2 InternalShadowOffset
+ {
+ get
+ {
Vector2 shadowOffset = new Vector2();
Shadow.Find(TextLabel.Property.SHADOW, "offset")?.Get(shadowOffset);
return new Vector2(OnShadowOffsetChanged, shadowOffset.X, shadowOffset.Y);
{
get
{
+ return GetValue(ShadowColorProperty) as Vector4;
+ }
+ set
+ {
+ SetValue(ShadowColorProperty, value);
+ }
+ }
+
+ private Vector4 InternalShadowColor
+ {
+ get
+ {
Vector4 shadowColor = new Vector4();
Shadow.Find(TextLabel.Property.SHADOW, "color")?.Get(shadowColor);
return new Vector4(OnShadowColorChanged, shadowColor.X, shadowColor.Y, shadowColor.Z, shadowColor.W);
{
get
{
+ return (bool)GetValue(UnderlineEnabledProperty);
+ }
+ set
+ {
+ SetValue(UnderlineEnabledProperty, value);
+ }
+ }
+
+ private bool InternalUnderlineEnabled
+ {
+ get
+ {
bool underlineEnabled = false;
Underline.Find(TextLabel.Property.UNDERLINE, "enable")?.Get(out underlineEnabled);
return underlineEnabled;
{
get
{
+ return GetValue(UnderlineColorProperty) as Vector4;
+ }
+ set
+ {
+ SetValue(UnderlineColorProperty, value);
+ }
+ }
+
+ private Vector4 InternalUnderlineColor
+ {
+ get
+ {
Vector4 underlineColor = new Vector4();
Underline.Find(TextLabel.Property.UNDERLINE, "color")?.Get(underlineColor);
return new Vector4(OnUnderlineColorChanged, underlineColor.X, underlineColor.Y, underlineColor.Z, underlineColor.W);
{
get
{
+ return (float)GetValue(UnderlineHeightProperty);
+ }
+ set
+ {
+ SetValue(UnderlineHeightProperty, value);
+ }
+ }
+
+ private float InternalUnderlineHeight
+ {
+ get
+ {
float underlineHeight = 0.0f;
Underline.Find(TextLabel.Property.UNDERLINE, "height")?.Get(out underlineHeight);
return underlineHeight;
return temp;
}));
+ /// <summary>
+ /// ShadowOffsetProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ShadowOffsetProperty = BindableProperty.Create(nameof(ShadowOffset), typeof(Tizen.NUI.Vector2), typeof(Tizen.NUI.BaseComponents.TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+ if (newValue != null)
+ {
+ instance.InternalShadowOffset = (Tizen.NUI.Vector2)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+ return instance.InternalShadowOffset;
+ });
+
+ /// <summary>
+ /// ShadowColorProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ShadowColorProperty = BindableProperty.Create(nameof(ShadowColor), typeof(Tizen.NUI.Vector4), typeof(Tizen.NUI.BaseComponents.TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+ if (newValue != null)
+ {
+ instance.InternalShadowColor = (Tizen.NUI.Vector4)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+ return instance.InternalShadowColor;
+ });
+
+ /// <summary>
+ /// UnderlineEnabledProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty UnderlineEnabledProperty = BindableProperty.Create(nameof(UnderlineEnabled), typeof(bool), typeof(Tizen.NUI.BaseComponents.TextLabel), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+ if (newValue != null)
+ {
+ instance.InternalUnderlineEnabled = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+ return instance.InternalUnderlineEnabled;
+ });
+
+ /// <summary>
+ /// UnderlineColorProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty UnderlineColorProperty = BindableProperty.Create(nameof(UnderlineColor), typeof(Tizen.NUI.Vector4), typeof(Tizen.NUI.BaseComponents.TextLabel), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+ if (newValue != null)
+ {
+ instance.InternalUnderlineColor = (Tizen.NUI.Vector4)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+ return instance.InternalUnderlineColor;
+ });
+
+ /// <summary>
+ /// UnderlineHeightProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty UnderlineHeightProperty = BindableProperty.Create(nameof(UnderlineHeight), typeof(float), typeof(Tizen.NUI.BaseComponents.TextLabel), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+ if (newValue != null)
+ {
+ instance.InternalUnderlineHeight = (float)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.TextLabel)bindable;
+ return instance.InternalUnderlineHeight;
+ });
+
internal Selector<string> TranslatableTextSelector
{
get => GetSelector<string>(selectorData?.TranslatableText, TextLabel.TranslatableTextProperty);
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
+using Tizen.NUI.Binding;
namespace Tizen.NUI.BaseComponents.VectorGraphics
{
static CanvasView() { }
/// <summary>
+ /// ViewBoxProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ViewBoxProperty = BindableProperty.Create(nameof(ViewBox), typeof(Tizen.NUI.Size2D), typeof(Tizen.NUI.BaseComponents.VectorGraphics.CanvasView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.VectorGraphics.CanvasView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalViewBox = (Tizen.NUI.Size2D)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.VectorGraphics.CanvasView)bindable;
+ return instance.InternalViewBox;
+ });
+
+ /// <summary>
/// Creates an initialized CanvasView.
/// </summary>
/// <since_tizen> 9 </since_tizen>
{
get
{
+ return GetValue(ViewBoxProperty) as Size2D;
+ }
+ set
+ {
+ SetValue(ViewBoxProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private Size2D InternalViewBox
+ {
+ get
+ {
Size2D retVal = new Size2D(0, 0);
PropertyValue viewBoxPropertyValue = GetProperty(Interop.CanvasView.PropertyViewBoxGet());
viewBoxPropertyValue?.Get(retVal);
{
get
{
+ return (bool)GetValue(ExcludeLayoutingProperty);
+ }
+ set
+ {
+ SetValue(ExcludeLayoutingProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalExcludeLayouting
+ {
+ get
+ {
return excludeLayouting;
}
set
{
get
{
+ return GetValue(TooltipTextProperty) as string;
+ }
+ set
+ {
+ SetValue(TooltipTextProperty, value);
+ }
+ }
+
+ private string InternalTooltipText
+ {
+ get
+ {
using (var propertyValue = GetProperty(Property.TOOLTIP))
{
if (propertyValue != null && propertyValue.Get(out string retrivedValue))
{
get
{
+ return (bool)GetValue(PositionUsesAnchorPointProperty);
+ }
+ set
+ {
+ SetValue(PositionUsesAnchorPointProperty, value);
+ }
+ }
+
+ private bool InternalPositionUsesAnchorPoint
+ {
+ get
+ {
bool temp = false;
var pValue = GetProperty(View.Property.PositionUsesAnchorPoint);
pValue.Get(out temp);
{
get
{
+ return GetValue(AnchorPointProperty) as Position;
+ }
+ set
+ {
+ SetValue(AnchorPointProperty, value);
+ }
+ }
+
+ private Position InternalAnchorPoint
+ {
+ get
+ {
Position temp = new Position(0.0f, 0.0f, 0.0f);
var pValue = GetProperty(View.Property.AnchorPoint);
pValue.Get(temp);
{
get
{
+ return (int)GetValue(WidthSpecificationProperty);
+ }
+ set
+ {
+ SetValue(WidthSpecificationProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalWidthSpecification
+ {
+ get
+ {
return widthPolicy;
}
set
{
get
{
+ return (int)GetValue(HeightSpecificationProperty);
+ }
+ set
+ {
+ SetValue(HeightSpecificationProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalHeightSpecification
+ {
+ get
+ {
return heightPolicy;
}
set
{
get
{
+ return GetValue(LayoutTransitionProperty) as LayoutTransition;
+ }
+ set
+ {
+ SetValue(LayoutTransitionProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private LayoutTransition InternalLayoutTransition
+ {
+ get
+ {
return layoutTransition;
}
set
{
get
{
+ return GetValue(PaddingEXProperty) as Extents;
+ }
+ set
+ {
+ SetValue(PaddingEXProperty, value);
+ }
+ }
+
+ private Extents InternalPaddingEX
+ {
+ get
+ {
Extents temp = new Extents(0, 0, 0, 0);
var pValue = GetProperty(View.Property.PADDING);
pValue.Get(temp);
{
get
{
+ return GetValue(LayoutProperty) as LayoutItem;
+ }
+ set
+ {
+ SetValue(LayoutProperty, value);
+ }
+ }
+
+ private LayoutItem InternalLayout
+ {
+ get
+ {
return layout;
}
set
{
get
{
+ return (bool)GetValue(BackgroundImageSynchronosLoadingProperty);
+ }
+ set
+ {
+ SetValue(BackgroundImageSynchronosLoadingProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalBackgroundImageSynchronosLoading
+ {
+ get
+ {
return BackgroundImageSynchronousLoading;
}
set
{
get
{
+ return (bool)GetValue(BackgroundImageSynchronousLoadingProperty);
+ }
+ set
+ {
+ SetValue(BackgroundImageSynchronousLoadingProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalBackgroundImageSynchronousLoading
+ {
+ get
+ {
return backgroundImageSynchronousLoading;
}
set
[EditorBrowsable(EditorBrowsableState.Never)]
public bool EnableControlStatePropagation
{
+ get
+ {
+ return (bool)GetValue(EnableControlStatePropagationProperty);
+ }
+ set
+ {
+ SetValue(EnableControlStatePropagationProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalEnableControlStatePropagation
+ {
get => themeData?.ControlStatePropagation ?? false;
set
{
- if (EnableControlStatePropagation == value) return;
+ if (InternalEnableControlStatePropagation == value) return;
if (themeData == null) themeData = new ThemeData();
{
get
{
+ return (bool)GetValue(GrabTouchAfterLeaveProperty);
+ }
+ set
+ {
+ SetValue(GrabTouchAfterLeaveProperty, value);
+ }
+ }
+
+ private bool InternalGrabTouchAfterLeave
+ {
+ get
+ {
bool temp = false;
var pValue = GetProperty(View.Property.CaptureAllTouchAfterStart);
pValue.Get(out temp);
{
get
{
+ return (BlendEquationType)GetValue(BlendEquationProperty);
+ }
+ set
+ {
+ SetValue(BlendEquationProperty, value);
+ }
+ }
+
+ private BlendEquationType InternalBlendEquation
+ {
+ get
+ {
int temp = 0;
var pValue = GetProperty(View.Property.BlendEquation);
pValue.Get(out temp);
/// <since_tizen> 9 </since_tizen>
public TransitionOptions TransitionOptions
{
+ get
+ {
+ return GetValue(TransitionOptionsProperty) as TransitionOptions;
+ }
+ set
+ {
+ SetValue(TransitionOptionsProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private TransitionOptions InternalTransitionOptions
+ {
set
{
transitionOptions = value;
[EditorBrowsable(EditorBrowsableState.Never)]
public new string AutomationId
{
+ get
+ {
+ return GetValue(AutomationIdProperty) as string;
+ }
+ set
+ {
+ SetValue(AutomationIdProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private string InternalAutomationId
+ {
get { return base.AutomationId; }
set
{
/// AccessibilityRoleProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(int), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty AccessibilityRoleProperty = BindableProperty.Create(nameof(AccessibilityRole), typeof(Role), typeof(View), default(int), propertyChanged: (bindable, oldValue, newValue) =>
{
var view = (View)bindable;
if (newValue != null)
int temp = 0;
Tizen.NUI.Object.GetProperty((System.Runtime.InteropServices.HandleRef)view.SwigCPtr, View.Property.AccessibilityRole).Get(out temp);
- return temp;
+ return (Role)temp;
});
/// <summary>
return temp;
});
+ /// <summary>
+ /// ExcludeLayoutingProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ExcludeLayoutingProperty = BindableProperty.Create(nameof(ExcludeLayouting), typeof(bool), typeof(Tizen.NUI.BaseComponents.View), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalExcludeLayouting = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalExcludeLayouting;
+ });
+
+ /// <summary>
+ /// TooltipTextProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TooltipTextProperty = BindableProperty.Create(nameof(TooltipText), typeof(string), typeof(Tizen.NUI.BaseComponents.View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalTooltipText = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalTooltipText;
+ });
+
+ /// <summary>
+ /// PositionUsesAnchorPointProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty PositionUsesAnchorPointProperty = BindableProperty.Create(nameof(PositionUsesAnchorPoint), typeof(bool), typeof(Tizen.NUI.BaseComponents.View), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalPositionUsesAnchorPoint = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalPositionUsesAnchorPoint;
+ });
+
+ /// <summary>
+ /// AnchorPointProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty AnchorPointProperty = BindableProperty.Create(nameof(AnchorPoint), typeof(Tizen.NUI.Position), typeof(Tizen.NUI.BaseComponents.View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalAnchorPoint = (Tizen.NUI.Position)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalAnchorPoint;
+ });
+
+ /// <summary>
+ /// WidthSpecificationProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty WidthSpecificationProperty = BindableProperty.Create(nameof(WidthSpecification), typeof(int), typeof(Tizen.NUI.BaseComponents.View), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalWidthSpecification = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalWidthSpecification;
+ });
+
+ /// <summary>
+ /// HeightSpecificationProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty HeightSpecificationProperty = BindableProperty.Create(nameof(HeightSpecification), typeof(int), typeof(Tizen.NUI.BaseComponents.View), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalHeightSpecification = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalHeightSpecification;
+ });
+
+ /// <summary>
+ /// LayoutTransitionProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty LayoutTransitionProperty = BindableProperty.Create(nameof(LayoutTransition), typeof(Tizen.NUI.LayoutTransition), typeof(Tizen.NUI.BaseComponents.View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalLayoutTransition = (Tizen.NUI.LayoutTransition)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalLayoutTransition;
+ });
+
+ /// <summary>
+ /// PaddingEXProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty PaddingEXProperty = BindableProperty.Create(nameof(PaddingEX), typeof(Tizen.NUI.Extents), typeof(Tizen.NUI.BaseComponents.View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalPaddingEX = (Tizen.NUI.Extents)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalPaddingEX;
+ });
+
+ /// <summary>
+ /// LayoutProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty LayoutProperty = BindableProperty.Create(nameof(Layout), typeof(Tizen.NUI.LayoutItem), typeof(Tizen.NUI.BaseComponents.View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalLayout = (Tizen.NUI.LayoutItem)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalLayout;
+ });
+
+ /// <summary>
+ /// BackgroundImageSynchronosLoadingProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BackgroundImageSynchronosLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronosLoading), typeof(bool), typeof(Tizen.NUI.BaseComponents.View), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalBackgroundImageSynchronosLoading = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalBackgroundImageSynchronosLoading;
+ });
+
+ /// <summary>
+ /// BackgroundImageSynchronousLoadingProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BackgroundImageSynchronousLoadingProperty = BindableProperty.Create(nameof(BackgroundImageSynchronousLoading), typeof(bool), typeof(Tizen.NUI.BaseComponents.View), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalBackgroundImageSynchronousLoading = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalBackgroundImageSynchronousLoading;
+ });
+
+ /// <summary>
+ /// EnableControlStatePropagationProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty EnableControlStatePropagationProperty = BindableProperty.Create(nameof(EnableControlStatePropagation), typeof(bool), typeof(Tizen.NUI.BaseComponents.View), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalEnableControlStatePropagation = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalEnableControlStatePropagation;
+ });
+
+ /// <summary>
+ /// GrabTouchAfterLeaveProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty GrabTouchAfterLeaveProperty = BindableProperty.Create(nameof(GrabTouchAfterLeave), typeof(bool), typeof(Tizen.NUI.BaseComponents.View), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalGrabTouchAfterLeave = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalGrabTouchAfterLeave;
+ });
+
+ /// <summary>
+ /// BlendEquationProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty BlendEquationProperty = BindableProperty.Create(nameof(BlendEquation), typeof(Tizen.NUI.BlendEquationType), typeof(Tizen.NUI.BaseComponents.View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalBlendEquation = (Tizen.NUI.BlendEquationType)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalBlendEquation;
+ });
+
+ /// <summary>
+ /// TransitionOptionsProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TransitionOptionsProperty = BindableProperty.Create(nameof(TransitionOptions), typeof(Tizen.NUI.TransitionOptions), typeof(Tizen.NUI.BaseComponents.View), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalTransitionOptions = (Tizen.NUI.TransitionOptions)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalTransitionOptions;
+ });
+
+ /// <summary>
+ /// AutomationIdProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty AutomationIdProperty = BindableProperty.Create(nameof(AutomationId), typeof(string), typeof(Tizen.NUI.BaseComponents.View), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalAutomationId = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalAutomationId;
+ });
+
+ /// <summary>
+ /// TouchAreaOffsetProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TouchAreaOffsetProperty = BindableProperty.Create(nameof(TouchAreaOffset), typeof(Tizen.NUI.Offset), typeof(Tizen.NUI.BaseComponents.View), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ if (newValue != null)
+ {
+ instance.InternalTouchAreaOffset = (Tizen.NUI.Offset)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.View)bindable;
+ return instance.InternalTouchAreaOffset;
+ });
+
private void SetBackgroundImage(string value)
{
if (string.IsNullOrEmpty(value))
{
get
{
+ return (Offset)GetValue(TouchAreaOffsetProperty);
+ }
+ set
+ {
+ SetValue(TouchAreaOffsetProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private Offset InternalTouchAreaOffset
+ {
+ get
+ {
Interop.ActorInternal.GetTouchAreaOffset(SwigCPtr, out int left, out int right, out int bottom, out int top);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
*/
using System;
+using System.ComponentModel;
using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Binding;
// A spin control (for continuously changing values when users can easily predict a set of values)
namespace Tizen.NUI
/// <since_tizen> 3 </since_tizen>
public class Spin : CustomView
{
+ /// <summary>
+ /// ValueProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty ValueProperty = BindableProperty.Create(nameof(Value), typeof(int), typeof(Tizen.NUI.Spin), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ if (newValue != null)
+ {
+ instance.InternalValue = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ return instance.InternalValue;
+ });
+
+ /// <summary>
+ /// MinValueProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty MinValueProperty = BindableProperty.Create(nameof(MinValue), typeof(int), typeof(Tizen.NUI.Spin), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ if (newValue != null)
+ {
+ instance.InternalMinValue = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ return instance.InternalMinValue;
+ });
+
+ /// <summary>
+ /// MaxValueProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty MaxValueProperty = BindableProperty.Create(nameof(MaxValue), typeof(int), typeof(Tizen.NUI.Spin), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ if (newValue != null)
+ {
+ instance.InternalMaxValue = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ return instance.InternalMaxValue;
+ });
+
+ /// <summary>
+ /// StepProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty StepProperty = BindableProperty.Create(nameof(Step), typeof(int), typeof(Tizen.NUI.Spin), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ if (newValue != null)
+ {
+ instance.InternalStep = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ return instance.InternalStep;
+ });
+
+ /// <summary>
+ /// WrappingEnabledProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty WrappingEnabledProperty = BindableProperty.Create(nameof(WrappingEnabled), typeof(bool), typeof(Tizen.NUI.Spin), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ if (newValue != null)
+ {
+ instance.InternalWrappingEnabled = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ return instance.InternalWrappingEnabled;
+ });
+
+ /// <summary>
+ /// TextPointSizeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TextPointSizeProperty = BindableProperty.Create(nameof(TextPointSize), typeof(int), typeof(Tizen.NUI.Spin), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ if (newValue != null)
+ {
+ instance.InternalTextPointSize = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ return instance.InternalTextPointSize;
+ });
+
+ /// <summary>
+ /// TextColorProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty TextColorProperty = BindableProperty.Create(nameof(TextColor), typeof(Tizen.NUI.Color), typeof(Tizen.NUI.Spin), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ if (newValue != null)
+ {
+ instance.InternalTextColor = (Tizen.NUI.Color)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ return instance.InternalTextColor;
+ });
+
+ /// <summary>
+ /// MaxTextLengthProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty MaxTextLengthProperty = BindableProperty.Create(nameof(MaxTextLength), typeof(int), typeof(Tizen.NUI.Spin), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ if (newValue != null)
+ {
+ instance.InternalMaxTextLength = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ return instance.InternalMaxTextLength;
+ });
+
+ /// <summary>
+ /// SpinTextProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty SpinTextProperty = BindableProperty.Create(nameof(SpinText), typeof(Tizen.NUI.BaseComponents.TextField), typeof(Tizen.NUI.Spin), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ if (newValue != null)
+ {
+ instance.InternalSpinText = (Tizen.NUI.BaseComponents.TextField)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ return instance.InternalSpinText;
+ });
+
+ /// <summary>
+ /// IndicatorImageProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty IndicatorImageProperty = BindableProperty.Create(nameof(IndicatorImage), typeof(string), typeof(Tizen.NUI.Spin), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ if (newValue != null)
+ {
+ instance.InternalIndicatorImage = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.Spin)bindable;
+ return instance.InternalIndicatorImage;
+ });
+
private VisualBase arrowVisual;
private TextField textField;
private int arrowVisualPropertyIndex;
{
get
{
+ return (int)GetValue(ValueProperty);
+ }
+ set
+ {
+ SetValue(ValueProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalValue
+ {
+ get
+ {
return currentValue;
}
set
{
get
{
+ return (int)GetValue(MinValueProperty);
+ }
+ set
+ {
+ SetValue(MinValueProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalMinValue
+ {
+ get
+ {
return minValue;
}
set
{
get
{
+ return (int)GetValue(MaxValueProperty);
+ }
+ set
+ {
+ SetValue(MaxValueProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalMaxValue
+ {
+ get
+ {
return maxValue;
}
set
{
get
{
+ return (int)GetValue(StepProperty);
+ }
+ set
+ {
+ SetValue(StepProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalStep
+ {
+ get
+ {
return singleStep;
}
set
{
get
{
+ return (bool)GetValue(WrappingEnabledProperty);
+ }
+ set
+ {
+ SetValue(WrappingEnabledProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalWrappingEnabled
+ {
+ get
+ {
return wrappingEnabled;
}
set
{
get
{
+ return (int)GetValue(TextPointSizeProperty);
+ }
+ set
+ {
+ SetValue(TextPointSizeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalTextPointSize
+ {
+ get
+ {
return pointSize;
}
set
{
get
{
+ return GetValue(TextColorProperty) as Color;
+ }
+ set
+ {
+ SetValue(TextColorProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private Color InternalTextColor
+ {
+ get
+ {
return textColor;
}
set
{
get
{
+ return (int)GetValue(MaxTextLengthProperty);
+ }
+ set
+ {
+ SetValue(MaxTextLengthProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalMaxTextLength
+ {
+ get
+ {
return maxTextLength;
}
set
{
get
{
+ return GetValue(SpinTextProperty) as TextField;
+ }
+ set
+ {
+ SetValue(SpinTextProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private TextField InternalSpinText
+ {
+ get
+ {
return textField;
}
set
{
get
{
+ return GetValue(IndicatorImageProperty) as string;
+ }
+ set
+ {
+ SetValue(IndicatorImageProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private string InternalIndicatorImage
+ {
+ get
+ {
return arrowImage;
}
set
/// WebView allows presenting content with embedded web browser, both local files and remote websites.
/// </summary>
/// <since_tizen> 9 </since_tizen>
- public class WebView : View
+ public partial class WebView : View
{
private Color contentBackgroundColor;
private bool tilesClearedWhenHidden;
{
get
{
+ return (CacheModel)GetValue(CacheModelProperty);
+ }
+ set
+ {
+ SetValue(CacheModelProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private CacheModel InternalCacheModel
+ {
+ get
+ {
return (CacheModel)Context.CacheModel;
}
set
{
get
{
+ return (CookieAcceptPolicy)GetValue(CookieAcceptPolicyProperty);
+ }
+ set
+ {
+ SetValue(CookieAcceptPolicyProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private CookieAcceptPolicy InternalCookieAcceptPolicy
+ {
+ get
+ {
return (CookieAcceptPolicy)CookieManager.CookieAcceptPolicy;
}
set
{
get
{
+ return (bool)GetValue(EnableJavaScriptProperty);
+ }
+ set
+ {
+ SetValue(EnableJavaScriptProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalEnableJavaScript
+ {
+ get
+ {
return Settings.JavaScriptEnabled;
}
set
{
get
{
+ return (bool)GetValue(LoadImagesAutomaticallyProperty);
+ }
+ set
+ {
+ SetValue(LoadImagesAutomaticallyProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalLoadImagesAutomatically
+ {
+ get
+ {
return Settings.AutomaticImageLoadingAllowed;
}
set
{
get
{
+ return GetValue(DefaultTextEncodingNameProperty) as string;
+ }
+ set
+ {
+ SetValue(DefaultTextEncodingNameProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private string InternalDefaultTextEncodingName
+ {
+ get
+ {
return Settings.DefaultTextEncodingName;
}
set
{
get
{
+ return (int)GetValue(DefaultFontSizeProperty);
+ }
+ set
+ {
+ SetValue(DefaultFontSizeProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private int InternalDefaultFontSize
+ {
+ get
+ {
return Settings.DefaultFontSize;
}
set
{
get
{
+ return GetValue(ScrollPositionProperty) as Position;
+ }
+ set
+ {
+ SetValue(ScrollPositionProperty, value);
+ }
+ }
+
+ private Position InternalScrollPosition
+ {
+ get
+ {
Vector2 pv = (Vector2)GetValue(ScrollPositionProperty);
return new Position(pv.X, pv.Y);
}
--- /dev/null
+/*
+ * Copyright(c) 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+using System.ComponentModel;
+using Tizen.NUI.Binding;
+
+namespace Tizen.NUI.BaseComponents
+{
+ public partial class WebView
+ {
+ /// <summary>
+ /// CacheModelProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty CacheModelProperty = BindableProperty.Create(nameof(CacheModel), typeof(Tizen.NUI.CacheModel), typeof(Tizen.NUI.BaseComponents.WebView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalCacheModel = (Tizen.NUI.CacheModel)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ return instance.InternalCacheModel;
+ });
+
+ /// <summary>
+ /// CookieAcceptPolicyProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty CookieAcceptPolicyProperty = BindableProperty.Create(nameof(CookieAcceptPolicy), typeof(Tizen.NUI.CookieAcceptPolicy), typeof(Tizen.NUI.BaseComponents.WebView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalCookieAcceptPolicy = (Tizen.NUI.CookieAcceptPolicy)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ return instance.InternalCookieAcceptPolicy;
+ });
+
+ /// <summary>
+ /// EnableJavaScriptProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty EnableJavaScriptProperty = BindableProperty.Create(nameof(EnableJavaScript), typeof(bool), typeof(Tizen.NUI.BaseComponents.WebView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalEnableJavaScript = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ return instance.InternalEnableJavaScript;
+ });
+
+ /// <summary>
+ /// LoadImagesAutomaticallyProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty LoadImagesAutomaticallyProperty = BindableProperty.Create(nameof(LoadImagesAutomatically), typeof(bool), typeof(Tizen.NUI.BaseComponents.WebView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalLoadImagesAutomatically = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ return instance.InternalLoadImagesAutomatically;
+ });
+
+ /// <summary>
+ /// DefaultTextEncodingNameProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty DefaultTextEncodingNameProperty = BindableProperty.Create(nameof(DefaultTextEncodingName), typeof(string), typeof(Tizen.NUI.BaseComponents.WebView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalDefaultTextEncodingName = (string)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ return instance.InternalDefaultTextEncodingName;
+ });
+
+ /// <summary>
+ /// DefaultFontSizeProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty DefaultFontSizeProperty = BindableProperty.Create(nameof(DefaultFontSize), typeof(int), typeof(Tizen.NUI.BaseComponents.WebView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalDefaultFontSize = (int)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.BaseComponents.WebView)bindable;
+ return instance.InternalDefaultFontSize;
+ });
+ }
+}
using System;
using System.Runtime.InteropServices;
using Tizen.NUI.BaseComponents;
+ using Tizen.NUI.Binding;
/// <summary>
/// The WidgetView is a class for displaying the widget image and controlling the widget.<br />
/// <since_tizen> 3 </since_tizen>
public class WidgetView : View
{
+ /// <summary>
+ /// PreviewProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty PreviewProperty = BindableProperty.Create(nameof(Preview), typeof(bool), typeof(Tizen.NUI.WidgetView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalPreview = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ return instance.InternalPreview;
+ });
+
+ /// <summary>
+ /// LoadingTextProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty LoadingTextProperty = BindableProperty.Create(nameof(LoadingText), typeof(bool), typeof(Tizen.NUI.WidgetView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalLoadingText = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ return instance.InternalLoadingText;
+ });
+
+ /// <summary>
+ /// WidgetStateFaultedProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty WidgetStateFaultedProperty = BindableProperty.Create(nameof(WidgetStateFaulted), typeof(bool), typeof(Tizen.NUI.WidgetView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalWidgetStateFaulted = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ return instance.InternalWidgetStateFaulted;
+ });
+
+ /// <summary>
+ /// PermanentDeleteProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty PermanentDeleteProperty = BindableProperty.Create(nameof(PermanentDelete), typeof(bool), typeof(Tizen.NUI.WidgetView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalPermanentDelete = (bool)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ return instance.InternalPermanentDelete;
+ });
+
+ /// <summary>
+ /// RetryTextProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty RetryTextProperty = BindableProperty.Create(nameof(RetryText), typeof(Tizen.NUI.PropertyMap), typeof(Tizen.NUI.WidgetView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalRetryText = (Tizen.NUI.PropertyMap)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ return instance.InternalRetryText;
+ });
+
+ /// <summary>
+ /// EffectProperty
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public static readonly BindableProperty EffectProperty = BindableProperty.Create(nameof(Effect), typeof(Tizen.NUI.PropertyMap), typeof(Tizen.NUI.WidgetView), null, propertyChanged: (bindable, oldValue, newValue) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ if (newValue != null)
+ {
+ instance.InternalEffect = (Tizen.NUI.PropertyMap)newValue;
+ }
+ },
+ defaultValueCreator: (bindable) =>
+ {
+ var instance = (Tizen.NUI.WidgetView)bindable;
+ return instance.InternalEffect;
+ });
+
private EventHandler<WidgetViewEventArgs> widgetAddedEventHandler;
private WidgetAddedEventCallbackType widgetAddedEventCallback;
private EventHandler<WidgetViewEventArgs> widgetContentUpdatedEventHandler;
{
get
{
+ return (bool)GetValue(PreviewProperty);
+ }
+ set
+ {
+ SetValue(PreviewProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalPreview
+ {
+ get
+ {
bool retValue = false;
PropertyValue preview = GetProperty(WidgetView.Property.PREVIEW);
preview?.Get(out retValue);
{
get
{
+ return (bool)GetValue(LoadingTextProperty);
+ }
+ set
+ {
+ SetValue(LoadingTextProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalLoadingText
+ {
+ get
+ {
bool retValue = false;
PropertyValue loadingText = GetProperty(WidgetView.Property.LoadingText);
loadingText?.Get(out retValue);
{
get
{
+ return (bool)GetValue(WidgetStateFaultedProperty);
+ }
+ set
+ {
+ SetValue(WidgetStateFaultedProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalWidgetStateFaulted
+ {
+ get
+ {
bool retValue = false;
PropertyValue widgetStateFaulted = GetProperty(WidgetView.Property.WidgetStateFaulted);
widgetStateFaulted?.Get(out retValue);
{
get
{
+ return (bool)GetValue(PermanentDeleteProperty);
+ }
+ set
+ {
+ SetValue(PermanentDeleteProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private bool InternalPermanentDelete
+ {
+ get
+ {
bool retValue = false;
PropertyValue permanentDelete = GetProperty(WidgetView.Property.PermanentDelete);
permanentDelete?.Get(out retValue);
{
get
{
+ return GetValue(RetryTextProperty) as PropertyMap;
+ }
+ set
+ {
+ SetValue(RetryTextProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private PropertyMap InternalRetryText
+ {
+ get
+ {
PropertyMap retValue = new PropertyMap();
PropertyValue retryText = GetProperty(WidgetView.Property.RetryText);
retryText?.Get(retValue);
{
get
{
+ return GetValue(EffectProperty) as PropertyMap;
+ }
+ set
+ {
+ SetValue(EffectProperty, value);
+ NotifyPropertyChanged();
+ }
+ }
+
+ private PropertyMap InternalEffect
+ {
+ get
+ {
PropertyMap retValue = new PropertyMap();
PropertyValue effect = GetProperty(WidgetView.Property.EFFECT);
effect?.Get(retValue);