1

WF4 ワークフロー デザイナーを再ホストしています。

ステート マシンの場合、XAML で sapt:ToolboxItemWrapper を介して "FinalState" を提供する方法がわかりません。

FinalState クラスはなく、「通常の」状態の State クラスのみです。State クラスには IsFinal プロパティがあるので、「FinalState」になるために設定する必要があると思います。

コンストラクターで IsFinal を設定する State から独自の FinalState クラスを派生させようとしましたが、State が封印されているため機能しません。

では、XAML から FinalState を提供するにはどうすればよいでしょうか。

4

1 に答える 1

0

実際に、別のアセンブリにFinalStateクラスがあります。したがって、ステートマシンの使用を追加するには:

<Window.Resources>
    <sys:String x:Key="AssemblyName">System.Activities, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35</sys:String>
    <sys:String x:Key="SACPAssemblyName">System.Activities.Core.Presentation, Version=4.0.0.0, Culture=neutral, PublicKeyToken="31bf3856ad364e35"</sys:String>
</Window.Resources>


<sapt:ToolboxCategory CategoryName="State Machine">

  <sapt:ToolboxItemWrapper  AssemblyName="{StaticResource AssemblyName}">
       <sapt:ToolboxItemWrapper.ToolName>
          System.Activities.Statements.Statemachine
       </sapt:ToolboxItemWrapper.ToolName>
  </sapt:ToolboxItemWrapper>

  <sapt:ToolboxItemWrapper  AssemblyName="{StaticResource AssemblyName}">
       <sapt:ToolboxItemWrapper.ToolName>
          System.Activities.Statements.State
       </sapt:ToolboxItemWrapper.ToolName>
  </sapt:ToolboxItemWrapper>

  <sapt:ToolboxItemWrapper  AssemblyName="{StaticResource SACPAssemblyName}">
       <sapt:ToolboxItemWrapper.ToolName>
          System.Activities.Core.Presentation.FinalState
       </sapt:ToolboxItemWrapper.ToolName>
  </sapt:ToolboxItemWrapper>

</sapt:ToolboxCategory>
于 2012-07-18T08:58:58.520 に答える