请参考以下代码:
- private void _propertyGrid_PropertyBoxAdded(object sender, C1.Silverlight.Extended.PropertyBoxChangedEventArgs e)
- {
- e.PropertyBox.GotFocus += new System.Windows.RoutedEventHandler(PropertyBox_GotFocus);
- }
- void PropertyBox_GotFocus(object sender, System.Windows.RoutedEventArgs e)
- {
- if (e.OriginalSource is C1.Silverlight.Extended.PropertyGrid.StringEditor)
- {
- label1.Content = (e.OriginalSource as C1.Silverlight.Extended.PropertyGrid.StringEditor).Text;
- }
- }
复制代码 |