Tuesday, January 27, 2009

Sometimes it is useful to leverage a general Visual Studio Project up to a Windows Workflow Project. To setup Workflow-Designer-support, a manual modification of the targeted ".csproj"-file is needed. Otherwise errors come up like this:

"The service 'System.Workflow.ComponentModel.Design.IIdentifierCreationService' must be installed for this operation to succeed. Ensure that this service is available. "

The entry for the project-guid has to be replaced by this:

<ProjectTypeGuids>{14822709-B5A1-4724-98CA-57A101D1B079};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>

Tuesday, January 27, 2009 10:31:56 PM (GMT Standard Time, UTC+00:00)
 Wednesday, May 21, 2008

If you declare a read-only property as defined by the two ways below, you cannot bind a property to it by using IDE (database icon is not available in this case):

1.

private static DependencyProperty TextToDisplayProperty =

    DependencyProperty.Register("TextToDisplay", typeof(System.String), typeof(Activity1));

 

[Description("The text to output to the console")]

public string TextToDisplay

{

    get { return (string)base.GetValue(Activity1.TextToDisplayProperty); }

}

 

2.

 

private static DependencyProperty TextToDisplayProperty =

    DependencyProperty.Register("TextToDisplay", typeof(System.String), typeof(Activity1), new PropertyMetadata(DependencyPropertyOptions.ReadOnly));

 

[Description("The text to output to the console")]

public string TextToDisplay

{

    get { return (string)base.GetValue(Activity1.TextToDisplayProperty); }

    set { base.SetValue(Activity1.TextToDisplayProperty, value); }

}

 

Although there exists a crippled way to make it happen anyway here's the statement of the Microsoft Product Group :


"General guidance is that read only properties should not be bound. The UI allows it due to the bug. In dev10 we will fix this and it should no longer be possible through the designer, but probably still possible in code. Please avoid using this pattern. We know it works, but it’s not supported or tested. Anyway, we will not disable it in code, since we now know someone has a dependency on it."

.NET | WF
Wednesday, May 21, 2008 8:15:48 PM (GMT Standard Time, UTC+00:00)
Latest Postings
Tags
History
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
License
Except where otherwise noted, content on this site is licensed under Creative Commons Attribution 3.0 Unported License:
Creative Commons Attribution 3.0 Unported License