Breaking Change BC1964
Visible to All Users

From now on, use asterisk instead of a dot as an unknown property placeholder when defining PropertyDefinition.Path to specify a path to a nested object's properties.

To only show the ListBox.Items collection and the Content property for each item in the collection in a PropertyGridControl, do the following:

  1. Set the ShowProperties option to WithPropertyDefinitions.
  2. Define a CollectionDefinition with the Path set to 'Items'.
  3. Define a PropertyDefinition with the Path set to '*.Content'. The asterisk character '*' identifies an indexer [] that does not have a constant name. The path to nested properties is different for different collection items: '[0].Content', '[1].Content', etc.
    The following example illustrates a PropertyGridControl bound to a ListBox control.

<para><code lang="xaml"> <dxprg:PropertyGridControl ShowProperties="WithPropertyDefinitions">
            <dxprg:PropertyGridControl.SelectedObject>
                <ListBox>
                    <ListBox.Items>
                        <ListBoxItem Content="First"/>
                        <ListBoxItem Content="Second"/>
                    </ListBox.Items>
                </ListBox>
            </dxprg:PropertyGridControl.SelectedObject>
            <dxprg:CollectionDefinition Path="Items">
                <dxprg:PropertyDefinition Path="*.Content"/>
            </dxprg:CollectionDefinition>
        </dxprg:PropertyGridControl>

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.