Powered by MSDN

US - English
NEW! Silverlight 5 is available Learn More

SetValue() bug RSS

3 replies

Last post Jul 26, 2007 03:37 PM by N.Tony

(0)
  • bobrob

    bobrob

    Member

    28 Points

    19 Posts

    SetValue() bug

    May 22, 2007 03:16 PM | LINK

    Bug in MatrixTransform.Matrix.set property:

    Matrix matrix= new Matrix( 1.5, 0, 0, 1.5, 0, 0 ); // simple scale

    MatrixTransform mt= new MatrixTransform();
    mt.Matrix= matrix; // BUG, not properly serialized to the Silverlight native engine

    The problem comes from the fact that a Matrix is converted to text using Matrix.ToString() in XcpImports.SetValue<T>(). If Regional Settings are set to "French", then the decimal (NumberDecimalSeparator) is a comma (",") not a dot (".").

    Therefore, instead of passing the string "1.5,0,0,1.5,0,0" (6 numbers) to the Silverlight engine, the framework is passing "1,5,0,0,1,5,0,0" (8 numbers, invalid matrix):

    // text = "1,5,0,0,1,5,0,0" instead of "1.5,0,0,1.5,0,0"
    string text= matrix.ToString();

    BTW,  could someone tell me a workaround : how to I change the current culture in runtime with Silverlight .NET ?

    Thanks

     

  • bobrob

    bobrob

    Member

    28 Points

    19 Posts

    Re: SetValue() bug

    May 28, 2007 08:21 AM | LINK

    Any news for this bug?

    (another post for this bug at http://silverlight.net/forums/p/1497/3821.aspx)

  • seemar

    seemar

    Member

    154 Points

    42 Posts

    Microsoft

    Re: SetValue() bug

    Jun 05, 2007 12:05 AM | LINK

    Noted the bug and it is now in our bug database. Thank you for reporting!

    -SeemaR@MS

    Seema Ramchandani
    Silverlight
    Program Manager, Microsoft
    http://blogs.msdn.com/seema
  • N.Tony

    N.Tony

    Member

    36 Points

    19 Posts

    SetValue() bug

    Jul 26, 2007 03:37 PM | LINK

    I have the same problem (my Regional options is Russian).

    To work around this problem I change "Standarts and Formats" options to "English(United States)" (at Control Panel -> Regional and Language Options)

    silverlight Matrix Regional Language Options