Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Ok, so the reason for this strange behavior was a small change in the ListPickerItem style in Aug 2011 Silverlight Control Toolkit. </p> <p>This is how it looks in Aug 2011 release:</p> <pre><code>&lt;Style TargetType="controls:ListPickerItem"&gt; &lt;Setter Property="Background" Value="Transparent"/&gt; &lt;Setter Property="HorizontalContentAlignment" Value="Stretch"/&gt; &lt;Setter Property="Padding" Value="8 10"/&gt; &lt;Setter Property="Template"&gt; &lt;!-- More Stuff Here --&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre> <p>And this is how it looked in Feb 2011 release:</p> <pre><code>&lt;Style TargetType="controls:ListPickerItem"&gt; &lt;Setter Property="Background" Value="Transparent"/&gt; &lt;Setter Property="HorizontalContentAlignment" Value="Stretch"/&gt; &lt;Setter Property="Padding" Value="8 6"/&gt; &lt;Setter Property="Template"&gt; &lt;!-- More Stuff Here --&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre> <p>See the difference? They changed the ListPickerItem Padding to <strong>8 10</strong> in the new release and somehow that was causing the issue. Reverting to <strong>8 6</strong> fixes it. Don't ask me why.</p> <p>So in my project I didn't actually modified the control toolkit Generic.xaml file, but just modified the specific ListPicker resources to specify a new padding for the ListPickerItem style, like this:</p> <pre><code>&lt;toolkit:ListPicker Name="TheListPicker" ItemsSource="{Binding TheItems}" CacheMode="BitmapCache" FullModeHeader="{Binding Path=Resources.TheHeader, Source={StaticResource LocalizedStrings }}" SelectedIndex="{Binding TheCurrentIndex, Mode=TwoWay}" IsEnabled="{Binding IsViewEnabled}" TabIndex="0" &gt; &lt;toolkit:ListPicker.Resources&gt; &lt;Style TargetType="toolkit:ListPickerItem"&gt; &lt;Setter Property="Padding" Value="8 6"/&gt; &lt;/Style&gt; &lt;/toolkit:ListPicker.Resources&gt; &lt;toolkit:ListPicker.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel Orientation="Horizontal" HorizontalAlignment="Center"&gt; &lt;TextBlock Text="{Binding Name}" FontFamily="{StaticResource PhoneFontFamilySemiBold}" FontSize="{StaticResource PhoneFontSizeMediumLarge}" /&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/toolkit:ListPicker.ItemTemplate&gt; &lt;toolkit:ListPicker.FullModeItemTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel x:Name="item" Orientation="Horizontal" Margin="5, 24, 0, 24"&gt; &lt;TextBlock Margin="15, 0, 0, 0" Text="{Binding Name}" FontSize="40" TextWrapping="Wrap" /&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/toolkit:ListPicker.FullModeItemTemplate&gt; &lt;/toolkit:ListPicker&gt; </code></pre> <p>Such a small change!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload