I have this code and i now want to add items to my listbox in this format, my data i'm getting is from a xml code which I'm reading from my vb.net code
Code:<Windows.Resource> <DataTemplate x:Key="EmployeeDataTemplate"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="60"/> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Border Margin="5" BorderBrush="Black" BorderThickness="1"> <Image Source="{Binding Path=Image}" Stretch="Fill" Width="50" Height="50" /> </Border> <StackPanel Grid.Column="1" Margin="5"> <StackPanel Orientation="Horizontal" TextBlock.FontWeight="Bold" > <TextBlock Text="{Binding Path=Firstname, FallbackValue=FirstName}" /> <TextBlock Text="{Binding Path=Lastname, FallbackValue=LastName}" Padding="3,0,0,0"/> </StackPanel> <TextBlock Text="{Binding Path=Age, FallbackValue=Age}" /> <TextBlock Text="{Binding Path=Role, FallbackValue=Role}" /> </StackPanel> </Grid> </DataTemplate> </Windows.Resource> <Listbox> .. </Listbox>


Reply With Quote
)
