<Page  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" >
    <Page.Resources>
        <LinearGradientBrush x:Key="listBoxBackground" StartPoint="0,0" EndPoint="1,1">
            <GradientStop Color="CornflowerBlue" Offset="0"/>
            <GradientStop Color="White" Offset="1"/>
        </LinearGradientBrush>
        <Button x:Key="redButton" Background="red"/>
    </Page.Resources>
    <ListBox Margin="10" >
        <ListBox.Background>
            <StaticResourceExtension ResourceKey="listBoxBackground"/>
        </ListBox.Background>
        <ListBoxItem>Element1</ListBoxItem>
        <ListBoxItem>Element2</ListBoxItem>
        <ListBoxItem>Element3</ListBoxItem>
    </ListBox>
</Page>