none
How to use CollectionContainer as ItemsSource?

    Question

  • Hello,

    I have a small code sample that works fine

    <ContextMenu ItemsSource="{BindingPath=AvailableViews}">

    AvailableViews is an ObservableCollection.

    If I like to extend it in the following way it dosn't work, the contextMenue appears empty:

    <ContextMenu>
      <ContextMenu.ItemsSource>
        <CompositeCollection>
          <CollectionContainer Collection="{Binding Path=AvailableViews}" />
        </CompositeCollection>
      </ContextMenu.ItemsSource>
    </ContextMenu>
    

    My question is: Why doesn't work the second code snippet?

    Roy

    Thursday, March 24, 2011 9:30 AM

Answers

All replies