Passing additional arguments to user control inside the data template

Viewed 3157

This is the xaml code what i am using

  <GridView
        Grid.Row="0"
        x:Name="RootGrid"
        SelectionMode="None"
        IsItemClickEnabled="True"
        ItemsSource="{Binding RootListSource}">

        <GridView.ItemTemplate>
            <DataTemplate>
                <UserControl:TreeInfoControl/>
            </DataTemplate>
        </GridView.ItemTemplate>

    </GridView>

In this my user control, it contain another GridView that holds a different IEnumerable collection. What i am trying to achieve is i need to pass this collection through code. I tried this by adding a dependency property to the treecontrol but it is not working. So i am looking for a solution that enable passing the collection through xaml (somehow through the user control). I know it is possible to add that collection to my existing collection and bind that one. But for now i can't use that method.

1 Answers
Related