Alex
Alex

Reputation: 11157

set panoramaItem list background image

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?

Upvotes: 0

Views: 561

Answers (1)

Justin XL
Justin XL

Reputation: 39006

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>

Upvotes: 1

Related Questions