title: ListBox with Rounded Corners (Windows Store App)
body: <p>I have a <code>ListBox</code> inside a <code>Flyout</code>. Is there any way of making my <code>ListBox</code> corners rounded? I have searched and I couldn't find anything. Is there any style/<code>Xaml</code> template you recommend? </p>
  
  <p>This is my code:</p>
  
  <pre><code>    &lt;Flyout&gt;
          &lt;Flyout.FlyoutPresenterStyle&gt;
            &lt;Style TargetType="FlyoutPresenter"&gt;
               &lt;Setter Property="Margin" Value="30,30,0,0"/&gt;
               &lt;Setter Property="Background" Value="Transparent"/&gt;
               &lt;Setter Property="BorderBrush" Value="Transparent"/&gt;
               &lt;Setter Property="BorderThickness" Value="0"/&gt;
               &lt;Setter Property="MinHeight" Value="300"/&gt;
               &lt;Setter Property="MinWidth" Value="200"/&gt;
             &lt;/Style&gt;
          &lt;/Flyout.FlyoutPresenterStyle&gt;
  
  
          &lt;ListBox x:Name="AllItemsView" Width="200" Height="auto" BorderThickness="0" VerticalAlignment="Top" Foreground="Black" Background="White" Grid.RowSpan="2" ItemsSource="{Binding}" SelectionMode="Single" SelectionChanged="AllItemsView_SelectionChanged"&gt;
             &lt;ListBox.Resources&gt;
                &lt;Style TargetType="Border"&gt;
  
                   &lt;Setter Property="CornerRadius" Value="20,20,20,20"/&gt;
                   &lt;Setter Property="BorderBrush" Value="BlueViolet"/&gt;
                   &lt;Setter Property="BorderThickness" Value="7"/&gt;
                   &lt;Setter Property="Padding" Value="5"/&gt;
                 &lt;/Style&gt;
  
              &lt;/ListBox.Resources&gt;
              &lt;ListBox.ItemContainerStyle&gt;
                 &lt;Style TargetType="ListBoxItem"&gt;
                     &lt;Setter Property="Padding" Value="0"/&gt;
                     &lt;Setter Property="BorderThickness" Value="1"/&gt;
                 &lt;/Style&gt;
  
            &lt;/ListBox.ItemContainerStyle&gt;
  
             &lt;ListBox.ItemTemplate&gt;
                &lt;DataTemplate&gt;
  
                 &lt;Grid Width="200" Height="40" Margin="0,0,0,0" Name="colorGrid"&gt;
                 &lt;Grid.Background&gt;
                     &lt;SolidColorBrush Color="{Binding ItemType, Mode=OneWay, Converter={StaticResource ItemTypeToColorConverter1}}" /&gt;
  
  
                 &lt;/Grid.Background&gt;
                 &lt;StackPanel x:Name="StackItem"&gt;
                    &lt;TextBlock Text="{Binding ItemTitle}" FontWeight="{Binding ItemType, Converter={StaticResource itemTypeToBoldConverter1}}" Margin="{Binding ItemType, Converter={StaticResource itemTypeToMarginConverter1}}" /&gt;
                    &lt;TextBlock Text="{Binding ItemPage}" Visibility="Collapsed"/&gt;
                 &lt;/StackPanel&gt;
  
                 &lt;/Grid&gt;
  
              &lt;/DataTemplate&gt;
  
            &lt;/ListBox.ItemTemplate&gt;
  
        &lt;/ListBox&gt;
  
   &lt;/Flyout&gt;
  </code></pre>