locked
Bug: Generics in the Variable / Arguments Designer RRS feed

  • Question

  • When I create a variable in designer I have the option to select a type.  I can pick System and that allows me to see some of the generics but not common ones (like List<>).  I found that I could hack into the XAML and force it to let me use the type I want.  However I would like to be able to pick this directly in the designer (not code it in by hand).

    EX:
    -------------------------------------------------
    <p:Activity mc:Ignorable=""
                x:Class="AdvancedVisualizationProcessing.SeriesProcessing"
                xmlns="http://schemas.microsoft.com/netfx/2009/xaml/activities/design"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:scg="clr-namespace:System.Collections.Generic;assembly=mscorlib" >
      <p:Flowchart sad:XamlDebuggerXmlReader.FileName="D:\Downloads\Workflow Tutorials\WF4.0Test\SeriesProcessing.xaml">
        <p:Flowchart.Variables>
          <p:Variable x:TypeArguments="scg:List(x:String)" Name="MyListOfStrings" />
        </p:Flowchart.Variables>

      </p:Flowchart>
    </p:Activity>
    Monday, June 8, 2009 8:03 PM

Answers

  • Masuto,

    1. Browse for Types ...
    2. Type list in the Type Name
    3. Select mscorlib
    4. select List'1
    5. select  string for concrete type in the List

    Thanks

    Roman
    Roman Kiss, MVP Connected System Developer
    Monday, June 8, 2009 8:56 PM

All replies

  • Masuto,

    1. Browse for Types ...
    2. Type list in the Type Name
    3. Select mscorlib
    4. select List'1
    5. select  string for concrete type in the List

    Thanks

    Roman
    Roman Kiss, MVP Connected System Developer
    Monday, June 8, 2009 8:56 PM
  • Why are some of the generics found under System and some under mscorlib?  Is this because LinkedList and such were added later?
    Monday, June 8, 2009 9:18 PM
  • @masuto,

    Yes, these types ship across multiple assemblies.  That is refelected in the type browser.
    Program Manager -- Modeling Platform and Tools http://blogs.msdn.com/mwinkle
    Friday, June 19, 2009 9:20 PM