Configure visibility of submit/cancel buttons for Silverlight forms hosted in the Task List

To create custom submit and cancel buttons in yourSilverlightSilverlightStringObject form, you can configure the FormProperties class in order to set the visibility of the default buttons to false.

Procedure

  1. From the Project tree, open the file, MainPage.xaml.cs.
  2. In the Main Page constructor, set the form property values by using the code below.
    public MainPage()
    {
             
       ProficyComposition.SatisfyImports(this);
       InitializeComponent();
       _interfaceHelpers[typeof(IResourceParameters)] = new FragmentMetadataByAttributes(this);
       _interfaceHelpers[typeof(IFragmentInitialization)] = new FragmentInitialization(this);
        
       InitializeProficyData();
                     
       FormProperties.SetIsSubmitVisible(this, false);          
       FormProperties.SetIsCancelVisible(this, false);
      
    }
  3. The Submit button can be enabled or disabled depending on the interaction of the operator with the Task List. For example, by adding the following call method and setting the value in the form code, the Submit button becomes disabled after the operator performs an action: FormProperties.SetIsSubmitEnabled(this, false).
    You can use this value to ensure that a form is submitted only after valid data is entered to prevent premature form submission.
  4. To add code-designed forms to a workflow, see Configure a Form activity.