使用silverlight构建一个工作流设计器(五)
2009-05-05 12:06:42 来源:WEB开发网矩形和圆形分别用EllipseGeometry和RectangleGeometry类进行裁减就可以了,对于菱形,需要使用PathGeometry类进行裁减,这个类的使用有点复杂,需要定义多个转折点。然后这些点围成一个菱形。
5.3 给活动和规则增加配置界面
为了给活动设置类型,我们需要给活动增加一个配置界面,具体还是增加一个用户控件 ,xaml代码如下:
<UserControl x:Class="Shareidea.Web.UI.Control.Workflow.Setting.ActivitySetting"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
MouseLeftButtonDown="UserControl_MouseLeftButtonDown"
MouseLeftButtonUp="UserControl_MouseLeftButtonUp"
MouseMove="UserControl_MouseMove"
>
<Grid x:Name="LayoutRoot" >
<Border Background="Gold" CornerRadius="30" >
<StackPanel VerticalAlignment="Top" Margin="20" >
<Grid ShowGridLines="False">
<Grid.RowDefinitions>
<RowDefinition Height="30" ></RowDefinition>
<RowDefinition Height="30" ></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="60" ></ColumnDefinition>
<ColumnDefinition Width="200"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="活动名称" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="0"></TextBlock>
<TextBlock Text="活动类型" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="0" Grid.Row="1"></TextBlock>
<TextBox Name="txtActivityName" Width="200" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="0"></TextBox>
<ComboBox Name="cbActivityType" Width="200" VerticalAlignment="Center" HorizontalAlignment="Left" Grid.Column="1" Grid.Row="1">
<ComboBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" >
<TextBlock Text="{Binding Path=Name}" Visibility="Collapsed" />
<TextBlock Text="{Binding Path=Text}" VerticalAlignment="Center"/>
</StackPanel>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0 10 0 0" Orientation="Horizontal" >
<Button Name="btnSave" Content="保存" Margin="0 0 0 0" Width="60" Height="30" Click="btnSave_Click" ></Button>
<Button Name="btnClose" Content="关闭" Margin="10 0 0 0" Width="60" Height="30" Click="btnClose_Click" ></Button>
</StackPanel>
</StackPanel>
</Border>
</Grid>
</UserControl>
Tags:使用 silverlight 构建
编辑录入:爽爽 [复制链接] [打 印]更多精彩
赞助商链接