locked
MatrixTransform example doesn't work?

    Question

  • Within the link http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.media.matrixtransform.aspx

    There is a example for MatrixTransform:

    <Rectangle Width="60" Height="60" Fill="Blue">
        <Rectangle.RenderTransform>
            <MatrixTransform>
                <MatrixTransform.Matrix >
                    <!-- This matrix transforms the x,y position of
                         the rectangle and skews it. -->
                    <Matrix OffsetX="30" OffsetY="100" M12="0.5" />
                </MatrixTransform.Matrix>
            </MatrixTransform>
        </Rectangle.RenderTransform>
    </Rectangle>

    Copy and paste it into a Grid element and do the compilng, then the VS2012 outputs:

    XamlCompiler error WMC0011: Unknown member 'OffsetX' on element 'Matrix'

    XamlCompiler error WMC0011: Unknown member 'OffsetY' on element 'Matrix'

    XamlCompiler error WMC0011: Unknown member 'M12' on element 'Matrix'

    Any advice? Thanks.

    Wednesday, January 30, 2013 3:00 PM

Answers

  • A new blank Windows Store app (VC++) will give the same output:

    XamlCompiler error WMC0011: Unknown member 'OffsetX' on element 'Matrix'

    XamlCompiler error WMC0011: Unknown member 'OffsetY' on element 'Matrix'

    XamlCompiler error WMC0011: Unknown member 'M12' on element 'Matrix'

    For some reason, we don't use C# as the development language. But I tried this example with a blank C# windows store app, following is the output:

    XamlCompiler error WMC0100: XAML Matrix type cannot be constructed. In order to be constructed in XAML, a type cannot be abstract, interface, nested, generic or a struct, and must have a public default constructor.

    • Marked as answer by Jesse Jiang Wednesday, February 06, 2013 1:58 AM
    Friday, February 01, 2013 2:31 PM
  • Hi willjing,

    Thanks for the information. I can reproduce the same problem in a VC++ Windows Store application.

    We will report this issue.

    Thanks again for your feedback and support.

    Best regards,


    Min Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Jesse Jiang Wednesday, February 06, 2013 1:57 AM
    Monday, February 04, 2013 2:41 AM
    Moderator

All replies

  • Hi Willjing,

    I suspect you might copy it into a WPF or Silverlight project. The code is for a Windows Store app.

    If the issue presists, could you please let us know your VS version?

    Best regards,


    Min Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, January 31, 2013 7:32 AM
    Moderator
  • It's a windows store app project.

    VS Premium 2012

    Version 11.0.50727.1 RTMREL


    • Edited by willjing Thursday, January 31, 2013 5:59 PM
    Thursday, January 31, 2013 5:59 PM
  • Hi willjing,

    Thanks for the update.

    I checked some resource and didn't see any similar report of this issue.

    I will try to involve someone more familiar in this area to further look at this issue. For clarification, could you please let us know the answer of the following questions?

    Could you reproduce this problem if you create a new blank Windows Store app?

    What if you create a MatrixTransform instance in C#? Can you access its OffsetX property?

    Bets regards,


    Min Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Friday, February 01, 2013 9:27 AM
    Moderator
  • A new blank Windows Store app (VC++) will give the same output:

    XamlCompiler error WMC0011: Unknown member 'OffsetX' on element 'Matrix'

    XamlCompiler error WMC0011: Unknown member 'OffsetY' on element 'Matrix'

    XamlCompiler error WMC0011: Unknown member 'M12' on element 'Matrix'

    For some reason, we don't use C# as the development language. But I tried this example with a blank C# windows store app, following is the output:

    XamlCompiler error WMC0100: XAML Matrix type cannot be constructed. In order to be constructed in XAML, a type cannot be abstract, interface, nested, generic or a struct, and must have a public default constructor.

    • Marked as answer by Jesse Jiang Wednesday, February 06, 2013 1:58 AM
    Friday, February 01, 2013 2:31 PM
  • Hi willjing,

    Thanks for the information. I can reproduce the same problem in a VC++ Windows Store application.

    We will report this issue.

    Thanks again for your feedback and support.

    Best regards,


    Min Zhu
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Jesse Jiang Wednesday, February 06, 2013 1:57 AM
    Monday, February 04, 2013 2:41 AM
    Moderator