Click here to Skip to main content
15,662,893 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi All, I am new to WPF. I have created user control which contains ListView and 2 Buttons. In my windows application i will use this user control. My question is : I want to design listview which resides in Usercontrol from my windows application. I want to add gridview columns in usercontrol from windows application. Please help me. Regards Jegan
Updated 25-Nov-09 23:01pm

You can add a style dependency property to the user control, then set that style from your main app XAML. You can then set the style in the UserControl to that property on the UserControl by binding to it. You'll probably have to give the UserControl a name (or "x:Name") in the XAML so you can reference it by ElementName in your binding.
Share this answer
To anybody reading my previous answer, it made a lot more sense with the first version of this question (before the author changed the question). I'd have just modified that answer to say what I'm saying in this one, but a Code Project bug prevented me from doing so.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900