Alex
Alex

Reputation: 11147

dynamically adding a template and binding data

i have a ScrollViewer and wish to add a image, some text and then multiple template items. How can i add a template item that i have stored in <Application.Resources> and bind data to it?

Something like(the code is meant to be informative only) :

    StackPanel sp = new StackPanel();
    sp.AddTemplate("TemplateNameFromResources");
    sp.BindToData(obj);

Upvotes: 1

Views: 124

Answers (1)

Apoorva
Apoorva

Reputation: 1047

http://msdn.microsoft.com/en-us/library/ff431744(v=vs.92).aspx in this link there is a code by name globalization they have used resource file and bound it to list box or something check out it might help

Upvotes: 1

Related Questions