Пример #1
0
        public DynamicPanelViewModel(IWidget widget)
        {
            _model                      = new DynamicPanelModel(widget, false);
            _widget                     = widget;
            _bSupportBorder             = false;
            _bSupportBackground         = false;
            _bSupportText               = false;
            _bSupportTextVerAlign       = false;
            _bSupportTextHorAlign       = false;
            _bSupportGradientBackground = false;
            _bSupportGradientBorderline = false;
            _bSupportRotate             = false;
            _bSupportTextRotate         = false;

            widgetGID         = widget.Guid;
            Type              = ObjectType.DynamicPanel;
            IsChildPageOpened = (_model as DynamicPanelModel).IsAnyChildrenPageOpen();

            NavigationChildren = new ObservableCollection <DynamicPanelIconNode>();
            NavigationChildren.CollectionChanged += DynamicChildren_CollectionChanged;
            ViewItems = new ObservableCollection <DynamicPanelIconNode>();
            _ListEventAggregator.GetEvent <RefreshWidgetChildPageEvent>().Subscribe(RefreshWidgetPageUIHandler);
            _ListEventAggregator.GetEvent <CloseWidgetPageEvent>().Subscribe(CloseWidgetPageHandler);
            LoadChildrenIconNode();
        }
Пример #2
0
 public DynamicPanelPreViewModel(IWidget widget)
     : base(widget)
 {
     _model             = new DynamicPanelModel(widget, true);
     NavigationChildren = new ObservableCollection <DynamicPanelIconNode>();
     ViewItems          = new ObservableCollection <DynamicPanelIconNode>();
     _widget            = widget as IDynamicPanel;
     IsImgConvertType   = false;
     LoadChildrenIconNode();
     (_model as DynamicPanelModel).LoadAllChildrenWidgets();
 }