2 using System.ComponentModel;
3 using System.Reflection;
4 using Tizen.NUI.BaseComponents;
5 using Tizen.NUI.UIComponents;
10 internal class AttributeTableBuilder : Microsoft.Windows.Design.Metadata.AttributeTableBuilder
12 private void AddAttributesForTypes()
14 Type typeFromHandle = typeof(ContentPage);
15 typeFromHandle = typeof(PushButton);
16 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
17 typeFromHandle = typeof(ContentPage);
18 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
19 AddTypeAttributes(typeFromHandle, new global::System.Windows.Markup.ContentPropertyAttribute("Content"));
20 typeFromHandle = typeof(TextEditor);
21 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
22 typeFromHandle = typeof(FlexContainer);
23 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
24 typeFromHandle = typeof(ImageView);
25 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
26 typeFromHandle = typeof(TextLabel);
27 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
28 typeFromHandle = typeof(TextField);
29 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
30 typeFromHandle = typeof(ProgressBar);
31 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
32 typeFromHandle = typeof(ScrollView);
33 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
34 typeFromHandle = typeof(ScrollBar);
35 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
36 typeFromHandle = typeof(Slider);
37 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
38 typeFromHandle = typeof(TableView);
39 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
40 typeFromHandle = typeof(View);
41 AddTypeAttributes(typeFromHandle, new EditorBrowsableAttribute(EditorBrowsableState.Always));
42 AddTypeAttributes(typeFromHandle, new global::System.Windows.Markup.ContentPropertyAttribute("Children"));
45 [EditorBrowsable(EditorBrowsableState.Never)]
46 public AttributeTableBuilder() : base()
48 Assembly assembly = typeof(View).Assembly;
49 AddAssemblyAttributes(assembly, new global::System.Windows.Markup.XmlnsDefinitionAttribute("http://tizen.org/Tizen.NUI/2018/XAML", "Tizen.NUI"));
50 AddAssemblyAttributes(assembly, new global::System.Windows.Markup.XmlnsDefinitionAttribute("http://tizen.org/Tizen.NUI/2018/XAML", "Tizen.NUI.BaseComponents"));
51 AddAssemblyAttributes(assembly, new global::System.Windows.Markup.XmlnsDefinitionAttribute("http://tizen.org/Tizen.NUI/2018/XAML", "Tizen.NUI.UIComponents"));
52 AddAssemblyAttributes(assembly, new global::System.Windows.Markup.XmlnsDefinitionAttribute("http://tizen.org/Tizen.NUI/2018/XAML", "Tizen.NUI.Xaml"));
53 AddAttributesForTypes();
56 private void AddTypeAttributes(Type type, params Attribute[] attribs)
58 this.AddCallback(type, builder => builder.AddCustomAttributes(attribs));
61 private void AddMemberAttributes(Type type, string memberName, params Attribute[] attribs)
63 this.AddCallback(type, builder => builder.AddCustomAttributes(attribs));
66 private void AddAssemblyAttributes(Assembly assembly, params Attribute[] attribs)
68 this.AddCustomAttributes(assembly, attribs);