質問

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?

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top