Windows Workflow Foundation 3


problem of cross-threading.


Hi,
I am trying to set the controls property in workflow completed method but getting the error "Cross-thread operation not valid: Control btnStartWorkflow accessed from a thread other than the thread it was created on. ".
I have tried setting control.CheckForIllegalCrossThreadCalls = false but its still not working. Can any one help me out.
 
Thanks
Ekta
 
 
The problem here is UI and workflow are running on different threads. You need to switch to the UI thread before you can set any values on UI controls from the workflowCompleted method. Following post has code snippet to do this
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=280686&SiteID=1

Related Links

Question about modifying a workflow
Rule Conditions against custom activities and XAML activation - how should I achieve this?
MOSS Publishing Site
WF custom persistence once again
Hands on Labs 2.2
WF Virgin
Error in the Hands on lab 09
Workflow Designer
How do you load XOML only State Workflow in WFPad for WWFBeta 2.2 (with namespace for codebehind assembly, and activities)?
invoke sub StateMachine workflow
Using WWF to model and support "Tech Trees" in RTS games
RuleConditionDialog and intellisense
Workflow Persistence & Event Arguments
PersistenceService - Transaction Timeout
SimpleExpenseReport
SQLTrackingQuery from Workflow

Categories

MSDN
Visual Studio Languages
SharePoint
HealthVault
Microsoft Sync Framework
Bing Ads API: Development
Project
Virtualization
Parallel Computing in ...
Testing with Visual St...
Publishing Windows Sto...
Promote Your App
Store Engagement Frame...
DirectShow Development
Application Security f...
Windows Imaging Compon...
Hardware Development B...
SharePoint 2010 - Gene...
SharePoint Legacy Vers...
SharePoint Legacy Vers...
Workflow Manager 1.0
Azure BizTalk Services
Azure CDN
Azure IoT Hub
Azure Blockchain
Azure Database for Pos...
.NET Framework Class L...
Team Foundation Server...
Visual FoxPro General
BizTalk Server EDI and...
Reactive Extensions (Rx)
Microsoft Live Labs Volta
Internet Explorer Exte...
Partnering with Microsoft
Training and Certifica...
SyncFx - General [Read...
Microsoft Robotics - C...
SQL Server Reporting S...
SQL Server Analysis Se...
SQL Server Tools
SQL Server Security
SQL Server Database En...
Standard 7: Tools
Standard 7: Servicing ...
Windows Forms Designer
Windows Live Messenger...
MSDN and TechNet Searc...
MSDN, TechNet and Expr...
Speech Service for Dev...
WebsitePanel - Support
The Samsung Windows De...
Bing Maps WPF, WP7/8/8...
Bing Maps REST, SOAP, ...
Expression Studio
Visual Studio Report C...
Project Online General...
.NET Platform Architec...
CHESS – Find and Repro...
Core Coding Experience...
Crystal Reports for Vi...
Microsoft Unified Comm...
Microsoft Unified Comm...
Parallel Computing Pla...
Phoenix
Popfly Bugs and Sugges...
POS for .NET
Search Server: Feature...
Server Core Developers
Silverlight (formerly ...
SyncFx - Microsoft Syn...
SQL Server 2014 In Azu...
SQL Server 2014 In-Mem...
Team Foundation Server...
Visual Basic Express 2...
Visual C# Express 2008...
Visual Studio Team Ser...
Visual Studio 2008 (Pr...
Visual Studio Database...
Visual Studio Lab Mana...
Visual Studio Tools fo...
Visual Studio Online "...
Windows CardSpace ('In...
Windows Presentation F...
Windows XP Wireless SDK
Working with Data in W...
Tools for Windows Stor...
XML in Visual Studio 2...
Ad Revenue, Payout & T...
Microsoft R Server

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile