Exemplo n.º 1
0
        public static void ApplyMaterialDesignPack(UserControls.FormControl formControl)
        {
            var md = formControl.Resources.MergedDictionaries;

            MDPacks.ForEach(pack =>
            {
                var resourceDictionary = md.Any(dictionary => dictionary.Source.AbsoluteUri == pack);

                if (resourceDictionary == false)
                {
                    var mr1 = new ResourceDictionary
                    {
                        Source = new Uri(
                            pack,
                            UriKind.Absolute)
                    };
                    formControl.Resources.MergedDictionaries.Add(mr1);
                }
            });

            var BI = new BundledTheme
            {
                BaseTheme      = BaseTheme.Dark,
                PrimaryColor   = PrimaryColor.Grey,
                SecondaryColor = SecondaryColor.Orange
            };

            formControl.Resources.MergedDictionaries.Add(BI);
        }
Exemplo n.º 2
0
        private void ProcessRootClass(object rootClass, UserControls.FormControl formControl)
        {
            var processedRootClass = ProcessClass(rootClass);

            foreach (var uc in processedRootClass)
            {
                var parent = new UserControls.Card();

                parent.ControlGrid.Children.Add(uc);
                formControl.DisplayStackPanel.Children.Add(parent);
            }
        }
Exemplo n.º 3
0
 public Logic()
 {
     formControl = new UserControls.FormControl();
     Helpers.ApplyMaterialDesignPack(formControl);
 }