Example #1
0
        internal static KeyedControls ParseXmlMenu(this XElement element, ViewModelFactory factory)
        {
            var controls = new KeyedControls();

            foreach (var child in element.Elements())
            {
                var x = ParseXmlChild(child, factory);
                if (x != null)
                {
                    controls.Add(x);
                }
            }

            return(controls);
        }
Example #2
0
        public ViewModelFactory(string key)
        {
            Key              = key;
            _controls        = new Dictionary <string, IControlVM>();
            _editables       = new Dictionary <string, IEditableVM>();
            _sizeables       = new Dictionary <string, ISizeableVM>();
            _imageables      = new Dictionary <string, IImageableVM>();
            _clickables      = new Dictionary <string, IClickableVM>();
            _toggleables     = new Dictionary <string, IToggleableVM>();
            _selectItems     = new Dictionary <string, ISelectItemsVM>();
            _selectables     = new Dictionary <string, ISelectablesVM>();
            _dynamicMenus    = new Dictionary <string, IDynamicMenuVM>();
            _gallerySizes    = new Dictionary <string, IGallerySizeVM>();
            _menuSeparators  = new Dictionary <string, IMenuSeparatorVM>();
            _descriptionable = new Dictionary <string, IDescriptionableVM>();

            ViewModelRoot = new KeyedControls();
        }