RWS Community
RWS Community
  • Site

Trados Go

Trados Studio

Trados Ignite

Trados Team

Trados Accelerate

Trados Enterprise

Trados GroupShare

Passolo

MultiTerm

RWS AppStore

Connectors

Beta Groups

Managed Translation

MultiTrans

TMS

Trados Enterprise

WorldServer

Language Weaver

Language Weaver Edge

Language Weaver Connectors

Language Weaver in Trados Studio

 

 

Content Champions

Tridion Docs

Tridion Sites

Contenta

LiveContent

XPP

Trados Go Ideas

Trados Studio Ideas

Trados Ignite Ideas

Trados GroupShare Ideas

Trados Team Ideas

Trados Team Terminology Ideas

Trados Enterprise & Accelerate Ideas

MultiTerm Ideas

Passolo Ideas

RWS Appstore Ideas

Tridion Docs Ideas

Tridion Sites Ideas

Language Weaver Ideas

Language Weaver Edge Ideas

Managed Translation - Enterprise Ideas

TMS Ideas

WorldServer Ideas

Trados Enterprise Ideas

XPP Ideas

GroupShare Developers

Language Cloud Developers

MultiTerm Developers

Passolo Developers

Trados Studio Developers

Managed Translation Developers

TMS Developers

WorldServer Developers

Tridion Docs Developers

XPP Developers

Language Combinations by Language Services

RWS Training & Certification

Style Guides

LDE Korean Vendor Support

RWS Campus

Trados Approved Trainers

Nordic Tridion Docs User Group

Tridion West Coast User Group

Community Ops

RWS Community Internal Group

AURORA

Internal Trados Ideas

Linguistic Validation

Mercury

QA Tools

RI Operational Excellence

Trados Inspired

XPP Cloud

Recognition & Reward System

RWS Community Platform Related Questions

Community Solutions Hub (Trados)

About RWS

Events

RWS Services: Train AI & others

RWS Training & Certification

To RWS Support

  • Search
  • Translate

    Detecting language please wait for.......


    Powered by
  • User
  • Site
  • Search
  • User
  • Developers
  • Trados Portfolio
  • Trados Studio Developers
  • More
  • Cancel
Trados Studio Developers

Trados Studio Developers > Studio Developers WIKI

How to create a View plugin in Studio using WPF
  • Home
  • Trados Studio developers forum
  • Studio Developers WIKI
  • Studio Developers Blog
  • More
  • Cancel
  • New
Show Translation Options

Detecting language please wait for.......


Powered by
Trados Studio Developers requires membership for participation - click to join
  • -Trados Studio API
    • Developer Licences
    • +Getting Started
    • -Knowledgebase
      • -How to...
        • How to create a project using public api
        • How to create a View plugin in Studio using WPF
        • How to sign an class library using Sdl Community key
        • +How to use Batch Tasks plugins
        • How to use Studio Ribbon Tabs
        • How to use Tell Me API
        • How to use the Studio Useful Tips service
        • +How to use the Translation Memory API
      • +Studio 2015
      • +Studio 2019
      • +Studio 2021
      • +Trados Studio 2022

How to create a View plugin in Studio using WPF

In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation. Complete code sample  can be found here.

How to create a View in Studio

1. First step is to create a new project in Visual Studio using Trados Studio template.

2. Create a new user control

3. Create a new class which inherits AbstractViewController class. This class will be the entry point of the application.

Add the following annotation to newly created class :

Add the following code to the class:

How to use WPF in your plugin

The plugin template by default creates a Windows Forms project. That means the libraries which we need to use to create xaml views are not imported.

Add the flowing references to your plugin: PresentationFramework.dll, System.Xaml.dll, UIAutomationProvider.dll

After adding missing libraries we are ready to create user controls from Presentation Framework. Create a new User Control and name it for example MainViewControl.xaml.

What we have until now? A User Control which inherits from System.Windows.Forms and another one from Presentation Framework.

How to display the user control from Presentation Framework

If we take a look at GetControl() method from the class created before it returns a control from Windows Form. What we need to do is to display the WPF control inside of the Windows Forms control.

From Toolbox drag&drop an "ElementHost" to the user control from windows forms.(this element is found System.Windows.Forms.Integration).

Constructor of windows forms control should look like this:

Tags:

Studio Documentation
Plugin
view
wpf
openexchange
  • Share
  • History
  • More
  • Cancel
Related
Recommended
  • Our Terms of Use
  • Copyright
  • Privacy
  • Security
  • Anti-slavery Statement
  • Cookie Notice
  • YouTube