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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

How to directly open activity on rehosted designer

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :Windows Application
 
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


View Complete Post


More Related Resource Links

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"
      

Can't open site in Designer/ Can't open files in Designer

  
I'm having trouble in Designer 2007.  I can not open any sites files on sites on our prodution server.  I get "Couldn't open file ..........aspx".  On our development server I can't even open sites.  I get "Invalid folder name".  Can anyone please advise?  I have seen other posts about this behavior, but none of the solutions have worked for me.  I've uninstalled Expression Web, I don't have Front Page installed, and I ran a repair installation on Designer.  Still no luck.  Any ideas please?

Customer Activity Designer Problem - "Could not generate view for VisualBasicValue`1"

  
I'm reading Bruce Bukovics Pro WF4 book and in chapter 16 - Advanced Customer Activites, he details emulating a Sequence activity along with a custom designer. When I drop the custom activity into a new xaml activity, I'm getting all sorts of wierdness. The custom sequence activity has a condition property that determines whether to schedule each child activity contained within. Once I set a value in the ExpressionTextBox for the activity, Visual Studio starts showing in red "Could not generate view for VisualBasicValue`1" along with this error showing up in my error window: The activity 'VisualBasicValue<Boolean>' cannot be referenced by activity 'MySequence' because the latter is not in another activity's implementation.  An activity can only be referenced by the implementation of an activity which specifies that activity as a child or import.  Activity 'VisualBasicValue<Boolean>' is declared by activity 'MySequence'. Here is the source for the activity itself: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Activities; using System.ComponentModel; using System.Collections.ObjectModel; namespace ActivityLibrary { [Designer(typeof(ActivityLibrary.Design.MySequenceDesigner))] public sealed class MySequence : NativeActivity { [Browsable(false)] public Collection<Activity&

How to display breakpoint and debug visual cues with custom activity designer based on WorkflowViewE

  
Hi,   I am developing custom activity designers based on "WorkflowViewElement" instead of "ActivityDesigner" in my xaml. It allows me to have greater control of the look and feel of the designer. However I noticed that with this approach, the breakpoint visual cue (Dark red solid circle that appears on the left side of the designer when you set breakpoint on the designer) is not visible. It works fine when you write your designed based on "ActivityDesigner". The same behavior happens to the debug visual cue when you debugging the WF. It appears as bright yellow rectangle surrounding the activity designer if you are based on "ActivityDesigner", but it is not available when your designer is based on"WorkflowViewElement". Any help is highly appreciated. Li

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.

Custom designer for a Flowchart activity?

  
Can anyone point me in the right direction for developing a custom designer for a Flowchart activity?  In actual fact, the Flowchart control we are using is a custom activity - it's not the regular .NET Flowchart activity, but our own creation with a collection for FlowNodes/etc.  We'd like to put a UI around it now as well ... mimicking the .NET Fllowchart designer.  Is that really possible, or extremely difficult?  It seems there's no real API or anything available for constructing the node connectors, arrows, etc.

Email (*. msg) open directly in SharePoint?

  
Hi, I have the following problem. In SharePoint are different types of files stored (*. docx, *. zip, ...). For all types of files automatically open the programs (Word 2010, 7-Zip). And now the problem. Mails in SharePoint (*. msg) will not open in Outlook. It can only download the file. Is there a possibility that the files are open *. msg directly in your mail program.

SharePoint Designer can't open defaul.aspx page

  
I tried to edit the default.aspx page of a WSS 3.0 site using SharePoint Designer and I get the following error:"The server could not complete your request.  Contact your Internet service provider or Web server administrator to make sure that the server has the FrontPage Server Extensions or SharePoint Service installed."When I click on the 'Details' button I get:"soaperverServer was unable to process request. ---> A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered as safe on this site. You may not be able to open this page in an HTML editor that is compatible with Microsoft Windows SharePoint Services, such as Microsoft Office SharePoint Designer. To fix this page, contact the site administrator to have the Web Part or Web Form Control configured as safe. "I don't have any custom built Web Parts installed and I checked the web.config file to make sure that other parts are marked as safe.The weird thing is that I can successfully edit other default.aspx files on sub-sites  Thanks for any help

NullReferenceException in ReHosted Designer on double-click

  
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  

