UWP - Rotating an Image while keeping it aligned to the grid, using XAML only

前端 未结 1 1850
滥情空心
滥情空心 2021-01-21 13:14

Using Windows Template Studio, I created a (mostly auto-generated) sample UWP application, which shows a bunch of Images within a GridView.

In order to rotate them, I\'v

1条回答
  •  遇见更好的自我
    2021-01-21 13:50

    So that worked fine - until I tried non-square photos. At this stage, the result was that the image itself would sometimes show outside of its container within the grid:

    If u want the image will rotate with center and it will not display outside GridView. you could set RenderTransformOrigin property.

    
        
            
            
            
        
    
    

    Update When the GridView item clicked, the default Pressed visual statue will make the content of gridview re-layout. Currently, there is a workaround that use GridViewItemExpanded style.

    0 讨论(0)
提交回复
热议问题