コード例 #1
0
        protected virtual void OnGuidCommandCanExecute(object sender, CanExecuteRoutedEventArgs e)
        {
            var property = PropertyGridProperty.FromEvent(e);

            if (property != null && (property.PropertyType == typeof(Guid) || property.PropertyType == typeof(Guid?)))
            {
                e.CanExecute = true;
            }
        }
コード例 #2
0
        protected virtual void OnBrowseCommandExecuted(object sender, ExecutedRoutedEventArgs e)
        {
            var browse = new RoutedEventArgs(BrowseEvent, e.OriginalSource);

            RaiseEvent(browse);
            if (browse.Handled)
            {
                return;
            }

            var property = PropertyGridProperty.FromEvent(e);

            if (property != null)
            {
                property.Executed(sender, e);
                if (!e.Handled)
                {
                    ShowEditor(property, e.Parameter);
                }
            }
        }