.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

NullReferenceException in ReHosted Designer on double-click

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :Windows Application
Hi,   I have a WinForms application with a rehosted workflow designer (WF4) and although my xamlx workflow opens in the designer without error, I find that when I drill down into the SendReceive activities I get a NullReferenceException as follows: NullReferenceException: Object reference not set to an instance of an object, at System.Activities.Core.Presentation.FlowchartDesigner.CleanupFlowchart() at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)... I'm running on Windows 7 x64. Any help with this would be hugely appreciated. Thanks, Stuart  

View Complete Post

More Related Resource Links

Enumerating Variables & Arguments in Rehosted Designer

I'm trying to enumerate the variables and arguments of a workflow after I load it into my rehosted designer.  I see that I can use ActivityMetadata.GetArgumentsWithReflection() and ActivityMetadata.GetVariablesWithReflection() but those require that I have ActivityMetadata to start with.  So the real question is, how do I get the ActivityMetadata once I've done MyWorkflowDesigner.Load(XamlPath);?Thanks in advance.ChuckChuck Berg | Consulting Engineer | Corporate IT - Station Casinos, Inc.

How to directly open activity on rehosted designer

Hello Everyone,      Let's say you have a rehosted designer that contains activities within activities.  Some of these activities are not shown on the designer because of the nesting.  Now lets say you know the name of one of the hidden nested activities and want to programmatically open the DesignView to this one activity.  How would one do this?  I was thinking about creating a miniature visual tree showing every activity in the workflow.  Clicking on an item in this mini-tree would open the main designer to that activity, this would allow for quick navigation to deeply nested activities.  Is this possible, or am I hopelessly delusional?  I'm thinking the tree itself could be fairly easily built from the xaml text itself, however causing the designer window to switch to an arbitrary activity view may be another matter. Thanks in advance everyone, Bob

How to prevent combobox drop down from expanding on double click

Hi, I have a requirment to toggle the selected item of a combobox on double click. I am able to achieve this using MouseDoubleClick event for combobox. But the issue is, when I double click the popup for the combobox also drops down, which I need to avoid.   How can I do this.   Please help.   Thanks, P

OpenDialog box to open file with a double-mouse click

Hi, I am having a hard time trying to find an example that opens an opendialog box and allows the users to open the file with a Double-Click. Please help.   Thanks

Activity/State mouse double click

Hi, When I double click activity/state, the workflow designer sets that activity/state as root designer. Is there a way to  disable this behavior? Thank you

How do I generate service reference activities in my rehosted designer

My desginer is used to create lots of xamlx workflows.  These are hosted in app fabric. From Visual Studio I can add a service reference that points to my workflows, and it generates activities in my toolbar that I can use to call my service from another workflow. I'd like to do the same thing from my rehosted designer.  I figured it would be something like calling svcutil.exe, but couldn't find any information on this. Does anybody know how to create xaml activities by pointing at a service for a workflow designer rehost?   CheersJason Bolstad

Rehosted Designer does not display custom Activities with custom ActivityDesigner


In a custom Rehosted Designer, when attempt to load a custom activity that has the Designer Attribute, referecing a custom ActivityDesigner, the rehosted designer display only the message "Could not generate view for MyCustomActivity" with red backtext.

When the mouse pointer is passed over the text, the following message is displayed:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation, --> System.Exception: The component 'Procwork.Software.Mersey.CORE.Common.ProcessManager.Designers.BusinessSourceActivityDesigner' does not have a resource identified by the URI '/Procwork.Software.Mersey.CORE.Common.ProcessManager;component/designers/businesssourceactivitydesigner.xaml'.
       at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator)
       at Procwork.Software.Mersey.CORE.Common.ProcessManager.Designers.BusinessSourceActivityDesigner.InitializeComponent() in c:\Procwork\PW.Mersey\Modules\CORE\Common\ProcessManager\Designers\BusinessSourceActivityDesigner.xaml:line 1
       at Procwork.Software.Mersey.CORE.Common.ProcessManager.Designers.BusinessSourceActivityDesigner..ctor() in C:\Procwork\PW

GridView and mouse double click Response.Redirect problem


VS 2005, AJAX 

I use gridview and I need single and double click for each row in gridview.

When I click once on a row, some action will execute (e.g. next button should be enabled) and when I double click the row there should be redirection to another page.

I used the code below for both single and double click  usage:


protected void GwContainers_RowDataBound(object sender, GridViewRowEventArgs e)
                if (e.Row.RowType == DataControlRowType.DataRow)
                    // Get the LinkButton control in the first cell

                    LinkButton singleClickButton = (LinkButton)e.Row.Cells[8].Controls[0];
                    // Get the javascript which is assigned to this LinkButton


Detecting changes to a workflow in rehosted designer.


Is it possible to check to see if any changes were made to a workflow in the rehosted designer? I'd like to prompt the user to save their changes if they are trying to close or load a different workflow and they have not yet saved them.


