Ejemplo n.º 1
0
        private void OnPropertyMarkerCommandsSystemResourceCommand(object sender, ExecutedRoutedEventArgs eventArgs)
        {
            SceneNodeProperty associatedProperty = this.AssociatedProperty;

            if (associatedProperty != null)
            {
                using (WorkaroundPopup.LockOpen((DependencyObject)this))
                {
                    associatedProperty.DoSetToSystemResource((SystemResourceModel)eventArgs.Parameter);
                    PropertyMarker.ResetPropertyContainerMode((RoutedEventArgs)eventArgs);
                }
            }
            eventArgs.Handled = true;
        }
Ejemplo n.º 2
0
        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);
            }
        }