Visual Studio & Expression Blend Crashing

Dec 22, 2011 at 4:48 AM

Thanks for your great work on this reusable components.

I'm trying to use the PassWordInputBox control in one of my application but it is failing. Once I add the control here is the error that I got in expression blend.

 

Application Version: 4.0.1000.1000
Operating System Version: Microsoft Windows NT 6.1.7601 Service Pack 1
Common Language Runtime Version: 4.0.30319.239

System.UnauthorizedAccessException: Invalid cross-thread access.
   at MS.Internal.XcpImports.CheckThread()
   at MS.Internal.XcpImports.CreateObjectByTypeIndex(UInt32 typeIndex)
   at System.Windows.Threading.DispatcherTimer..ctor(UInt32 nativeTypeIndex)
   at System.Windows.Threading.DispatcherTimer..ctor()
   at System.Windows.Threading.Dispatcher..ctor()
   at System.Windows.Threading.Dispatcher.get_MainDispatcher()
   at Coding4Fun.Phone.Controls.InputPrompt.DelayInputSelect(Object value)
   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object state)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

 

Code added (adding only the control specific part here)

========

xmlns:cd="clr-namespace:Coding4Fun.Phone.Controls;assembly=Coding4Fun.Phone.Controls" 

<

 

Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"

>

<

 

cd:PasswordInputPrompt Name="SaveSearchCtrl" Title="Please type saved search name" Background="DarkBlue"

>

</

 

cd:PasswordInputPrompt

>

 

</

 

Grid

>

 

 

 

 

Coordinator
Dec 22, 2011 at 9:24 AM

It is designed for codebehind use only, not for XAML/design time. 

Coordinator
Dec 24, 2011 at 4:34 AM

User moved to bug, I however verified it rendered with 71414 source tree and visual studio did not crash.

http://coding4fun.codeplex.com/workitem/7560