Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout Transform values don't match Render Transform #2006

Closed
michael-hawker opened this issue Apr 23, 2018 · 2 comments
Closed

Layout Transform values don't match Render Transform #2006

michael-hawker opened this issue Apr 23, 2018 · 2 comments
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior controls 🎛️ help wanted Issues identified as good community contribution opportunities
Milestone

Comments

@michael-hawker
Copy link
Member

I'm submitting a...

  • Bug report (I searched for similar issues and did not find one)

Current behavior

I did notice that with similar values in Skew though that at some point the layout transform seems to start behaving differently...

image

    <Grid Background="{StaticResource Brush-Grey-01}" Grid.Row="1"
          HorizontalAlignment="Center" VerticalAlignment="Center"
          RenderTransformOrigin="0.5,0.5">
        <Grid.RenderTransform>
          <TransformGroup>
            <RotateTransform Angle="-2.25" />
            <ScaleTransform ScaleX="2.21"
                          ScaleY="2.2" />
            <SkewTransform AngleX="-120"
                           AngleY="180" />
          </TransformGroup>
        </Grid.RenderTransform>
      <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
        <TextBlock Foreground="White" Text="This is a test message." />
      </Grid>
    </Grid>

Compared to when there are less large values:

image

Expected behavior

Providing same values to Render and Layout transforms should produce similar effects.

Minimal reproduction of the problem with instructions

Copy above XAML into sample app page for layout transform (see PR #1817)

Environment

Nuget Package(s): 

Package Version(s): 

Windows 10 Build Number:
- [ ] Anniversary Update (14393) 
- [ ] Creators Update (15063)
- [x] Fall Creators Update (16299)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Anniversary Update (14393) 
- [ ] Creators Update (15063)
- [x] Fall Creators Update (16299)
- [ ] Insider Build (xxxxx)

Device form factor:
- [x] Desktop
- [ ] Mobile
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ ] 2017 (version: )
- [ ] 2017 Preview (version: )

Comparing to reference source for .net, our matrix transform here does seem different. We actually probably want to provide Matrix method extensions for performing these operations like System.Windows.Media.Matrix had.

@Odonno
Copy link
Contributor

Odonno commented Apr 23, 2018

@michael-hawker From what I saw, it's the SkewTransform which does not behave as it should (as RenderTransform). The AngleX and AngleY seems to be inverted.

@nmetulev nmetulev added bug 🐛 An unexpected issue that highlights incorrect behavior help wanted Issues identified as good community contribution opportunities controls 🎛️ labels Apr 23, 2018
@michael-hawker
Copy link
Member Author

@Odonno yeah, I think it'd be useful to add extensions for the Matrix helpers missing in UWP that the .NET matrix class had (Rotate, Translate, Scale, Skew). Then we can use those in the Layout Transform control instead and should get the better behavior hopefully.

@michael-hawker michael-hawker added this to the 3.0 milestone May 4, 2018
@nmetulev nmetulev modified the milestones: 3.0, 3.1 May 21, 2018
@Vijay-Nirmal Vijay-Nirmal modified the milestones: 3.1, 3.0 May 25, 2018
@ghost ghost locked as resolved and limited conversation to collaborators Nov 26, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior controls 🎛️ help wanted Issues identified as good community contribution opportunities
Projects
None yet
Development

No branches or pull requests

4 participants