locked
how to provide custom expression editor for custom activity property RRS feed

  • Question

  • Hi

    I want to provide a custom expression editor for my custom activity property with button on it. on click of button it should open the dialog window and on selection of value from dialog window value should be come in expression editor.

     Please suggest me , how i can achieve this

     


    Regards, Naveen G
    Wednesday, September 21, 2011 7:08 PM

All replies

  • Hi Naveen,

    You can create custom editor that is dervied from PropertyValueEditor.

    It will be seperate xaml file with code behind file.

    In the constructor of derived class set

    this.InlineEditorTemplate = System.Windows.Application.Current.FindResource(COLLECTIONBROWSER) as DataTemplate;

    and override method

    public override void ShowDialog(PropertyValue propertyValue, IInputElement commandSource)

    where COLLECTIONBROWSER is   a datatemplate . you can create your own data template .

    <DataTemplate x:Key ="CollectionBrowser"> <Grid.ColumnDefinitions>

    <Grid>

    <ColumnDefinition Width ="1*"/><ColumnDefinition Width "Auto"/> </Grid.ColumnDefinitions >  <PE:EditModeSwitchButton Grid.Column ="1"/> </Grid> </DataTemplate>

     <TextBox Grid.Column="0" Text="{Binding StringValue }"/>

     

     

    

    For more details look here.

    http://social.msdn.microsoft.com/Forums/eu/wfprerelease/thread/c8baba98-7d25-4f3f-b23f-5fef2c70478f

    I hope this help you


    MB
    Thursday, September 22, 2011 8:40 AM
  • Hi i am unable to get the code which u have given i have implemented it but it is giving error in datatemplate name. Could u explain more clearly how to do it with complete XAML and class files which u have implemented.


    • Edited by Naga bushan Friday, September 23, 2011 12:36 PM
    Friday, September 23, 2011 12:34 PM
  • Hi Naga,

     

    Please try this link.

    http://msdn.microsoft.com/en-us/library/ee834515.aspx

     

    PLease ask if you need more info on this.

     

    Regards,


    MB
    • Proposed as answer by MadhurBhardwaj Friday, September 23, 2011 12:45 PM
    Friday, September 23, 2011 12:45 PM