set panoramaItem list background image

571 Views Asked by At

How can i set a background image for a panoramaItem's ListBox ?

I have this panorama item :

 <controls:PanoramaItem Header="Shopping list"  >

<ListBox x:Name="List"  ItemsSource="{Binding rList}"  ItemTemplate="{StaticResource ListViewModelTemplate}"  >
</ListBox>

</controls:PanoramaItem>

and would like to have an image as the background for this list item ( a notebook image). How can i do so?

1

There are 1 best solutions below

0
On BEST ANSWER

You just need to set the ListBox's Background like this,

            <ListBox x:Name="List" ItemsSource="{Binding rList}" ItemTemplate="{StaticResource ListViewModelTemplate}"> 
                <ListBox.Background>
                    <ImageBrush Stretch="Fill" ImageSource="PanoramaBackground.png"/>
                </ListBox.Background>