Exemplo n.º 1
0
        public MainPage()
        {
            this.InitializeComponent();
            IEnumerable <PropertyInfo> propertyinfos = typeof(Colors).GetTypeInfo().DeclaredProperties;

            foreach (PropertyInfo pInfo in propertyinfos)
            {
                ColorItemCtrl ctrl = new ColorItemCtrl(pInfo.Name, (Color)pInfo.GetValue(null));
                wrapGrid.Children.Add(ctrl);
            }
        }
Exemplo n.º 2
0
        public MainPage()
        {
            this.InitializeComponent();
            IEnumerable <PropertyInfo> properties = typeof(Colors).GetTypeInfo().DeclaredProperties;

            foreach (PropertyInfo property in properties)
            {
                Color         clr     = (Color)property.GetValue(null);
                ColorItemCtrl clrItem = new ColorItemCtrl(property.Name, clr);
                MainStackPanel.Children.Add(clrItem);
            }
        }