.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

Adding ContextMenu to WorkflowDesigner View

Posted By:      Posted Date: August 29, 2010    Points: 0   Category :Windows Application
Hello Everyone,      I am trying to add the ability to have a user highlight an activity subtree, then right click the mouse, then select "Extract activity".  Which will then take out the xaml (ModelItem) selected, create a new activity out of it, then insert this newly created activity in its place.  Right now I'm stuck on getting a ContextMenu to appear when I right click in the designer area.  I can get my custom context menu to work in other places on the same window however.  Does anyone know the solution to this problem?  Also, does anyone have any better suggestions as to how I might achieve the same end result in a more efficient manner? Thanks everyone, Bob

View Complete Post

More Related Resource Links

Adding ListViewWebPart to a page - how do you set its view to

If you add a ListViewWebPart to a wiki/web part page (such as the Links list), it will default to the <summary View>.  If you add it using code, it will default to the default view.  How can I set it to use the <Summary View>? I tried setting node.Attributes["BaseViewID"].Value = "0" in the web part view xml, but that didn't do anything. Any thoughts? ListViewWebPart wpLinks = new ListViewWebPart(); SPList listLinks = site.Lists["Links"]; wpLinks.ListName = listLinks.ID.ToString("B").ToUpper(); wpLinks.ViewGuid = listLinks.DefaultView.ID.ToString("B").ToUpper(); AddToolBar(wpLinks, "Add new link"); private void AddToolBar(System.Web.UI.WebControls.WebParts.WebPart wp, string label) { // Get the view used in the web part by using reflection PropertyInfo viewProp = wp.GetType().GetProperty("View", BindingFlags.NonPublic | BindingFlags.Instance); SPView webPartView = viewProp.GetValue(wp, null) as SPView; // This is necessary after the infrastructure update, without it you can't get to the XML of the view webPartView.GetType().InvokeMember("EnsureFullBlownXmlDocument", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.InvokeMethod, null, webPartView, null, System.Globalization.CultureInfo.Current

Getting GridSplitters to function after dynamically adding WorkflowDesigner views

I am new to WPF and an writing a program which re-hosts an instance of the WF4 System.Activities.Presentation.WorkflowDesigner.   The program itself works fine, but I am unable to get either of two vertical GridSplitters within a nested Grid to work properly once the WorkflowDesigner's view is assigned into that grid at runtime.   (The GridSplitters work until the WorkflowDesigner and PropertyInspector are created and its views set as children of the nested grid). The window has an overall layout grid (OverallLayoutGrid) and nests the original layout grid (LayoutGrid) as the middle of the three row OverallLayoutGrid.   The outermost main OverallLayoutGrid as three rows and one column.   The Main Menu is in the first row, the nested LayoutGrid is in the middle, and a StackPanel with an error displaylistbox and status bar is in the last row. The nested LayoutGrid has 5 columns and one row layed out with: Col0 - Vacant in static XAML, System.Activities.Presentation.ToolboxControl added during Window load Col1 - "LeftGridSplitter" Col2 - Vacant in static XAML, System.Activities.Presentation.WorkflowDesigner.View added during "File | New" creation of new workflow COl3 - "RightGridSplitter" Col4 - Vacant in static XAML, System.Activities.Presentation.WorkflowDesigner.PropertyInspectorView added dur

Programmatically adding Calendar web part with summary view or custom view?

Within my feature I am adding a calendar web part to page.  I would like to specify the summary view (not the full graphic calendar view).  Is this possible? Is it possible to create a custom view and set the listviewwebpart to this custom view through code?   thx -davedave

Adding a table or view multiple times when building a query with BI Report Designer and Report Build

How can I add a table/view multiple times to a single query by using BI Report Designer or Report Builder 3.0? In Report Designer I managed (workaround) to add one table multiple times by creating multiple Named Queries and having the same SELECT. Still I don't know how to add one table multiple times in Report Builder 3.0.

adding mor tables to datasource view causes writeback performance problems


I've got a very strange behavior in one of our SSAS databases. We had performance issues so i've tried to put only the essential parts into one OLAP Database

the result is:

Just by adding more tables to the datasource view the writeback performance drops from 0,2sec to 3 sec. No changes to the cube, no changes to the dimensions.
The t-sql statement fired for the writeback remains the same.
Any idea?



Change Background Color of WorkflowDesigner.View

The View of a WorkflowDesigner is a derivative of UIElement. Is there a way to change the background color of a UIElement (or WorkflowDesigner View)?

I've searched through documentation and intellisense and couldn't find a way to do this.

The reason I ask is the background for the runtime view of a Workflow is White, which does not fit the theme of my application.

Blog (WPF/C#)
Crystal (WPF Google Contact UI/C# Library)

Problem adding a View to a Controller in VS 2010 Express


Hi all,

I am very new to ASP.Net Forums and just starting up with MVC2.

For that, I was trying to build MVCMusicStore Application based upon the guidelines from ASP.Net site.

But when I am trying to add a view from controller or from Solution Explorer. VS stops responding.

I am using Windows 7 Enterprise as an OS and Microsoft Visual Web Developer 2010

Is it a problem related to installation or something else???

Please help me out... :(

Data View Web Part, update to Data Source / adding new list to existing data source


Hi all,

I have four Lists with identical columns :

List 1
List 2
List 3
List 4

I had to merge them, hence i created a data source ( Linked Source ) and merged these lists in SPD. I have used a data view webpart to display some columns from the merged lists data source and everything was working fine.

But now i have a new List : List 5 which also has the same columns like the other four lists and i need to update the data soure such that it is merged list of 5 lists not 4.

i updated the datasource property of the linked source to merge this new list as well. However the contents of List 5 dont appear in the data view webpart. 

Am i missing something here ? 

I dont want recreate the data view web part from scratch eachtime , because in future there might be List 6 , List 7 as well ... 

Adding dynamic watermark to SharePoint 2010 document when open? (on browser view)


hi all,

In Sharepoint 2010, how to adding dynamic watermark to word 2010 when opening?

I thinking,

may be just need configure in sharepoint 2010?

or need sharepoint develop?


What you guys think? Any thoughts are welcome!

Thank you!


Complexity in designing our own Workflow Designer UI (WorkflowDesigner.View properties)

Hi all,

Currently our team has plan to create a simple task-sequencing-and-scheduling-module using .NET 4.0 and VS2010. The major job is to schedule and execute whatever 'task' that given to it. 
The 'task' usually represented as sequence of task with some control flow in between.

To leverage on .NET framework, we plan to use Windows Workflow since it already has runtime engine that capable to perform scheduling and sequencing activities(in our domain, we plan to use workflow 'activity' as 'task'). 

However, the default Rehosted Workflow Designer UI (WorkflowDesigner.View properties) is not really user friendly and we would like to either perform major customization on it or rewrite our own Workflow Designer. 

So could you advice me how complex if we want to create our own workflow designer? Do you think Workflow is appropriate for this kind of application? 
It's kinda different from normal Workflow usage whereby usually people use it in sharepoint to define business process. 
In our case, we plan to use it as an engine of our task-sequencing-and-scheduling module as I mentioned before.


Adding dimensions to scorecard causes the view to fail. Cant edit anything in scorecard after that


The last attempt to update this view failed

Try retriveing the view again by pressing Update in the Edit tab. If you are still not able to retrieve it , contact your administrator

Error Details
The request took too long to complete. SharePoint is currently unavaliable or experiencing heavy traffic. Try again later

I have the following hierechy

Self Service Name (KPI) with filter of department name and service name dimensions
Diemensions added under this KPI
-Source Department (around 40 dept)
- Username (around  45)
- Fact to populate vertical for all values (140 rows)

The MDX query captured in background by SQL profiler gives following result

Cell set consists of 142615 rows and 5 columns.

Is there any recommended number of dimensions to be added in scorecard?

Cannot view webpart in browser after adding Group Properties


Ihave a customized web part, this can be shown properly in browser.

however, in the dataview, if I added "Collapse group by default ", it looks fine in sharepoint designer. But, when it goes to browser. i got the following error:

Unable to display this Web Part. To troubleshoot the problem, open this Web page in a Windows SharePoint Services-compatible HTML editor such as Microsoft Office SharePoint Designer. If the problem persists, contact your Web server administrator.

Please help ! ! !

Adding Dynamic Rows in ASP.NET GridView Control with TextBoxes and with Delete functionality

In my previous examples, I have demonstrated on how to add dynamic rows in GridView control with TextBoxes and how to save the values into the database. Now, seems that most of the developers are asking if how to add a delete functionality with it. So in this example, I'm going to show on how to delete a certain row in the dynamic GridView with TextBoxes.

Truly Understanding View State

This article provides a detailed understanding of the ViewState.

GridView Parent Child View with JQuery Effects

I was just checked how to add some more cool effects to the GridView control using JQuery. In this post I will display parent-child data in the GridView control with some help of the wonderful JQuery library.

Let's first populate the GridView control.

Model View Controller (MVC) for ASP.NET

Model View Controller (MVC) architectures, immediately wonder how the MVC pattern can be applied in an ASP.NET world. This article will demonstrate how the MVC pattern can be applied to an ASP.NET web application and still maintain the basic Microsoft supplied architecture.

Adding Rows in GridView without using a Database

This article describes on how to add rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in the TextBox on Button Click and retain the GridView data on post back.
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