locked
Polygon.RenderTransform offscreen but in visual tree does not execute

    Question

  • I have a visual tree built up through a datatemplate like this

                    <GridView HorizontalAlignment="Left"
                              Margin="0,130,0,0"
                              Grid.Row="1"
                              VerticalAlignment="Top"
                              Width="1366"
                              Height="287"
                              ItemsSource="{Binding Items}"
                              SelectedItem="{Binding SelectedItem, Mode=TwoWay}"
                              IncrementalLoadingTrigger="None"
                              ShowsScrollingPlaceholders="True">
                        <GridView.ItemTemplate>
                            <DataTemplate>
                                <StackPanel Height="250"
                                            Width="300"
                                            Background="Black"
                                            Margin="100,0,0,0">
                                    <TextBlock Text="{Binding Name}"
                                               Height="35"
                                               ToolTipService.Placement="Top"
                                               ToolTipService.ToolTip="{Binding Description}"
                                               Margin="0,0,0,20"
                                               Foreground="Red"
                                               FontSize="20" />
                                <Canvas>
                                    <Polygon DataContext="{Binding LargeTriangle1}"
                                             Points="{Binding Points}"
                                             Fill="Beige"
                                             Stroke="#FFCDCDA6">
                                        <Polygon.RenderTransform>
                                            <TransformGroup>
                                                <RotateTransform Angle="{Binding Rotation}" />
                                                <TranslateTransform X="{Binding Center.X}"
                                                                    Y="{Binding Center.Y}" />
                                            </TransformGroup>
                                        </Polygon.RenderTransform>
                                    </Polygon>
                                    <Polygon DataContext="{Binding LargeTriangle2}"
     

    The polygons that are rendered onscreen render well, that means the points get rendered and the transforms executed. The polygons that are offscreen at first and only appear on screen because the user scrolls the content of the screen/gridview do render their points but the rendertransforms do not execute.

    How can I fix this?



    Monday, September 29, 2014 11:36 AM

All replies

  • Hi,

    I'm afraid that it is not the correct forum about this issue, since this forum is to discuss WPF.

    So I have moved this thread to Windows Store Apps forum for better response.

    Thanks for your understanding.

    Best regards,
    Franklin


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, September 30, 2014 8:15 AM
    Moderator
  • Hi Franklin,

    thanks for bringing this forum to my attention.

    Wondering, if the underlying technology for building Metro applications is not WPF how do you call it?

    Now that I am thinking of it, what is the 'official' designation of the kind of apps I am building? Metro, Win RT, Store apps? How should I call them? Unified Apps (but that seems a misnomer since the technology is different for Phone and Store and Windows?)?

    This is not criticism, I am really confused about the topic.

    Best regards,

    Frank.

    Tuesday, September 30, 2014 9:54 AM