verson: 2014.3.1021.40
xaml:
<telerik:RadPropertyGrid x:Name="grdTestProperty" Item="{Binding TestProperty, Mode=OneWay}" SearchBoxVisibility="Collapsed" SearchInNestedProperties="False" FieldIndicatorVisibility="Visible" AutoGeneratePropertyDefinitions="True" NestedPropertiesVisibility="Visible" LabelColumnWidth="110" RenderMode="Flat" AutoGeneratingPropertyDefinition="grdTestProperty_AutoGeneratingPropertyDefinition" />
Code Behind:
private void grdTestProperty_AutoGeneratingPropertyDefinition(object sender, Telerik.Windows.Controls.Data.PropertyGrid.AutoGeneratingPropertyDefinitionEventArgs e) { // Encounter this warning when set IsExpanded = true: e.PropertyDefinition.IsExpanded = true; }
Nested Property:
[DataMember()][Browsable(true)][Display(Order = 5, GroupName = "PropGroup_Electrical", Name = "PropName_ElecItem", Description = "PropDesc_ElecItem", ResourceType = typeof(UIStringTable))]public ElectricalTestItem ElecItem{ get { return m_ElecItem; } private set { m_ElecItem = value; NotifyOfPropertyChange(() => ElecItem); }}
Warning:
System.Windows.Data Error: 4 : Cannot find source for binding with reference 'RelativeSource FindAncestor, AncestorType='Telerik.Windows.Controls.RadPropertyGrid', AncestorLevel='1''. BindingExpression:Path=FieldIndicatorVisibility; DataItem=null; target element is 'Grid' (Name='FieldIndicator'); target property is 'Visibility' (type 'Visibility')