mardi 27 mai 2014

How to add list in vertical scrollBar using c# code


Vote count:

0




I am working on silverlight and i have to code in c# only not in xaml. I have a list liek this:



List<string> lines = new List<string>();
foreach (var item in param.Component.Attributes.Items)
{
lines.Add(item); //Here i add elements in list
}


and i have created a scrollbar like this : ScrollViewer scrollViewer = new ScrollViewer();


Now i want to display the list(so called lines here) in the scrollbar vertically. How to do that using c# only.


I tried a lot but just found the xaml codes but i have to use c# code only. How to implmement it in c# and then how to display the selected row(selected by the user when list is displayed) in a textbox near the list. Like this:


enter image description here User here selected 10 000 000 from the list and that is displayed in textblock. How to do that ?


Please note that i am using silverlight and have to code in c#. Thanks for the help.



asked 55 secs ago






Aucun commentaire:

Enregistrer un commentaire