Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I have two suggestions which are quick and don't require heavy modification to the <code>ListPicker</code> control...</p> <p>1) <strong>Use the phone's accent colour</strong> as an <code>OpacityMask</code> with the image...</p> <pre class="lang-xml prettyprint-override"><code>&lt;toolkit:ListPicker.ItemTemplate&gt; &lt;DataTemplate&gt; &lt;StackPanel Orientation="Horizontal"&gt; &lt;Rectangle Fill="{StaticResource PhoneAccentBrush}" Height="40" Width="40"&gt; &lt;Rectangle.OpacityMask&gt; &lt;ImageBrush ImageSource="{Binding Icon}" /&gt; &lt;/Rectangle.OpacityMask&gt; &lt;/Rectangle&gt; &lt;TextBlock Text="{Binding Name}" /&gt; &lt;/StackPanel&gt; &lt;/DataTemplate&gt; &lt;/toolkit:ListPicker.ItemTemplate&gt; </code></pre> <p>If the icon uses the accent colour, it will be visible on either a black or white background.</p> <p>2) <strong>Change the background colour of the ListPicker's highlighted state</strong> so that it's white when using the Light theme (default) and black when using the Dark theme (different from the default). I also changed the Foreground colour.</p> <pre class="lang-xml prettyprint-override"><code>&lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="UserControl" Storyboard.TargetProperty="Foreground" Duration="0"&gt; &lt;DiscreteObjectKeyFrame Value="{StaticResource PhoneForegroundBrush}" KeyTime="0"/&gt; &lt;/ObjectAnimationUsingKeyFrames&gt; &lt;ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border" Storyboard.TargetProperty="Background" Duration="0"&gt; &lt;DiscreteObjectKeyFrame Value="{StaticResource PhoneBackgroundColor}" KeyTime="0"/&gt; &lt;/ObjectAnimationUsingKeyFrames&gt; </code></pre> <p>Changing a control's theme like this should not cause submission problems as long as the control is a) still usable and b) works on Dark and Light themes.</p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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