Note that there are some explanatory texts on larger screens.

plurals
  1. POWPF pre-render a list w/o actually showing it
    primarykey
    data
    text
    <p>Is there a way to "pre-render" a list in WPF without actually showing it to the user? I have a list that renders fairly slowly ( a few seconds ) the first time it is displayed to the user. </p> <p>I'd like to pre-render/pre-draw the list so that the few seconds it takes to display the list to the users is not noticeable. I'd like this to happen while the app is starting up - while my splash screen is displayed.</p> <p>What is the best way to accomplish this?</p> <p>EDIT:</p> <p>Here is my list item style. As you can see the target type is a Button. The button also has a RoutedEvent (Command) set on it. </p> <pre><code>&lt;Style x:Key="Button_ProductFinder_Item" TargetType="Button"&gt; &lt;Setter Property="Control.Template"&gt; &lt;Setter.Value&gt; &lt;ControlTemplate TargetType="Button"&gt; &lt;Grid Width="690" Height="181" &gt; &lt;Image Name="Up" Source="{StaticResource Img_ProductFinder_FriendUp}" Stretch="Uniform"/&gt; &lt;Image Name="Down" Source="{StaticResource Img_ProductFinder_FriendDn}" Visibility="Hidden" Stretch="Uniform"/&gt; &lt;Canvas Name="Clip" ClipToBounds="True" Height="162" Width="175" HorizontalAlignment="Left" Margin="0,10,0,0" &gt; &lt;Image Name="DynamicFriend" Stretch="UniformToFill" Canvas.Left="16" Canvas.Top="-10" HorizontalAlignment="Left" Source="{Binding ImageSource}" Height="162" Width="162" /&gt; &lt;Canvas.RenderTransform&gt; &lt;TransformGroup&gt; &lt;TranslateTransform /&gt; &lt;/TransformGroup&gt; &lt;/Canvas.RenderTransform&gt; &lt;/Canvas&gt; &lt;TextBlock Name="DynamicName" Margin="210,69,0,0" Style="{StaticResource ButtonFriend_Textstyle}" TextWrapping="Wrap" HorizontalAlignment="Left" Width="440" VerticalAlignment="Stretch" Height="Auto" Text="{Binding ProductName}" /&gt; &lt;/Grid&gt; &lt;ControlTemplate.Triggers&gt; &lt;Trigger Property="IsPressed" Value="True"&gt; &lt;Setter TargetName="Up" Property="Visibility" Value="Hidden"/&gt; &lt;Setter TargetName="Down" Property="Visibility" Value="Visible"/&gt; &lt;Setter TargetName="Clip" Property="RenderTransform"&gt; &lt;Setter.Value&gt; &lt;TransformGroup&gt; &lt;TranslateTransform Y="2"/&gt; &lt;/TransformGroup&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;Setter TargetName="DynamicName" Property="RenderTransform"&gt; &lt;Setter.Value&gt; &lt;TransformGroup&gt; &lt;TranslateTransform Y="2"/&gt; &lt;/TransformGroup&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;Setter TargetName="DynamicName" Property="Foreground" Value="#FFFFFF"/&gt; &lt;Trigger.EnterActions&gt; &lt;ctrls:ButtonSoundPlayerAction SoundFile="buttonclick.wav"/&gt; &lt;/Trigger.EnterActions&gt; &lt;/Trigger&gt; &lt;/ControlTemplate.Triggers&gt; &lt;/ControlTemplate&gt; &lt;/Setter.Value&gt; &lt;/Setter&gt; &lt;/Style&gt; </code></pre>
    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