Question

I have such DataTemplate:

<DataTemplate x:Name="GreenMarkTemplate">
            <Grid Width="64" Height="64">
                <Image Source="Assets/Marks/mark_green.png" RenderTransformOrigin="0.5,0.5">
                    <Image.RenderTransform>
                        <RotateTransform CenterX="0.5" CenterY="0.5" Angle="{Binding course}" />
                    </Image.RenderTransform>
                </Image>
                <TextBlock HorizontalAlignment="Center" TextWrapping="Wrap" Text="{Binding route_num}" VerticalAlignment="Center" FontSize="16"/>
            </Grid>
        </DataTemplate>

And I need to rotate Image according to "course" property. At first, Image shows with zero angle and in a moment it rotates. This makes Image blinking.

So, is it possible somehow to make Image invisible and show it only after rotation? or rotate image before rendering it?

Was it helpful?

Solution

Resolved the issue using LayoutTransform port for Windows Phone 8. github link

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top