With xaml
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="321*" />
<ColumnDefinition Width="335*" />
</Grid.ColumnDefinitions>
<StackPanel>
<Button Margin="5" GotFocus="GotFocus">Test</Button>
<TextBox Margin="5" GotFocus="GotFocus">text</TextBox>
</StackPanel>
<telerik:RadPropertyGrid x:Name="pg" Grid.Column="1"
LabelColumnWidth="100" IsGrouped="True" AutoGeneratePropertyDefinitions="True"
telerik:StyleManager.Theme="Vista"/>
</Grid>
and code
private void GotFocus(object sender, RoutedEventArgs e)
{
pg.Item = sender;
}
if you switch between controls than you see errors like this
System.Windows.Data Error: 40 : BindingExpression path error: 'ClickMode' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=ClickMode; DataItem='TextBox' (Name=''); target element is 'RadComboBox' (Name=''); target property is 'SelectedValue' (type 'Object')
System.Windows.Data Error: 40 : BindingExpression path error: 'Command' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=Command; DataItem='TextBox' (Name=''); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
System.Windows.Data Error: 40 : BindingExpression path error: 'CommandParameter' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=CommandParameter; DataItem='TextBox' (Name=''); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
System.Windows.Data Error: 40 : BindingExpression path error: 'CommandTarget' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=CommandTarget; DataItem='TextBox' (Name=''); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
Because the propertygrid do not clear bindings after change selected item.
The version is 2011.3.1330.40 Dev
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="321*" />
<ColumnDefinition Width="335*" />
</Grid.ColumnDefinitions>
<StackPanel>
<Button Margin="5" GotFocus="GotFocus">Test</Button>
<TextBox Margin="5" GotFocus="GotFocus">text</TextBox>
</StackPanel>
<telerik:RadPropertyGrid x:Name="pg" Grid.Column="1"
LabelColumnWidth="100" IsGrouped="True" AutoGeneratePropertyDefinitions="True"
telerik:StyleManager.Theme="Vista"/>
</Grid>
and code
private void GotFocus(object sender, RoutedEventArgs e)
{
pg.Item = sender;
}
if you switch between controls than you see errors like this
System.Windows.Data Error: 40 : BindingExpression path error: 'ClickMode' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=ClickMode; DataItem='TextBox' (Name=''); target element is 'RadComboBox' (Name=''); target property is 'SelectedValue' (type 'Object')
System.Windows.Data Error: 40 : BindingExpression path error: 'Command' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=Command; DataItem='TextBox' (Name=''); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
System.Windows.Data Error: 40 : BindingExpression path error: 'CommandParameter' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=CommandParameter; DataItem='TextBox' (Name=''); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
System.Windows.Data Error: 40 : BindingExpression path error: 'CommandTarget' property not found on 'object' ''TextBox' (Name='')'. BindingExpression:Path=CommandTarget; DataItem='TextBox' (Name=''); target element is 'TextBox' (Name=''); target property is 'Text' (type 'String')
Because the propertygrid do not clear bindings after change selected item.
The version is 2011.3.1330.40 Dev