This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I've tried to implement Reset button on the PropertyGrid and I have the following exception in this code:
//… var row = (Mindscape::PropertyGridRow)e.Parameter; e.CanExecute = row.Node.Property.AsPropertyDescriptor.CanResetValue(row.Node.Source); System.NotImplementedException occurredHow I can implement a Reset button (for resetting property values)? May be, it is a good idea for implement this functionality by PropertyGrid naturally? ;о) |
|
|
I assume you are talking about a multiple selection scenario? In that case, send the ManyEditor.ResetCommand with a parameter of the edited object: <Button Command="{x:Static local:ManyEditor.ResetCommand}" CommandParameter="{Binding}" /> And bind the command to handlers such as these: private void ResetCommand_CanExecute(object sender, CanExecuteRoutedEventArgs e) Alternatively, if you are implementing your own command which will receive a PropertyGridRow, as shown in your sample code, cast row.Node.Value to Many, and call Reset on the resulting Many. |
|