المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Getting data from a Listbox controlled by WPF and XML



C# Programming
09-23-2009, 12:30 AM
Hi there,
I am quite new to C# and WPF especially. I have a form, with 2 listboxes on. The first looks up an xml file and gets some data items (themes), the next listbox is bound to the first, and gets some data (scenes) from inside the selected theme tag.

This works wonderfully.

I would now like to get the value of an element (FreeStyleCue) and use that in a c# function tied to the OnSelectionChanged handler.

However I cant work out for the life of me how to get the information from the FreeStyleCue tag.

Can anyone help me??

Here is the xml file.


</span span class="code-SummaryComment"version/spanspan class="code-keyword"="/spanspan class="code-keyword"1.0"/span span class="code-SummaryComment"encoding/spanspan class="code-keyword"="/spanspan class="code-keyword"utf-8"/span span class="code-SummaryComment"?/spanspan class="code-SummaryComment">



For before the show yellow.
y12


During yellow show
y122




For before the show
b12


During Show
b122





Here is the WPF XAML file



























































and the code that is asking for the data


private void listboxScenes_SelectionChanged(object sender, SelectionChangedEventArgs e)
{


SelectQueueInFS(SelectionID); //this is where i am stuck!!!
}