实际上有一个 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>