Skip to content

Commit

Permalink
[NUI] Disable xaml in Style & Layouting.
Browse files Browse the repository at this point in the history
  • Loading branch information
huayongxu committed Feb 5, 2025
1 parent 772cc29 commit 69ca26a
Show file tree
Hide file tree
Showing 13 changed files with 5,980 additions and 1,069 deletions.
1 change: 0 additions & 1 deletion src/Tizen.NUI/src/internal/Utility/GaussianBlurView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ static GaussianBlurView()
{
BlurStrengthProperty = BindableProperty.Create(nameof(BlurStrength), typeof(float), typeof(GaussianBlurView), default(float),
propertyChanged: SetInternalBlurStrengthProperty, defaultValueCreator: GetInternalBlurStrengthProperty);

}
}

Expand Down
108 changes: 96 additions & 12 deletions src/Tizen.NUI/src/public/BaseComponents/AnimatedImageView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,25 @@ public int BatchSize
{
get
{
return (int)GetValue(BatchSizeProperty);
if (NUIApplication.IsUsingXaml)
{
return (int)GetValue(BatchSizeProperty);
}
else
{
return (int)GetInternalBatchSizeProperty(this);
}
}
set
{
SetValue(BatchSizeProperty, value);
if (NUIApplication.IsUsingXaml)
{
SetValue(BatchSizeProperty, value);
}
else
{
SetInternalBatchSizeProperty(this, null, value);
}
NotifyPropertyChanged();
}
}
Expand Down Expand Up @@ -143,11 +157,25 @@ public int CacheSize
{
get
{
return (int)GetValue(CacheSizeProperty);
if (NUIApplication.IsUsingXaml)
{
return (int)GetValue(CacheSizeProperty);
}
else
{
return (int)GetInternalCacheSizeProperty(this);
}
}
set
{
SetValue(CacheSizeProperty, value);
if (NUIApplication.IsUsingXaml)
{
SetValue(CacheSizeProperty, value);
}
else
{
SetInternalCacheSizeProperty(this, null, value);
}
NotifyPropertyChanged();
}
}
Expand Down Expand Up @@ -184,11 +212,25 @@ public int FrameDelay
{
get
{
return (int)GetValue(FrameDelayProperty);
if (NUIApplication.IsUsingXaml)
{
return (int)GetValue(FrameDelayProperty);
}
else
{
return (int)GetInternalFrameDelayProperty(this);
}
}
set
{
SetValue(FrameDelayProperty, value);
if (NUIApplication.IsUsingXaml)
{
SetValue(FrameDelayProperty, value);
}
else
{
SetInternalFrameDelayProperty(this, null, value);
}
NotifyPropertyChanged();
}
}
Expand Down Expand Up @@ -221,11 +263,25 @@ public int LoopCount
{
get
{
return (int)GetValue(LoopCountProperty);
if (NUIApplication.IsUsingXaml)
{
return (int)GetValue(LoopCountProperty);
}
else
{
return (int)GetInternalLoopCountProperty(this);
}
}
set
{
SetValue(LoopCountProperty, value);
if (NUIApplication.IsUsingXaml)
{
SetValue(LoopCountProperty, value);
}
else
{
SetInternalLoopCountProperty(this, null, value);
}
NotifyPropertyChanged();
}
}
Expand Down Expand Up @@ -257,11 +313,25 @@ public StopBehaviorType StopBehavior
{
get
{
return (StopBehaviorType)GetValue(StopBehaviorProperty);
if (NUIApplication.IsUsingXaml)
{
return (StopBehaviorType)GetValue(StopBehaviorProperty);
}
else
{
return (StopBehaviorType)GetInternalStopBehaviorProperty(this);
}
}
set
{
SetValue(StopBehaviorProperty, value);
if (NUIApplication.IsUsingXaml)
{
SetValue(StopBehaviorProperty, value);
}
else
{
SetInternalStopBehaviorProperty(this, null, value);
}
NotifyPropertyChanged();
}
}
Expand Down Expand Up @@ -365,11 +435,25 @@ public int CurrentFrame
{
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();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,112 +22,137 @@ namespace Tizen.NUI.BaseComponents
{
public partial class AnimatedImageView
{
static AnimatedImageView()
{
if (NUIApplication.IsUsingXaml)
{
BatchSizeProperty = BindableProperty.Create(nameof(BatchSize), typeof(int), typeof(AnimatedImageView), 0,
propertyChanged: SetInternalBatchSizeProperty, defaultValueCreator: GetInternalBatchSizeProperty);
CacheSizeProperty = BindableProperty.Create(nameof(CacheSize), typeof(int), typeof(AnimatedImageView), 0,
propertyChanged: SetInternalCacheSizeProperty, defaultValueCreator: GetInternalCacheSizeProperty);
FrameDelayProperty = BindableProperty.Create(nameof(FrameDelay), typeof(int), typeof(AnimatedImageView), 0,
propertyChanged: SetInternalFrameDelayProperty, defaultValueCreator: GetInternalFrameDelayProperty);
LoopCountProperty = BindableProperty.Create(nameof(LoopCount), typeof(int), typeof(AnimatedImageView), 0,
propertyChanged: SetInternalLoopCountProperty, defaultValueCreator: GetInternalLoopCountProperty);
StopBehaviorProperty = BindableProperty.Create(nameof(StopBehavior), typeof(StopBehaviorType), typeof(AnimatedImageView), default(StopBehaviorType),
propertyChanged: SetInternalStopBehaviorProperty, defaultValueCreator: GetInternalStopBehaviorProperty);
CurrentFrameProperty = BindableProperty.Create(nameof(CurrentFrame), typeof(int), typeof(AnimatedImageView), 0,
propertyChanged: SetInternalCurrentFrameProperty, defaultValueCreator: GetInternalCurrentFrameProperty);
}
}

/// <summary>
/// BatchSizeProperty
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
public static readonly BindableProperty BatchSizeProperty = BindableProperty.Create(nameof(BatchSize), typeof(int), typeof(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
public static readonly BindableProperty BatchSizeProperty = null;
internal static void SetInternalBatchSizeProperty(BindableObject bindable, object oldValue, object newValue)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
if (newValue != null)
{
instance.InternalBatchSize = (int)newValue;
}
},
defaultValueCreator: (bindable) =>
}
internal static object GetInternalBatchSizeProperty(BindableObject 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(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
public static readonly BindableProperty CacheSizeProperty = null;
internal static void SetInternalCacheSizeProperty(BindableObject bindable, object oldValue, object newValue)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
if (newValue != null)
{
instance.InternalCacheSize = (int)newValue;
}
},
defaultValueCreator: (bindable) =>
}
internal static object GetInternalCacheSizeProperty(BindableObject 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(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
public static readonly BindableProperty FrameDelayProperty = null;
internal static void SetInternalFrameDelayProperty(BindableObject bindable, object oldValue, object newValue)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
if (newValue != null)
{
instance.InternalFrameDelay = (int)newValue;
}
},
defaultValueCreator: (bindable) =>
}
internal static object GetInternalFrameDelayProperty(BindableObject 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(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
public static readonly BindableProperty LoopCountProperty = null;
internal static void SetInternalLoopCountProperty(BindableObject bindable, object oldValue, object newValue)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
if (newValue != null)
{
instance.InternalLoopCount = (int)newValue;
}
},
defaultValueCreator: (bindable) =>
}
internal static object GetInternalLoopCountProperty(BindableObject 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(StopBehaviorType), typeof(AnimatedImageView), default(StopBehaviorType), propertyChanged: (bindable, oldValue, newValue) =>
public static readonly BindableProperty StopBehaviorProperty = null;
internal static void SetInternalStopBehaviorProperty(BindableObject bindable, object oldValue, object newValue)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
if (newValue != null)
{
instance.InternalStopBehavior = (Tizen.NUI.BaseComponents.AnimatedImageView.StopBehaviorType)newValue;
}
},
defaultValueCreator: (bindable) =>
}
internal static object GetInternalStopBehaviorProperty(BindableObject 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(AnimatedImageView), 0, propertyChanged: (bindable, oldValue, newValue) =>
public static readonly BindableProperty CurrentFrameProperty = null;
internal static void SetInternalCurrentFrameProperty(BindableObject bindable, object oldValue, object newValue)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
if (newValue != null)
{
instance.InternalCurrentFrame = (int)newValue;
}
},
defaultValueCreator: (bindable) =>
}
internal static object GetInternalCurrentFrameProperty(BindableObject bindable)
{
var instance = (Tizen.NUI.BaseComponents.AnimatedImageView)bindable;
return instance.InternalCurrentFrame;
});
}
}
}
Loading

0 comments on commit 69ca26a

Please sign in to comment.