Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 21, 2012 02:56 AM by ToughMan
Dec 16, 2012 01:54 AM|LINK
Plz just tell me one question：What kind of question can you solve？
U NEVER solve hard question!
When meet hard questions, u ask us for MONEY!!!!!!!!!!!!!!!!!
Dec 19, 2012 04:15 AM|LINK
It is absolutely clear how this works.
When using a struct, and with GetStandardValuesSupported configured to return false, the output markup is set to
<cc1:MyDPoint runat="server" DPoint-X="5" DPoint-Y="5" DPoint-Z="5"></cc2:MyDPoint>
This will fail compilation every single time, and correctly, because the generated code is effectively trying to do
SomeMyDPointObject.DPoint.X = 5;
With structs, that simply cannot (and should not) work.
However, if you configure GetStandardValuesSupported to return true, the designer writes out
<DPoint X="5" Y="5" Z="5"></DPoint>
which is clearly equivalent to
var temp = new DPoint( 5, 5, 5 );
SomeMyDPointObject.DPoint = temp;
This is clearly going to work perfectly every time.
Dec 20, 2012 07:03 AM|LINK
I think that's the UI differences, but it shouldn't effect the real result:(
Do u think so?
Dec 20, 2012 07:19 AM|LINK
It's not really UI differences. Changing the implementation of the converter appears to change the behavior of the designer, which is perhaps to be expected.
Whether I like it or not is immaterial. This seems to be how it works, so you either live with it, or raise a question / bug report on the Microsoft Connect site.
If there's a bug here, it is the fact that the designer is prepared to emit code that it should know would fail at compile time. You should definitely report that on the Connect site. (Note: there's no point reporting it on these forums - Connect is the
proper place to report technical issues so that they can be escalated through the support and product teams).
Dec 21, 2012 02:56 AM|LINK
Yes, that' really THE PROBLEM! You are stronger than Microsoft!
:D :D :D