Digital Transformation with Intelligent content

Studio Look & Feel in your 3rd party plugin

With the release of SDL Trados Studio 2019 SR2 two new APIs were exposed which will allow you to take advantage of Studio styles in your plugin: 


  •  Sdl.Desktop.Platform.Styles.dll 
  •  Sdl.Desktop.Platform.Controls.dll
In order to use Studio styles, your plugin must be written in WPF.

In this blog we will be present some Studio styles and controls and how you can use them in your application.

Sdl.Desktop.Platform.Styles.dll

In this API were released following Studio resources: 

  • Buttons
  • Checkbox 
  • Combobox 
  • DataGrid
  • Generic Error style
  • Groupbox 
  • NumericUpDown 
  • Progress Ring (Asterisk)
  • Radio Button 
  • TextBlock 
  • TextBox 
  • TreeView

How to use resource styles in your plugin?

First of all you have to import all the .xaml files you want to use in your application.
1

Buttons

There are several button styles exposed:
2
After you import the resource you can use it as follows:
25

Textboxes

There are several textbox styles exposed, bellow you can see few examples:
5
After you import the resource you can use it as follows:
6

Data grid

7
Below you can see an data grid code example.
8

Groupbox and RadioButtons

9
Code sample
10

Asterisk Progress ring

SDL progress ring has a dependency to a 3rd party application named MahApps.Metro. In order to use the progress ring you have to download into Visual Studio.

Please make sure you download 1.5.0 version.

11

Sdl.Desktop.Platform.Controls.dll

In this API were released following Studio `controls`:
12
In this API were released following Studio behaviours:
13

How to use Studio Controls in your plugin?

First of all you have to import the API in your application:
26

Watermark TextBox

27
Above code is rendered as follows:
15
After you start to type, a Clear button will appear in the textbox. You will need to give your own implementetion for clear command. An example of the command can be found below [CommandHandler implementation]:
16

Bindable PasswordBox

17
In your view model you'll have `Password` property:
18

Numeric UpDown

19

Drag&Drop Behaviour

19
211

Window loaded Behaviour

28

WebBrowser BindableSource Behavior

29

TextBlock AutoToolTip Behavior

30

WebBrowser Content Source

31
Above code is rendered as follows:
23