using global::System;
using System.ComponentModel;
+using Tizen.NUI;
+using Tizen.NUI.Binding;
namespace Tizen.NUI.BaseComponents
{
public partial class AnimatedVectorImageView : LottieAnimationView
{
#region Constructor, Destructor, Dispose
+
+ static AnimatedVectorImageView()
+ {
+ if (NUIApplication.IsUsingXaml)
+ {
+ ResourceURLProperty = BindableProperty.Create(nameof(ResourceURL), typeof(string), typeof(AnimatedVectorImageView), string.Empty,
+ propertyChanged: SetInternalResourceURLProperty, defaultValueCreator: GetInternalResourceURLProperty);
+
+ ResourceUrlProperty = BindableProperty.Create(nameof(ResourceUrl), typeof(string), typeof(AnimatedVectorImageView), string.Empty,
+ propertyChanged: SetInternalResourceUrlProperty, defaultValueCreator: GetInternalResourceUrlProperty);
+
+ RepeatCountProperty = BindableProperty.Create(nameof(RepeatCount), typeof(int), typeof(AnimatedVectorImageView), 0,
+ propertyChanged: SetInternalRepeatCountProperty, defaultValueCreator: GetInternalRepeatCountProperty);
+
+ CurrentFrameProperty = BindableProperty.Create(nameof(CurrentFrame), typeof(int), typeof(AnimatedVectorImageView), 0,
+ propertyChanged: SetInternalCurrentFrameProperty, defaultValueCreator: GetInternalCurrentFrameProperty);
+
+ RepeatModeProperty = BindableProperty.Create(nameof(RepeatMode), typeof(RepeatModes), typeof(AnimatedVectorImageView), default(RepeatModes),
+ propertyChanged: SetInternalRepeatModeProperty, defaultValueCreator: GetInternalRepeatModeProperty);
+ }
+ }
+
/// <summary>
/// Construct VectorAnimationView.
/// </summary>
{
get
{
- return GetValue(ResourceURLProperty) as string;
+ if (NUIApplication.IsUsingXaml)
+ {
+ return GetValue(ResourceURLProperty) as string;
+ }
+ else
+ {
+ return GetInternalResourceURLProperty(this) as string;
+ }
}
set
{
- SetValue(ResourceURLProperty, value);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(ResourceURLProperty, value);
+ }
+ else
+ {
+ SetInternalResourceURLProperty(this, null, value);
+ }
NotifyPropertyChanged();
}
}
{
get
{
- return GetValue(ResourceUrlProperty) as string;
+ if (NUIApplication.IsUsingXaml)
+ {
+ return GetValue(ResourceUrlProperty) as string;
+ }
+ else
+ {
+ return GetInternalResourceUrlProperty(this) as string;
+ }
}
set
{
- SetValue(ResourceUrlProperty, value);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(ResourceUrlProperty, value);
+ }
+ else
+ {
+ SetInternalResourceUrlProperty(this, null, value);
+ }
NotifyPropertyChanged();
}
}
{
get
{
- return (int)GetValue(RepeatCountProperty);
+ if (NUIApplication.IsUsingXaml)
+ {
+ return (int)GetValue(RepeatCountProperty);
+ }
+ else
+ {
+ return (int)GetInternalRepeatCountProperty(this);
+ }
}
set
{
- SetValue(RepeatCountProperty, value);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(RepeatCountProperty, value);
+ }
+ else
+ {
+ SetInternalRepeatCountProperty(this, null, value);
+ }
NotifyPropertyChanged();
}
}
-
+
private int InternalRepeatCount
{
set
{
get
{
- return (int)GetValue(CurrentFrameProperty);
+ if (NUIApplication.IsUsingXaml)
+ {
+ return (int)GetValue(CurrentFrameProperty);
+ }
+ else
+ {
+ return (int)GetInternalCurrentFrameProperty(this);
+ }
}
set
{
- SetValue(CurrentFrameProperty, value);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(CurrentFrameProperty, value);
+ }
+ else
+ {
+ SetInternalCurrentFrameProperty(this, null, value);
+ }
NotifyPropertyChanged();
}
}
{
get
{
- return (RepeatModes)GetValue(RepeatModeProperty);
+ if (NUIApplication.IsUsingXaml)
+ {
+ return (RepeatModes)GetValue(RepeatModeProperty);
+ }
+ else
+ {
+ return (RepeatModes)GetInternalRepeatModeProperty(this);
+ }
}
set
{
- SetValue(RepeatModeProperty, value);
+ if (NUIApplication.IsUsingXaml)
+ {
+ SetValue(RepeatModeProperty, value);
+ }
+ else
+ {
+ SetInternalRepeatModeProperty(this, null, value);
+ }
NotifyPropertyChanged();
}
}
/// ResourceURLProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static readonly BindableProperty ResourceURLProperty = BindableProperty.Create(nameof(ResourceURL), typeof(string), typeof(AnimatedVectorImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty ResourceURLProperty = null;
+
+ internal static void SetInternalResourceURLProperty(BindableObject bindable, object oldValue, object newValue)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
instance.InternalResourceURL = (string)newValue;
- },
- defaultValueCreator: (bindable) =>
+ }
+
+ internal static object GetInternalResourceURLProperty(BindableObject 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(AnimatedVectorImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) =>
+ public static new readonly BindableProperty ResourceUrlProperty = null;
+
+ internal static void SetInternalResourceUrlProperty(BindableObject bindable, object oldValue, object newValue)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
instance.InternalResourceUrl = (string)newValue;
- },
- defaultValueCreator: (bindable) =>
+ }
+
+ internal static object GetInternalResourceUrlProperty(BindableObject 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(AnimatedVectorImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty RepeatCountProperty = null;
+
+ internal static void SetInternalRepeatCountProperty(BindableObject bindable, object oldValue, object newValue)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
if (newValue != null)
{
instance.InternalRepeatCount = (int)newValue;
}
- },
- defaultValueCreator: (bindable) =>
+ }
+ internal static object GetInternalRepeatCountProperty(BindableObject 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(AnimatedVectorImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
+ public static new readonly BindableProperty CurrentFrameProperty = null;
+
+ internal static void SetInternalCurrentFrameProperty(BindableObject bindable, object oldValue, object newValue)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
if (newValue != null)
{
instance.InternalCurrentFrame = (int)newValue;
}
- },
- defaultValueCreator: (bindable) =>
+ }
+
+ internal static object GetInternalCurrentFrameProperty(BindableObject 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(RepeatModes), typeof(AnimatedVectorImageView), default(RepeatModes), propertyChanged: (bindable, oldValue, newValue) =>
+ public static readonly BindableProperty RepeatModeProperty = null;
+
+ static internal void SetInternalRepeatModeProperty(BindableObject bindable, object oldValue, object newValue)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
if (newValue != null)
{
instance.InternalRepeatMode = (Tizen.NUI.BaseComponents.AnimatedVectorImageView.RepeatModes)newValue;
}
- },
- defaultValueCreator: (bindable) =>
+ }
+
+ static internal object GetInternalRepeatModeProperty(BindableObject bindable)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedVectorImageView)bindable;
return instance.InternalRepeatMode;
- });
+ }
}
}