Prevent double click


 G'day All,

     This is my first post, and I am new to programming. I have created a website written in ASP.NET (4.0) with VB.NET (10.0) as the code-behind. I have created a game that plays Aton, the boardgame, via the web. I have created a board with multiple imagebuttons and standard buttons that are enabled for the user to click as the logic demands. My problem is : I need to be able to disable all of the imagebuttons/standard buttons after the user has made a selection (ie clicked on anything available). Essentially this is double click problem that has been discussed in the past. Up to this point, I have been able to use javascript to disable a single button (which works well), but I dont know how to disable the lot !

     I have searched far and wide, but have not been able to find a solution that works with the modern versions of ASP/VB. I have a grid of over 50 imagebuttons/standard buttons that all require disabling after any selection. Any solution would work for me, ie freeze screen, overlay image or individual button disabling. My instinct tells me that a large overlay would be the best, but I would like it work in all of the modern day browsers (Firefox, IE, Safari, Crome and Opera)


avoid double click event


Hi All.

I have two Parent forms and one child form. The child form has ListView with ability to double click row to call other form. I would like if ParentAAForm calls ChildForm user has ability to double click ListView row to call other form. But if ParentBBForm calls ChildForm in that case user doesn't have ability to double click LIstView row on ChildForm to call other form. If is it possible how it to do?


Failed to display the IActivityTemplateFactory designer as a root activity on the rehosted applicati


Hi guys,

I have created a custom composite activity that derived from the Activity and IActivityTemplateFactory. When I try to deploy this composite activity as a root activity on the rehosted application. It failed to display its designer probably. If I put a sequence as a root activity, and the composite activity as a child activity inside the sequence activity,  I got my composite activity designer display nicely on my rehosted designer. Is it a limitation for us to put a IActivityTemplateFactory designer as root activity in the rehosted app. Please advice.


public class CustomCompositeActivity : Activity, IActivityTemplateFactory
  public Activity Create(System.Windows.DependencyObject target)

    return new Sequence
       Activities = 
          new WriteLine
            Text = "Hello"
          new WriteLine
            Text = "WF 4.0"

SQL file will not open in SSMS on double-click (or jump list)


Hello, all.

I am running SQL Server Management Studio 2008 on a Windows 7 Enterprise machine here at work.  I am not sure when this started happening, but now, for some reason, when I double-click on a SQL file in Explorer, or from the jump list for SSMS (which I have pinned to my Windows 7 task bar), SSMS will open, but will not load the file in question, nor will it bring up a logon screen to connect to a DB.  I tried unassociating the .SQL extension and then re-associating it using "Open With" and it worked the first time (from the Open With), but then immediately reverted back to its old behavior.  Very annoying.

For now I just open SSMS first (which pops up a logon screen and things proceed normally), but that kind of defeats the purpose of having a jump list or a file association.  Has anybody run into this before and can anybody suggest a fix or what's wrong?

Thanks in advance for any wisdom anyone can provide. 

Rehosted Designer: Using custom activities from dll


I adding to activities toolbar my custom activity, made in rehosted designer and compiled via msbuild.exe . Then I dragging it from toolbar to my workflow view. But when I try to compile or just run activity , which is using activity from the dll, there is the error. It cannot find type of needed activity in dll. Dll is in designer's executable folder.

=Sorry for my english

Prevent double-click on button control



I've read several posts on this subject, but most solutions refer to using http://www.metabuilders.com/Tools/OneClick.aspx or to using javascript to disable the button (after the first click).  Both of these solutions would work, but I was hoping for some basic server code that uses the standard button control, and that I could re-use on various forms to prevent double-clicks.  Or if there are any good articles or suggestions on this that you could direct me to view I would appreciate it.  Thanks for your help!

Double click an associated file type and have it open in your WPF application?


I have a WPF application that does a number of things. When running the app, I can go to File > Open, browse to a file, and open it in the app. Fields on the UI are updated with values from the file and everything works great.

The file I am opening contains binary data and has a custom file extension that is associated with my application. The problem is that if I DON'T have the WPF application running and I double click one of my associated files, it simply opens the application. I would like it to open the application and then load the contents of the file I clicked on. How can I go about doing this?

I have looked into using the Application_Startup event handler in the App.xaml.cs but cannot get the filename when double clicking on it as my StartupEventArgs are empty. However, the sender.ToString from Application_Startup handler returns "MyCompany.MyApp.App". How can I get the filename and go about loading it?

Another thing is that if I put a breakpoint in the Application_Startup event handler and double click my associated file, I never hit the breakpoint. The only way I hit the breakpoint is when I run the application from the IDE. I would like to be able to double click a file, then hit the breakpoint so I can do some debugging.

Thanks in advance.

In SQL Server Management Studio can you double click in column data?

I'd like to easily see data in the results data grid, for instance xml or a particular value so I can cut and paste it quickly. Is there a way to double click in column data for popup to appear so can see full data item and make edits immediately?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend