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"); }
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"); }
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); }