locked
how to add different user Control in ItemDetailsPage in XAML

    General discussion

  • I have one assignment in which have to build one App in grid Layout. and this app include multiple small application like text editor, audio or video player etc. So how to complete this. I think, I should use user controls for text editor and other, and bring these user control on ItemDetailPage.xaml. but the problem is how to do this as there is multiple item and all item item has different user control. 

    I have tried in sampleDataSource.cs

    var group1 = new SampleDataGroup("App Type 1",
                    "App Title: 1",
                    "App Subtitle: 1",
                    "Assets/GroupImg1.png",
                    "Group Description: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus tempor scelerisque lorem in vehicula. Aliquam tincidunt, lacus ut sagittis tristique, turpis massa volutpat augue, eu rutrum ligula ante a ante");
            group1.Items.Add(new SampleDataItem("Group-1-Item-1",
                    "Notepad",
                    "Text editor",
                    "Assets/NotePad.png",
                    "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
                    new MyUserControl1(),
                    group1));
            group1.Items.Add(new SampleDataItem("Group-1-Item-2",
                    "Item Title: 2",
                    "Item Subtitle: 2",
                    "Assets/DarkGray.png",
                    "Item Description: Pellentesque porta, mauris quis interdum vehicula, urna sapien ultrices velit, nec venenatis dui odio in augue. Cras posuere, enim a cursus convallis, neque turpis malesuada erat, ut adipiscing neque tortor ac erat.",
                    new MyUserControl2(),
                    group1));

    In XAML file we can add User Controls by

    <local:MyUserControl1 x:Name="MyHelloWorldUserControl"/>
    so how to bind all user controls in particular item page. So, please give any suggestion on this scenario.

    thanks


    Saturday, July 19, 2014 10:00 AM

All replies