TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
RIck Mueller
NA
47
0
xmlDataProvider Issues
Feb 20 2010 7:23 PM
This is what I have, I not able to populate the listbox. Any Help?
This is wht I have in my Window.Resources
<XmlDataProvider x:Key="Recipe"
Source="/Database/Recipe.xml"
XPath="Tables/Table"/>
<CollectionViewSource x:Key="CallRecipes"
Source="{StaticResource Recipe}">
<CollectionViewSource.SortDescriptions>
<scm:SortDescription PropertyName="Station"
Direction="Ascending"/>
</CollectionViewSource.SortDescriptions>
</CollectionViewSource>
This is my XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<NewDataSet1 xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance
">
<Table>
<RecipeID>117</RecipeID>
<RecipeName>16/20 Shrimp</RecipeName>
<RecipeCount>Box</RecipeCount>
<RecipeYield>3</RecipeYield>
<ShelveLife>4</ShelveLife>
<PrepTime>0.00347222222222222</PrepTime>
<Station>PULL</Station>
<RecipeCost>3</RecipeCost>
</Table>
This is what I'm using to bind to the listbox
<ListBox HorizontalAlignment="Right" Margin="0,74,42,87.833"
DisplayMemberPath="Station"
ItemsSource="{Binding Source={StaticResource CallRecipes}}"
Width="305"/>
Where did I go wrong?
Thanks
Reply
Answers (
5
)
Dynamic Resource Style in WPF
Problem controlling size of Ribbon Textbox