|
| 1 | +<sap:ActivityDesigner x:Class="Utils.StringUtils.ConvertCRLFDesigner" |
| 2 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 3 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 4 | + xmlns:s="clr-namespace:System;assembly=mscorlib" |
| 5 | + xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation" |
| 6 | + xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation" |
| 7 | + xmlns:sapc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation" > |
| 8 | + |
| 9 | + <sap:ActivityDesigner.Resources> |
| 10 | + <sapc:ArgumentToExpressionConverter x:Key="ArgumentToExpressionConverter" /> |
| 11 | + <DataTemplate x:Key="Collapsed"> |
| 12 | + </DataTemplate> |
| 13 | + <DataTemplate x:Key="Expanded"> |
| 14 | + <Grid> |
| 15 | + <Grid.ColumnDefinitions> |
| 16 | + <ColumnDefinition Width="3*"/> |
| 17 | + <ColumnDefinition Width="7*"/> |
| 18 | + </Grid.ColumnDefinitions> |
| 19 | + <Grid.RowDefinitions> |
| 20 | + <RowDefinition Height="*"/> |
| 21 | + </Grid.RowDefinitions> |
| 22 | + |
| 23 | + <Label Content="Target" /> |
| 24 | + <sapv:ExpressionTextBox |
| 25 | + Expression="{Binding ModelItem.Target, |
| 26 | + ConverterParameter=In, |
| 27 | + Converter={StaticResource ArgumentToExpressionConverter}, |
| 28 | + Mode=TwoWay}" |
| 29 | + ExpressionType="{x:Type s:String}" |
| 30 | + HintText="Enter a string" OwnerActivity="{Binding ModelItem}" |
| 31 | + MaxLines="1" Grid.Column="1" /> |
| 32 | + </Grid> |
| 33 | + |
| 34 | + </DataTemplate> |
| 35 | + <Style x:Key="ExpandOrCollapsedStyle" TargetType="{x:Type ContentPresenter}"> |
| 36 | + <Setter Property="ContentTemplate" Value="{DynamicResource Collapsed}"/> |
| 37 | + <Style.Triggers> |
| 38 | + <DataTrigger Binding="{Binding Path=ShowExpanded}" Value="true"> |
| 39 | + <Setter Property="ContentTemplate" Value="{DynamicResource Expanded}"/> |
| 40 | + </DataTrigger> |
| 41 | + </Style.Triggers> |
| 42 | + </Style> |
| 43 | + </sap:ActivityDesigner.Resources> |
| 44 | + <sap:ActivityDesigner.Icon> |
| 45 | + <DrawingBrush> |
| 46 | + <DrawingBrush.Drawing> |
| 47 | + <DrawingGroup> |
| 48 | + <DrawingGroup.Children> |
| 49 | + <DrawingGroup> |
| 50 | + <DrawingGroup.Transform> |
| 51 | + <MatrixTransform Matrix="1,0,0,1,0,0"/> |
| 52 | + </DrawingGroup.Transform> |
| 53 | + <DrawingGroup.Children> |
| 54 | + <ImageDrawing ImageSource="../images/page_add.png" Rect="0,0,16,16"/> |
| 55 | + </DrawingGroup.Children> |
| 56 | + </DrawingGroup> |
| 57 | + </DrawingGroup.Children> |
| 58 | + </DrawingGroup> |
| 59 | + </DrawingBrush.Drawing> |
| 60 | + </DrawingBrush> |
| 61 | + </sap:ActivityDesigner.Icon> |
| 62 | + <Grid> |
| 63 | + <ContentPresenter Style="{DynamicResource ExpandOrCollapsedStyle}" Content="{Binding}" /> |
| 64 | + </Grid> |
| 65 | +</sap:ActivityDesigner> |
0 commit comments