<Table> <CompanyName>Digital Kitchen1</CompanyName> <Location>Eden Prairie1</Location> <ContactName>Rick Mueller</ContactName> <ContactTitle>PrepCook</ContactTitle> <EmpImage>male.jpg</EmpImage> <StDate>15664</StDate> <EmpId>156</EmpId> </Table>
xmlns:local="clr-namespace:Digital_Kitchen_CdrPrint"
<local:ImageConverter x:Key="ImageConverter" />
<ListBox x:Name="EmployeeDataList" ScrollViewer.VerticalScrollBarVisibility="Hidden" 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" > <ListBox.RenderTransform> <TransformGroup> <ScaleTransform/> <SkewTransform/> <RotateTransform/> <TranslateTransform/> </TransformGroup> </ListBox.RenderTransform> <ListBox.GroupStyle> <GroupStyle ContainerStyle="{StaticResource ContainerStyle1}"/> </ListBox.GroupStyle> <ListBox.ItemTemplate>
<XmlDataProvider x:Key="Contact" Source="/Digital Kitchen CdrPrint;component/Database/Employee.xml" XPath="NewDataSet/Table"/> <CollectionViewSource x:Key="Employees" Source="{StaticResource Contact}"> <CollectionViewSource.SortDescriptions> <scm:SortDescription PropertyName="ContactTitle" Direction="Ascending"/> </CollectionViewSource.SortDescriptions> <CollectionViewSource.GroupDescriptions> <PropertyGroupDescription PropertyName="ContactTitle"/> </CollectionViewSource.GroupDescriptions> </CollectionViewSource>
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();}}