private void OnPropertyMarkerCommandsLocalResourceCommand(object sender, ExecutedRoutedEventArgs eventArgs) { SceneNodeProperty associatedProperty = this.AssociatedProperty; if (associatedProperty != null) { using (WorkaroundPopup.LockOpen((DependencyObject)this)) { associatedProperty.DoSetToLocalResource((LocalResourceModel)eventArgs.Parameter); PropertyMarker.ResetPropertyContainerMode((RoutedEventArgs)eventArgs); } } eventArgs.Handled = true; }
public void OnResourceSelected(object parameter) { VirtualizingResourceItem <SystemResourceModel> virtualizingResourceItem1 = parameter as VirtualizingResourceItem <SystemResourceModel>; VirtualizingResourceItem <LocalResourceModel> virtualizingResourceItem2 = parameter as VirtualizingResourceItem <LocalResourceModel>; SceneNodeProperty sceneNodeProperty = this.editingProperty; if (sceneNodeProperty == null) { return; } if (virtualizingResourceItem1 != null) { sceneNodeProperty.DoSetToSystemResource(virtualizingResourceItem1.Model.PropertyModel); } else { if (virtualizingResourceItem2 == null) { return; } sceneNodeProperty.DoSetToLocalResource(virtualizingResourceItem2.Model.PropertyModel); } }