internal void OnConvertToColorResource(object arg)
        {
            SceneNodeProperty sceneNodeProperty = this.editingProperty;

            if (sceneNodeProperty == null || !sceneNodeProperty.IsEnabledMakeNewResource)
            {
                return;
            }
            sceneNodeProperty.DoConvertToResource();
        }
Example #2
0
        private void OnPropertyMarkerCommandsConvertToResourceCommand(object sender, ExecutedRoutedEventArgs eventArgs)
        {
            SceneNodeProperty associatedProperty = this.AssociatedProperty;

            if (associatedProperty != null)
            {
                using (WorkaroundPopup.LockOpen((DependencyObject)this))
                {
                    if (associatedProperty.DoConvertToResource())
                    {
                        PropertyMarker.ResetPropertyContainerMode((RoutedEventArgs)eventArgs);
                    }
                }
            }
            eventArgs.Handled = true;
        }