Disable an activity in Designer at run time in workflow 4.0

  
There are couple of activities in my workflow & based on some condition, I need to make an activity disabled i.e. I don't want that activity to be seletable by the user. I am opening my workflow in designer at run time to give an overview of WF to the user. Something like  (new DesignerMetadata()).Register(); this.wd = new System.Activities.Presentation.WorkflowDesigner(); this.designerSection.Child = (this.wd.View); I was going thru the MS sample of CommentOut Activity but that won't solve my requirement as Activity needs to be disabled at run time based on some condition.

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

Undo After Adding Activity Which Causes Designer Resize

  
Hi, I created a very simple test application which consists of a Toolbox and a Workflow Designer.  In the toolbox, I only added a "Terminate" activity: public MainWindow() { InitializeComponent(); new System.Activities.Core.Presentation.DesignerMetadata().Register(); _workflowDesigner = new WorkflowDesigner(); Grid.SetColumn(_workflowDesigner.View, 1); _workflowDesigner.Load(new System.Activities.Statements.Flowchart()); LayoutGrid.Children.Add(_workflowDesigner.View); _toolbox = new ToolboxControl(); ToolboxCategory undoTestCategory= new ToolboxCategory("Undo Test"); ToolboxItemWrapper terminateTool = new ToolboxItemWrapper(typeof(System.Activities.Statements.TerminateWorkflow), "Terminate"); undoTestCategory.Add(terminateTool); _toolbox.Categories.Add(undoTestCategory); Grid.SetColumn(_toolbox, 0); LayoutGrid.Children.Add(_toolbox); } When I drag/drop the "Terminate" to the middle of the designer, I can press Ctrl-Z once to undo it (i.e. remove it from the designer).  However, if I drop it at the edge of the designer which forces a resize/expansion of the designer, it takes 4 Ctrl-Zs to undo it.  Is there a way around this?  Also, is there an easy way in the debugger to see the undo stack? Thank you.  

can't open sharepoint site with sharepoint designer 2010

  
Hi there, We've installed SP Foundation + SP Server 2010 and set up some sites. when we tried to open it with SP Designer 2010, it fails and gave us some errors. opening SPD through site actions : unable to open website. possible causes: 1. the web server may not have sharepoint server installed 2. the web server may be temporarily out of service 3. if you are connecting through a proxy server, the proxy settings may be incorrect 4. an error may have occured in the web server opening sharepoint site through SPD: the folder 'http://mysp.domain.com/site/default.aspx' isn't accessible. the folder may be located in an unavailable location, protected with a password, or the filename contains a / or \. the thing is ... we have no problem with sharepoint designer 2007. any idea?

No permission to open a list pages in Sharepoint Designer 2007

  

We have a sharepoint site with two main lists.

List 1: I could open the pages, make changes BUT cannot create workflows (for the site).
List 2: I could not even open it. I get the message
"You do not have permission to do this operation. Ask your web site administrator to change your permission and try again, or log on with user account that has this permission ...."

I am secondary server administrator and also have 'full control' of the site.

Any ideas?

Thank you


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'.
  Source=PresentationFramework
  StackTrace:
       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

Generated MainWindow.xaml crashes VS2010 when you open the designer

  

In my system which is running Windows 7 Enterprise X64 I have a problem viewing some XAML files. At least one of my project XAML files sometimes crashes VS2010 if I open it in the designer or try to view it with Internet Exlorer 8 or Windows Presentation Foundation host. It also happens if i try to display the MainWindow.xaml that is generated by VS 2010.

The contents of MainWindow.xaml are

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
       
    </Grid>
</Window>

 

If I open the debugger when IE8 crashes, the failing stack frame is iefdm2.dll!03992071()

I assume it is some sort installatioin snafu or something but I would hate to have to re-install everything.

Can anybody suggest what the issue might be?


Generated MainWindow.xaml crashes VS2010 when you open the designer

  

In my system which is running Windows 7 Enterprise X64 I have a problem viewing some XAML files. At least one of my project XAML files sometimes crashes VS2010 if I open it in the designer or try to view it with Internet Exlorer 8 or Windows Presentation Foundation host. It also happens if i try to display the MainWindow.xaml that is generated by VS 2010.

The contents of MainWindow.xaml are

<Window x:Class="WpfApplication1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
       
    </Grid>
</Window>

 

If I open the debugger when IE8 crashes, the failing stack frame is iefdm2.dll!03992071()

I assume it is some sort installatioin snafu or something but I would hate to have to re-install everything.

Can anybody suggest what the issue might be?


Categories: 
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