Skip to content

Commit

Permalink
[NUI] Fix the issue that Style Property Getter does not work.
Browse files Browse the repository at this point in the history
This patch is to fix failed TC in TCT.
  • Loading branch information
huayongxu authored and dongsug-song committed Feb 18, 2025
1 parent 9e569ec commit dadc1ba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Tizen.NUI/src/public/BaseComponents/Style/ViewStyle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,10 @@ protected virtual object GetValue(IStyleProperty styleProperty)
[EditorBrowsable(EditorBrowsableState.Never)]
protected virtual T GetOrCreateValue<T>(IStyleProperty styleProperty)
{
if (values.TryGetValue(styleProperty, out var value))
{
return (T)value;
}
T newValue = (T)Activator.CreateInstance(typeof(T));
values[styleProperty] = newValue;
return newValue;
Expand Down
4 changes: 4 additions & 0 deletions src/Tizen.NUI/src/public/BaseComponents/ViewPublicMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ public Animation AnimateBackgroundColor(object destinationValue,
/// <since_tizen> 3 </since_tizen>
public Animation AnimateColor(string targetVisual, object destinationColor, int startTime, int endTime, AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialColor = null)
{
if (targetVisual == null)
{
throw new ArgumentNullException(nameof(targetVisual), "targetVisual is null.");
}
Animation animation = null;
using (PropertyMap animator = new PropertyMap())
using (PropertyMap timePeriod = new PropertyMap())
Expand Down

0 comments on commit dadc1ba

Please sign in to comment.