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