Reputation: 2291
I have a ListPicker which is filled dynamically in code. How can I set style of every ListPickerItem which has been added from code? Or how can I set style of future items of ListPicker in XAML?
Thanks.
Upvotes: 0
Views: 896
Reputation: 3529
Try this =>
yourListPickerItem.Style = (Style)FindResource("NameOfYourStyle");
EDIT : Silverlight does not implement the FindResource method that exists in the WPF framework API. So, check http://blog.functionalfun.net/2011/01/findresource-implementation-for.html
Upvotes: 1