MessagePrompt does not work well in Rel7.1 beta

May 26, 2011 at 10:52 PM

Seems like the MessagePrompt generate exception in the new Rel7.1 beta release:

and I'm getting the following exception:

_HResult -2146233088 int

_innerException {"Unspecified error "} System.Exception

(e.ExceptionObject).InnerException.StackTrace: 
at MS.Internal.XcpImports.CheckHResult(UInt32 hr)
at MS.Internal.XcpImports.FrameworkElement_MeasureOverride(FrameworkElement element, Size availableSize)
at System.Windows.FrameworkElement.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight) Any help with this one would be 

And my emulator do comply with the minimal requirement detailed in http://msdn.microsoft.com/en-us/library/ff626524(v=VS.92).aspx
(DirectX version 11, DDI version 10 WDDM 1.1) 
Exception generated after excuting the  messageInput.Show(); line (no exception when commenting it)
var messageInput = new MessagePrompt 
          {                Title = "User Permissions",
                Message = "Some text here......",               
                IsCancelVisible = true,
            };           
messageInput.Completed += grant_user_permissions;           
messageInput.Show();
If indeed an issue - it would be great if you can adjust the code to work on Rel 7.1
Thanks,
Amir

Coordinator
May 27, 2011 at 12:12 AM

I currently don't support 7.1 yet as it was just released, it is beta, and it would cause some release issues since it causes the project files to be converted to 7.1 files.  This is a breaking change to anyone that would want to use it for 7.0 applications.

I will look into this but right now I don't have time.

I'm honestly betting it is literally just converting the projects and recompiling the project under 7.1

May 27, 2011 at 8:56 AM
Thanks for your reply.
It is not urgent, but it would be great if you'll find sometime to fix it in the near future.
The App that I'm working on depends on some of the new APIs in 7.1 and it would be great to have support of the coding4fun libs during the beta cycle.

Regards,
Amir
Coordinator
May 27, 2011 at 9:26 PM

I will, just a matter of time and figuring out the best way not to break support for the current OS.  If you'd like to help out and see what needs to get done to support this, I'd greatly apperciate it.

May 29, 2011 at 7:14 AM
Thanks crutkas,
I was trying to fix it w/o success - sorry, still a beginner.
I did the following steps:
I downloaded the code and changes the target type from 7.0 to 7.1 for the 3 project:
Coding4Fun.Phone.Controls
Coding4Fun.Phone.Controls.Toolkit
Coding4Fun.Phone.Site.Controls
As result of the folloowing compilation error:
'GestureEventArgs' is an ambiguous reference between 'System.Windows.Input.GestureEventArgs' and 'Microsoft.Phone.Controls.GestureEventArgs'
I changed all instances of GestureEventArgs to Microsoft.Phone.Controls.GestureEventArgs and compiled the code.
Kept the target of the test application to:7.0 and it seems to work fine :-)
Changed the target type of the test app to 7.1 and the same run time exception happened when trying to open a messageprompt.
I'll continue to debug this, but again... I'm still a beginner.
HTH,
Amir

Coordinator
Jun 5, 2011 at 3:30 AM

status update:  Got 7.1 beta installed.  I got the code working except, i think something with the round buttons oddly enough is causing a crash.  What exactly I don't know sadly.  I'm not sure if this is an issue with the beta or with the toolkit.

Coordinator
Jun 5, 2011 at 3:45 AM

Fixed, crash was due to me using PhoneBorderThickness, switching to PhoneStrokeThickness which was the proper style anyways fixed the issue.  You should be good to go.  Download, compile and rock-out :-)

There is a new solution for 7.1 as well.

Jun 6, 2011 at 9:13 AM
Thanks,
Works for me.