Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
How to bind a property to an attribute of a Field ? Such as Visibility
posted

I have a collection to display by using XamDataGrid. The collection has at most two hierarchies. But I don't want to always show the expansion indicator for those records which hasn't any children.

Each item of my collection has a bool property to indicate whether it has children. So, I want to bind this property to the Visibility attribute of a Field.  Like bellow.

                                                <Custom:Field Name="StructMembers" Label="Element"
                                                              Visibility="{Binding Path=IsStruct, Converter={StaticResource theBoolToVisConverter}}" >
                                                    <Custom:Field.Settings >
                                                        <Custom:FieldSettings AllowEdit="False" />
                                                    </Custom:Field.Settings>
                                                </Custom:Field>

 But it doesn't work. Maybe the binding source isn't correct, I think. Anyone can help me ?