Hello i have the following listView :
<ListView x:Name="SongList" HorizontalAlignment="Left" Visibility="Visible" Height="615" Background="White"
Opacity="0.5" SelectedValue="selectedFile"
ItemsSource="{Binding MediaModels.MediaPlaybackItemsList , UpdateSourceTrigger=PropertyChanged}"
Margin="986,105,0,0" VerticalAlignment="Top" Width="294">
So in my itemSource i bind a list of MediaPlaybackItem .Thats fine everything works good except i dont know how to bind the artist and title for each mediaplayback item to the dataTemplate :
<DataTemplate>
<StackPanel Orientation="Horizontal">
<Border BorderBrush="#404040" BorderThickness="0,0,0,2" HorizontalAlignment="Stretch"
Width="282" Height="80">
<Grid HorizontalAlignment="Left">
<TextBlock Text="{Binding GetDisplayProperties().MusicProperties.Artist}" TextWrapping="WrapWholeWords"
Margin="82,10,10,0" />
<Grid Margin="0,0,-140,0">
<Image Source="Images/Album.png" Width="70" Height="70" Margin="0,0,350,0" />
</Grid>
</Grid>
</Border>
</StackPanel>
</DataTemplate>
THe MediaPlaybacKItem
class has method GetDisplayProperties().MusicProperties.Artist/Title/
etc. which returns string
. I can access these properties
only through this GetDisplayProperties
method , so how can i bind the result of it in data Template ?