Exemplo n.º 1
0
        public GenericPropertiesViewModel(LayerEditorViewModel editorVm) : base(editorVm)
        {
            LayerAnimations   = new BindableCollection <ILayerAnimation>(editorVm.LayerAnimations);
            OpacityProperties = new LayerDynamicPropertiesViewModel("Opacity", editorVm);

            SelectedLayerAnimation =
                LayerAnimations.FirstOrDefault(l => l.Name == editorVm.ProposedLayer.LayerAnimation?.Name) ??
                LayerAnimations.First(l => l.Name == "None");
        }
Exemplo n.º 2
0
        public KeyboardPropertiesViewModel(LayerEditorViewModel editorVm) : base(editorVm)
        {
            LayerAnimations = new BindableCollection <ILayerAnimation>(editorVm.LayerAnimations);

            HeightProperties    = new LayerDynamicPropertiesViewModel("Height", editorVm);
            WidthProperties     = new LayerDynamicPropertiesViewModel("Width", editorVm);
            OpacityProperties   = new LayerDynamicPropertiesViewModel("Opacity", editorVm);
            LayerTweenViewModel = new LayerTweenViewModel(editorVm);

            SelectedLayerAnimation =
                LayerAnimations.FirstOrDefault(l => l.Name == editorVm.ProposedLayer.LayerAnimation?.Name) ??
                LayerAnimations.First(l => l.Name == "None");
        }
Exemplo n.º 3
0
        public KeyboardPropertiesViewModel(IDataModel dataModel, LayerPropertiesModel properties)
            : base(dataModel)
        {
            var keyboardProperties = (KeyboardPropertiesModel)properties;

            ProposedProperties = GeneralHelpers.Clone(keyboardProperties);
            Brush = ProposedProperties.Brush.CloneCurrentValue();

            DataModelProps = new BindableCollection <GeneralHelpers.PropertyCollection>();
            DataModelProps.AddRange(GeneralHelpers.GenerateTypeMap(dataModel));

            HeightProperties  = new LayerDynamicPropertiesViewModel("Height", DataModelProps, keyboardProperties);
            WidthProperties   = new LayerDynamicPropertiesViewModel("Width", DataModelProps, keyboardProperties);
            OpacityProperties = new LayerDynamicPropertiesViewModel("Opacity", DataModelProps, keyboardProperties);
        }