How to create plugin with Devexpress Library

  • Create a new project and add Devexpress references including Uniconta’s library – ClientTools, Uniconta.Common, and Uniconta.WindowsAPI
  • It is required to register your plugin with Uniconta applicaiton. To do that make a class and inherit IPluginControlNow inside RegisterControls function, register all the pages you create

    There are two type of pages that can be created: Grid Page & Form Page.

Grid Page

  • Add a new WPF user control
  • Inside the .xaml file
    • Change <UserControl> tag to
    • Add reference of Uniconta.ClientTools.Controls
    • Add Ribbon Control
    • Add Grid (DebtorGrid used here is created in .cs file)
    • Add a column binded to property “Account” use x:Name
  • Inside .cs file inherit class from GridBasePage public partial class GridPage : GridBasePage
    • Inherit the type of grid, in our example we are getting Debtor Grid
    • Give GridPage a unique name
    • Inherit Grid constructor with base(null) & initialize
    • To bind the grid with Debitors & initialize it inside Grid constructor
    • Now to add ribbon buttons to Ribbon Control call AddRibbonItems function with List<TreeRibbon>
      Then call SetRibbonControl with ribbon and grid as parameters.

      To add menu items

      Full list of icons can be found here: https://www.uniconta.com/da/developers-unipedia-global/icon-dictionary/
      Clickable events for ribbon menu can be created like this

To hide User Field columns and create your own in XAML, the following function can be overridden and return false

 

Form Page

Creating form page is similar to Grid page, except the following

  • Inside the .cs file
    • inherit from FormBasePage
    • There are two type constructor required, one for edit and one for add
    • Modified Row
  • In .XAML
    • different editors like text editor or lookup editor can be added. E.g.

To hide User fields and create your own in XAML, the following function can be overridden and return false