From: Fang Xiaohui Date: Wed, 25 Aug 2021 02:35:04 +0000 (+0800) Subject: [Xaml] Remove underline in member's name X-Git-Tag: accepted/tizen/unified/20231205.024657~1544 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d1b0e5fdc3d860406f1093e69aa99e509e6c7b27;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [Xaml] Remove underline in member's name --- diff --git a/src/Tizen.NUI/src/public/XamlBinding/XamlStyle.cs b/src/Tizen.NUI/src/public/XamlBinding/XamlStyle.cs index 6f9b768..64edce2 100755 --- a/src/Tizen.NUI/src/public/XamlBinding/XamlStyle.cs +++ b/src/Tizen.NUI/src/public/XamlBinding/XamlStyle.cs @@ -12,18 +12,18 @@ namespace Tizen.NUI.Binding { internal const string StyleClassPrefix = "Tizen.NUI.Binding.StyleClass."; - readonly BindableProperty _basedOnResourceProperty = BindableProperty.CreateAttached("BasedOnResource", typeof(XamlStyle), typeof(XamlStyle), default(XamlStyle), + readonly BindableProperty basedOnResourceProperty = BindableProperty.CreateAttached("BasedOnResource", typeof(XamlStyle), typeof(XamlStyle), default(XamlStyle), propertyChanged: OnBasedOnResourceChanged); - readonly List> _targets = new List>(4); + readonly List> targets = new List>(4); - XamlStyle _basedOnStyle; + XamlStyle basedOnStyle; - string _baseResourceKey; + string baseResourceKey; - IList _behaviors; + IList behaviors; - IList _triggers; + IList triggers; [EditorBrowsable(EditorBrowsableState.Never)] public XamlStyle([TypeConverter(typeof(TypeTypeConverter))][Parameter("TargetType")] Type targetType) @@ -41,15 +41,15 @@ namespace Tizen.NUI.Binding [EditorBrowsable(EditorBrowsableState.Never)] public XamlStyle BasedOn { - get { return _basedOnStyle; } + get { return basedOnStyle; } set { - if (_basedOnStyle == value) + if (basedOnStyle == value) return; if (!ValidateBasedOn(value)) throw new ArgumentException("BasedOn.TargetType is not compatible with TargetType"); - XamlStyle oldValue = _basedOnStyle; - _basedOnStyle = value; + XamlStyle oldValue = basedOnStyle; + basedOnStyle = value; BasedOnChanged(oldValue, value); if (value != null) BaseResourceKey = null; @@ -59,21 +59,21 @@ namespace Tizen.NUI.Binding [EditorBrowsable(EditorBrowsableState.Never)] public string BaseResourceKey { - get { return _baseResourceKey; } + get { return baseResourceKey; } set { - if (_baseResourceKey == value) + if (baseResourceKey == value) return; - _baseResourceKey = value; + baseResourceKey = value; //update all DynamicResources - foreach (WeakReference bindableWr in _targets) + foreach (WeakReference bindableWr in targets) { BindableObject target; if (!bindableWr.TryGetTarget(out target)) continue; - target.RemoveDynamicResource(_basedOnResourceProperty); + target.RemoveDynamicResource(basedOnResourceProperty); if (value != null) - target.SetDynamicResource(_basedOnResourceProperty, value); + target.SetDynamicResource(basedOnResourceProperty, value); } if (value != null) BasedOn = null; @@ -82,7 +82,7 @@ namespace Tizen.NUI.Binding internal IList Behaviors { - get { return _behaviors ?? (_behaviors = new AttachedCollection()); } + get { return behaviors ?? (behaviors = new AttachedCollection()); } } [EditorBrowsable(EditorBrowsableState.Never)] @@ -97,14 +97,14 @@ namespace Tizen.NUI.Binding [EditorBrowsable(EditorBrowsableState.Never)] public IList Triggers { - get { return _triggers ?? (_triggers = new AttachedCollection()); } + get { return triggers ?? (triggers = new AttachedCollection()); } } void IStyle.Apply(BindableObject bindable) { - _targets.Add(new WeakReference(bindable)); + targets.Add(new WeakReference(bindable)); if (BaseResourceKey != null) - bindable.SetDynamicResource(_basedOnResourceProperty, BaseResourceKey); + bindable.SetDynamicResource(basedOnResourceProperty, BaseResourceKey); ApplyCore(bindable, BasedOn ?? GetBasedOnResource(bindable)); } @@ -114,8 +114,8 @@ namespace Tizen.NUI.Binding void IStyle.UnApply(BindableObject bindable) { UnApplyCore(bindable, BasedOn ?? GetBasedOnResource(bindable)); - bindable.RemoveDynamicResource(_basedOnResourceProperty); - _targets.RemoveAll(wr => + bindable.RemoveDynamicResource(basedOnResourceProperty); + targets.RemoveAll(wr => { BindableObject target; return wr.TryGetTarget(out target) && target == bindable; @@ -150,7 +150,7 @@ namespace Tizen.NUI.Binding void BasedOnChanged(XamlStyle oldValue, XamlStyle newValue) { - foreach (WeakReference bindableRef in _targets) + foreach (WeakReference bindableRef in targets) { BindableObject bindable; if (!bindableRef.TryGetTarget(out bindable)) @@ -163,7 +163,7 @@ namespace Tizen.NUI.Binding XamlStyle GetBasedOnResource(BindableObject bindable) { - return (XamlStyle)bindable.GetValue(_basedOnResourceProperty); + return (XamlStyle)bindable.GetValue(basedOnResourceProperty); } static void OnBasedOnResourceChanged(BindableObject bindable, object oldValue, object newValue)