From: YeongJong Lee Date: Tue, 24 Nov 2020 08:54:49 +0000 (+0900) Subject: [NUI] remove unused Xamarin style classes (#2184) X-Git-Tag: accepted/tizen/unified/20210219.040944~249 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b186c76d709f411aacb0b461693b52a01dd74cc4;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] remove unused Xamarin style classes (#2184) NUI uses `Tizen.NUI.BaseComponents.ViewStyle` instead of `Tizen.NUI.Binding.Style` which is copied from xamarin. --- diff --git a/src/Tizen.NUI/src/internal/Xaml/ApplyPropertiesVisitor.cs b/src/Tizen.NUI/src/internal/Xaml/ApplyPropertiesVisitor.cs index ab01ef6..18d91ec 100755 --- a/src/Tizen.NUI/src/internal/Xaml/ApplyPropertiesVisitor.cs +++ b/src/Tizen.NUI/src/internal/Xaml/ApplyPropertiesVisitor.cs @@ -6,7 +6,6 @@ using System.Reflection; using System.Xml; using Tizen.NUI.Binding.Internals; using Tizen.NUI.Binding; -using Tizen.NUI.StyleSheets; using static System.String; @@ -709,12 +708,8 @@ namespace Tizen.NUI.Xaml if (xKey != null) resourceDictionary.Add(xKey, value); - else if (value is Tizen.NUI.Binding.Style) - resourceDictionary.Add((Tizen.NUI.Binding.Style)value); else if (value is ResourceDictionary) resourceDictionary.Add((ResourceDictionary)value); - else if (value is StyleSheets.StyleSheet) - resourceDictionary.Add((StyleSheets.StyleSheet)value); else { exception = new XamlParseException("resources in ResourceDictionary require a x:Key attribute", lineInfo); diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Device.cs b/src/Tizen.NUI/src/internal/XamlBinding/Device.cs index 8dc1cec..ff77077 100755 --- a/src/Tizen.NUI/src/internal/XamlBinding/Device.cs +++ b/src/Tizen.NUI/src/internal/XamlBinding/Device.cs @@ -127,32 +127,5 @@ namespace Tizen.NUI.Binding // { // return PlatformServices.GetNamedSize(size, targetElementType, useOldSizes); // } - - public static class Styles - { - public const string TitleStyleKey = "TitleStyle"; - - public const string SubtitleStyleKey = "SubtitleStyle"; - - public const string BodyStyleKey = "BodyStyle"; - - public const string ListItemTextStyleKey = "ListItemTextStyle"; - - public const string ListItemDetailTextStyleKey = "ListItemDetailTextStyle"; - - public const string CaptionStyleKey = "CaptionStyle"; - - public static readonly Style TitleStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = TitleStyleKey }; - - public static readonly Style SubtitleStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = SubtitleStyleKey }; - - public static readonly Style BodyStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = BodyStyleKey }; - - public static readonly Style ListItemTextStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = ListItemTextStyleKey }; - - public static readonly Style ListItemDetailTextStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = ListItemDetailTextStyleKey }; - - public static readonly Style CaptionStyle = new Style(typeof(Tizen.NUI.BaseComponents.TextLabel)) { BaseResourceKey = CaptionStyleKey }; - } } } diff --git a/src/Tizen.NUI/src/internal/XamlBinding/MergedStyle.cs b/src/Tizen.NUI/src/internal/XamlBinding/MergedStyle.cs deleted file mode 100755 index 8810ed2..0000000 --- a/src/Tizen.NUI/src/internal/XamlBinding/MergedStyle.cs +++ /dev/null @@ -1,173 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Reflection; -using Tizen.NUI.StyleSheets; -using Tizen.NUI.BaseComponents; - -namespace Tizen.NUI.Binding -{ - internal sealed class MergedStyle : IStyle - { - ////If the base type is one of these, stop registering dynamic resources further - ////The last one (typeof(Element)) is a safety guard as we might be creating VisualElement directly in internal code - static readonly IList s_stopAtTypes = new List { typeof(View), typeof(Element) }; - - IList _classStyleProperties; - - readonly List _implicitStyles = new List(); - - IList