WEB开发网
开发学院软件开发C语言 WF4.0 Beta1之旅(5):规则引擎的变化 阅读

WF4.0 Beta1之旅(5):规则引擎的变化

 2010-10-01 08:33:17 来源:WEB开发网   
核心提示: 下面是活动的设计器部分,在WF4.0中提供了对活动设计器的可视化支持:<sad:WorkflowElementDesignerx:Class="Microsoft.Samples.Rules.PolicyDesigner"xmlns="http://schem

下面是活动的设计器部分,在WF4.0中提供了对活动设计器的可视化支持:
<sad:WorkflowElementDesigner x:Class="Microsoft.Samples.Rules.PolicyDesigner"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:sad="clr-namespace:System.Activities.Design;assembly=System.Activities.Design"
  xmlns:sadv="clr-namespace:System.Activities.Design.View;assembly=System.Activities.Design">
  <sad:WorkflowElementDesigner.Resources>
    <sadv:ArgumentToExpressionConverter x:Uid="sadv:ArgumentToExpressionConverter_1" 
     x:Key="argumentToExpressionConverter" />
  </sad:WorkflowElementDesigner.Resources>
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition x:Uid="RowDefinition_1" />
      <RowDefinition x:Uid="RowDefinition_2" />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
      <ColumnDefinition x:Uid="ColumnDefinition_1" Width="70*" />
      <ColumnDefinition x:Uid="ColumnDefinition_2" Width="196*" />
    </Grid.ColumnDefinitions>
    <Label Content="Target Object" Name="label1" Margin="0,5,0,7"/>
    <sadv:ExpressionTextBox 
      x:Uid="ExpressionTextBox_1" 
      Grid.Row="0" Grid.Column="1" 
      AutomationProperties.AutomationId="TargetObject"      
      Width="190" Margin="9,7,9,7" MaxLines="1" 
      VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto" 
      Expression="{Binding Path=ModelItem.TargetObject, Mode=TwoWay, Converter={StaticResource 
             argumentToExpressionConverter}, ConverterParameter=InOut}"
      UseLocationExpression="True"
      OwnerActivity="{Binding Path=ModelItem, Mode=TwoWay}" />
    <Button Content="Edit RuleSet" Name="button1" Width="190" Margin="9,9,9,9" Click="button1_Click" 
     Grid.Row="1" Grid.Column="1" />
  </Grid>
</sad:WorkflowElementDesigner>

Tags:WF 之旅

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接