Hello
Currently I have a listbox in the mainwindow basic XML Databinding no issues. When I put the same Listbox on a page.xml, the image doesn't bind.
Here Is my code:
XML Data
Digital Kitchen1 Eden Prairie1 Rick Mueller PrepCook male.jpg 15664 156
|
Here is my xaml
xmlns:local="clr-namespace:Digital_Kitchen_CdrPrint"
ItemsSource="{Binding Source={StaticResource Employees}}" SelectionChanged="RecBOX_SelectionChanged" BorderBrush="{x:Null}" Margin="-97.152,17.488,-20.787,51.345" RenderTransformOrigin="0.5,0.5" >
|
Here is my XmlDataProvider
Source="/Digital Kitchen CdrPrint;component/Database/Employee.xml" XPath="NewDataSet/Table"/> Source="{StaticResource Contact}">
|
Again it works like a champ in the mainwindow xaml. But when its in the page xaml the image is the only element not binding..
I tried a ImageConverter
public sealed class ImageConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { try { return new BitmapImage(new Uri((string)value)); } catch { return new BitmapImage(); } } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } }
|
Any thoughts.
Replies
Know the answer? Post it — somebody with the same question will find it here.