public ResourceValueModel(ResourceEntryItem resourceItem, DesignerContext designerContext) { this.resourceItem = resourceItem; this.helper = new PropertyEditingHelper(this.resourceItem.Container.Document, (UIElement)null); this.objectSet = new ResourceValueObjectSet(resourceItem, designerContext, (IPropertyInspector)this); this.valueProperty = this.objectSet.CreateSceneNodeProperty(new PropertyReference((ReferenceStep)resourceItem.Container.ProjectContext.ResolveProperty(DictionaryEntryNode.ValueProperty)), TypeUtilities.GetAttributes(resourceItem.Resource.TargetType)); this.valueProperty.PropertyValue.PropertyValueException += new EventHandler <PropertyValueExceptionEventArgs>(this.OnPropertyValueException); }
internal EditResourceDialog(DesignerContext designerContext) { this.designerContext = designerContext; this.Title = StringTable.EditResourceDialogTitle; this.transactionHelper = new PropertyEditingHelper((UIElement)this); this.CommandBindings.Add(new CommandBinding((ICommand)PropertyValueEditorCommands.FinishEditing, new ExecutedRoutedEventHandler(this.OnPropertyContainerCommandsFinishEditing))); PropertyInspectorHelper.SetOwningPropertyInspectorModel((DependencyObject)this, (IPropertyInspector)this); PropertyInspectorHelper.SetOwningPropertyInspectorElement((DependencyObject)this, (UIElement)this); ValueEditorUtils.SetHandlesCommitKeys((DependencyObject)this, true); this.InitializeComponent(); }
public ResourceEditorControl(DesignerContext designerContext, SceneNodeProperty editingProperty) { this.designerContext = designerContext; this.editingProperty = editingProperty; this.resourceModel = this.BuildResourceModelFromPropertyReference(); this.editingValue = this.resourceModel.EditorValue; this.transactionHelper = new PropertyEditingHelper(this.resourceModel.Document, (UIElement)this); this.DataContext = (object)this; this.CommandBindings.Add(new CommandBinding((ICommand)PropertyValueEditorCommands.FinishEditing, new ExecutedRoutedEventHandler(this.OnFinishEditing))); PropertyInspectorHelper.SetOwningPropertyInspectorModel((DependencyObject)this, (IPropertyInspector)this); PropertyInspectorHelper.SetOwningPropertyInspectorElement((DependencyObject)this, (UIElement)this); this.InitializeComponent(); }
private static void OnShowExtendedPinnedEditor(object sender, ExecutedRoutedEventArgs eventArgs) { PropertyContainer propertyContainer = PropertyEditingHelper.GetPropertyContainer(eventArgs.OriginalSource); if (propertyContainer == null) { return; } if (propertyContainer.PropertyEntry != null && !(propertyContainer.PropertyEntry is ResourcePaneSceneNodeProperty)) { propertyContainer.ActiveEditMode = PropertyContainerEditMode.ExtendedPinned; } eventArgs.Handled = true; }
public VisualStateTransitionEditor(VisualStateTransitionSceneNode sceneNode) { this.sceneNode = sceneNode; this.helper = new PropertyEditingHelper(this.sceneNode.DesignerContext.ActiveDocument, (UIElement)null); this.transitionSet = new VisualTransitionObjectSet(sceneNode, this); }