コード例 #1
0
 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);
 }
コード例 #2
0
 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();
 }
コード例 #3
0
 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();
 }
コード例 #4
0
        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;
        }
コード例 #5
0
 public VisualStateTransitionEditor(VisualStateTransitionSceneNode sceneNode)
 {
     this.sceneNode     = sceneNode;
     this.helper        = new PropertyEditingHelper(this.sceneNode.DesignerContext.ActiveDocument, (UIElement)null);
     this.transitionSet = new VisualTransitionObjectSet(sceneNode, this);
 }