<Grid>
  <Grid.Resources>
    <x:ArrayExtension Type="{x:Type Brush}" x:Key="brushes">
      <SolidColorBrush Color="Blue" />
      <LinearGradientBrush StartPoint="0,0" EndPoint="0.8,1.5">
        <LinearGradientBrush.GradientStops>
          <GradientStop Color="Green" Offset="0" />
          <GradientStop Color="Cyan" Offset="1" />
        </LinearGradientBrush.GradientStops>
      </LinearGradientBrush>
      <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
        <LinearGradientBrush.GradientStops>
          <GradientStop Color="Black" Offset="0" />
          <GradientStop Color="Red" Offset="1" />
        </LinearGradientBrush.GradientStops>
      </LinearGradientBrush>
    </x:ArrayExtension>
  </Grid.Resources>

  <ListBox ItemsSource="{StaticResource brushes}" Name="myListBox">
    <ListBox.ItemTemplate>
      <DataTemplate>
        <Rectangle Fill="{Binding}" Width="100" Height="40" Margin="2" />
      </DataTemplate>
    </ListBox.ItemTemplate>
  </ListBox>
</Grid>

