<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://uat.community.rws.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12 Non-Production</generator><item><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf</link><pubDate>Thu, 07 May 2020 17:13:05 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4f017ac6-5d68-4e48-8c9c-a5435a81069d</guid><dc:creator>Paul Filkin</dc:creator><comments>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf#comments</comments><description>Current Revision posted to Studio Developers WIKI by Paul Filkin on 5/7/2020 5:13:05 PM&lt;br /&gt;
&lt;p&gt;In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation. Complete code sample&amp;nbsp; can be found&amp;nbsp;&lt;a href="https://github.com/sdl/Sdl-Community/tree/master/TmAnonymizer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-50/description.png"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-03-50/description.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;How to create a View in Studio&lt;/h3&gt;
&lt;p&gt;1. First step is to create a new&amp;nbsp;project in Visual Studio using Trados Studio template.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-03-50/template1.png"&gt;&lt;img alt=" " src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-03-50/template1.png" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. &lt;strong&gt;Create a new user control&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;3. &lt;strong&gt;Create a new class&lt;/strong&gt; which inherits&amp;nbsp;&lt;span style="color:#339966;"&gt;AbstractViewController&lt;/span&gt; class. This class will be the entry point of the application.&lt;/p&gt;
&lt;p&gt;Add the following annotation to newly created class :&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gist.github.com/andreaGhisa/cfd31f3a47bf4a568d5705e4ba636096"&gt;gist.github.com/.../cfd31f3a47bf4a568d5705e4ba636096&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Add the following code to the class:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gist.github.com/andreaGhisa/44f689164571d7f1b4210930c9994442"&gt;gist.github.com/.../44f689164571d7f1b4210930c9994442&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;How to use WPF in your plugin&lt;/h3&gt;
&lt;p&gt;The plugin template by default creates a Windows Forms project. That means the&amp;nbsp;libraries which we need to use to create xaml views are not imported.&lt;/p&gt;
&lt;p&gt;Add the flowing references to your plugin:&amp;nbsp;&lt;span style="color:#339966;"&gt;PresentationFramework.dll,&amp;nbsp;System.Xaml.dll,&amp;nbsp;UIAutomationProvider.dll&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;After adding missing libraries we are ready to create user controls from Presentation Framework. Create a new User Control and name it for example &lt;span style="color:#339966;"&gt;MainViewControl.xaml.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;What we have until now? A&amp;nbsp;User Control which inherits from&amp;nbsp;&lt;strong&gt;System.Windows.Forms&lt;/strong&gt; and another one &lt;strong&gt;from Presentation Framework&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;How to display the user control from Presentation Framework&lt;/h3&gt;
&lt;p&gt;If we take a look at &lt;strong&gt;GetControl()&lt;/strong&gt; method from the class created&amp;nbsp;before it returns a control from Windows Form. &lt;strong&gt;What we need to do is to display the WPF control inside of the Windows Forms control.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;From &lt;strong&gt;Toolbox&amp;nbsp;&lt;/strong&gt;drag&amp;amp;drop an &lt;span style="color:#339966;"&gt;&amp;quot;ElementHost&amp;quot;&lt;/span&gt; to the user control from windows forms.(this element&amp;nbsp;is found&lt;span style="color:#339966;"&gt; System.Windows.Forms.Integration&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;Constructor of windows forms control should look like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gist.github.com/andreaGhisa/592d886921f63fc0a9631c209921f9ad"&gt;gist.github.com/.../592d886921f63fc0a9631c209921f9ad&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Studio Documentation, Plugin, view, wpf, openexchange&lt;/div&gt;
</description></item><item><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf/revision/10</link><pubDate>Wed, 18 Jul 2018 07:45:12 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4f017ac6-5d68-4e48-8c9c-a5435a81069d</guid><dc:creator>Andrea-Melinda Ghisa</dc:creator><comments>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf#comments</comments><description>Revision 10 posted to Studio Developers WIKI by Andrea-Melinda Ghisa on 7/18/2018 7:45:12 AM&lt;br /&gt;
&lt;p&gt;In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation. Complete code sample&amp;nbsp; can be found&amp;nbsp;&lt;a href="https://github.com/sdl/Sdl-Community/tree/master/TmAnonymizer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;How to create a View in Studio&lt;/h3&gt;
&lt;p&gt;1. First step is to create a new&amp;nbsp;project in Visual Studio using Trados Studio template.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. &lt;strong&gt;Create a new user control&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;3. &lt;strong&gt;Create a new class&lt;/strong&gt; which inherits&amp;nbsp;&lt;span style="color:#339966;"&gt;AbstractViewController&lt;/span&gt; class. This class will be the entry point of the application.&lt;/p&gt;
&lt;p&gt;Add the following annotation to newly created class :&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gist.github.com/andreaGhisa/cfd31f3a47bf4a568d5705e4ba636096"&gt;gist.github.com/.../cfd31f3a47bf4a568d5705e4ba636096&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Add the following code to the class:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gist.github.com/andreaGhisa/44f689164571d7f1b4210930c9994442"&gt;gist.github.com/.../44f689164571d7f1b4210930c9994442&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;How to use WPF in your plugin&lt;/h3&gt;
&lt;p&gt;The plugin template by default creates a Windows Forms project. That means the&amp;nbsp;libraries which we need to use to create xaml views are not imported.&lt;/p&gt;
&lt;p&gt;Add the flowing references to your plugin:&amp;nbsp;&lt;span style="color:#339966;"&gt;PresentationFramework.dll,&amp;nbsp;System.Xaml.dll,&amp;nbsp;UIAutomationProvider.dll&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;After adding missing libraries we are ready to create user controls from Presentation Framework. Create a new User Control and name it for example &lt;span style="color:#339966;"&gt;MainViewControl.xaml.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;What we have until now? A&amp;nbsp;User Control which inherits from&amp;nbsp;&lt;strong&gt;System.Windows.Forms&lt;/strong&gt; and another one &lt;strong&gt;from Presentation Framework&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;How to display the user control from Presentation Framework&lt;/h3&gt;
&lt;p&gt;If we take a look at &lt;strong&gt;GetControl()&lt;/strong&gt; method from the class created&amp;nbsp;before it returns a control from Windows Form. &lt;strong&gt;What we need to do is to display the WPF control inside of the Windows Forms control.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;From &lt;strong&gt;Toolbox&amp;nbsp;&lt;/strong&gt;drag&amp;amp;drop an &lt;span style="color:#339966;"&gt;&amp;quot;ElementHost&amp;quot;&lt;/span&gt; to the user control from windows forms.(this element&amp;nbsp;is found&lt;span style="color:#339966;"&gt; System.Windows.Forms.Integration&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;Constructor of windows forms control should look like this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://gist.github.com/andreaGhisa/592d886921f63fc0a9631c209921f9ad"&gt;gist.github.com/.../592d886921f63fc0a9631c209921f9ad&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Studio Documentation, Plugin, view, wpf, openexchange&lt;/div&gt;
</description></item><item><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf/revision/9</link><pubDate>Wed, 16 May 2018 11:38:00 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4f017ac6-5d68-4e48-8c9c-a5435a81069d</guid><dc:creator>Andrea-Melinda Ghisa</dc:creator><comments>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf#comments</comments><description>Revision 9 posted to Studio Developers WIKI by Andrea-Melinda Ghisa on 5/16/2018 11:38:00 AM&lt;br /&gt;
&lt;p&gt;In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation. Complete code sample&amp;nbsp; can be found&amp;nbsp;&lt;a href="https://github.com/sdl/Sdl-Community/tree/master/TmAnonymizer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;How to create a View in Studio&lt;/h3&gt;
&lt;p&gt;1. First step is to create a new&amp;nbsp;project in Visual Studio using Trados Studio template.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. &lt;strong&gt;Create a new user control&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;3. &lt;strong&gt;Create a new class&lt;/strong&gt; which inherits&amp;nbsp;&lt;span style="color:#339966;"&gt;AbstractViewController&lt;/span&gt; class. This class will be the entry point of the application.&lt;/p&gt;
&lt;p&gt;Add the following annotation to newly created class :&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; [View(&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Id = &amp;quot;View&amp;nbsp;Id&amp;quot;,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Name = &amp;quot;View Name&amp;quot;,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Description = &amp;quot;Description,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; LocationByType = typeof(TranslationStudioDefaultViews.TradosStudioViewsLocation))]&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Add the following code to the class:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;private static readonly Lazy&amp;lt;YourControl&amp;gt; Control = new Lazy&amp;lt;YourControl&amp;gt;(() =&amp;gt; new YourControl());&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;&lt;code&gt; protected override void Initialize(IViewContext context)&lt;/code&gt;&lt;br /&gt;&lt;code&gt; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; }&lt;/code&gt;&lt;br /&gt;&lt;code&gt; protected override Control GetContentControl()&lt;/code&gt;&lt;br /&gt;&lt;code&gt; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; return Control.Value;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; }&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;How to use WPF in your plugin&lt;/h3&gt;
&lt;p&gt;The plugin template by default creates a Windows Forms project. That means the&amp;nbsp;libraries which we need to use to create xaml views are not imported.&lt;/p&gt;
&lt;p&gt;Add the flowing references to your plugin:&amp;nbsp;&lt;span style="color:#339966;"&gt;PresentationFramework.dll,&amp;nbsp;System.Xaml.dll,&amp;nbsp;UIAutomationProvider.dll&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;After adding missing libraries we are ready to create user controls from Presentation Framework. Create a new User Control and name it for example &lt;span style="color:#339966;"&gt;MainViewControl.xaml.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;What we have until now? A&amp;nbsp;User Control which inherits from&amp;nbsp;&lt;strong&gt;System.Windows.Forms&lt;/strong&gt; and another one &lt;strong&gt;from Presentation Framework&lt;/strong&gt;.&lt;/p&gt;
&lt;h3&gt;How to display the user control from Presentation Framework&lt;/h3&gt;
&lt;p&gt;If we take a look at &lt;strong&gt;GetControl()&lt;/strong&gt; method from the class created&amp;nbsp;before it returns a control from Windows Form. &lt;strong&gt;What we need to do is to display the WPF control inside of the Windows Forms control.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;From &lt;strong&gt;Toolbox&amp;nbsp;&lt;/strong&gt;drag&amp;amp;drop an &lt;span style="color:#339966;"&gt;&amp;quot;ElementHost&amp;quot;&lt;/span&gt; to the user control from windows forms.(this element&amp;nbsp;is found&lt;span style="color:#339966;"&gt; System.Windows.Forms.Integration&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;Constructor of windows forms control should look like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt;public YourWindowsFormsControl()&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; {&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; InitializeComponent();&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; var wpfMainWindow = new MainViewControl(); &lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; wpfMainWindow.InitializeComponent(); &lt;span style="color:#000000;"&gt;&lt;span style="font-family:Verdana, Arial, Helvetica, sans-serif;"&gt;/&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;span style="color:#000000;"&gt;&lt;code&gt;/initialize wpf control&lt;/code&gt;&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; elementHost.Child =wpfMainWindow; &lt;span style="color:#000000;"&gt;//assign the control to element host&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; }&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Studio Documentation, Plugin, view, wpf, openexchange&lt;/div&gt;
</description></item><item><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf/revision/8</link><pubDate>Wed, 16 May 2018 11:34:52 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4f017ac6-5d68-4e48-8c9c-a5435a81069d</guid><dc:creator>Andrea-Melinda Ghisa</dc:creator><comments>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf#comments</comments><description>Revision 8 posted to Studio Developers WIKI by Andrea-Melinda Ghisa on 5/16/2018 11:34:52 AM&lt;br /&gt;
&lt;p&gt;In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation. Compete code sample&amp;nbsp; can be found&amp;nbsp;&lt;a href="https://github.com/sdl/Sdl-Community/tree/master/TmAnonymizer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;How to create a View in Studio&lt;/h3&gt;
&lt;p&gt;1. First step is to create a new&amp;nbsp;project in Visual Studio using Trados Studio template.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. &lt;strong&gt;Create a new user control&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;3. &lt;strong&gt;Create a new class&lt;/strong&gt; which inherits&amp;nbsp;&lt;span style="color:#339966;"&gt;AbstractViewController&lt;/span&gt; class. This class will be the entry point of the application.&lt;/p&gt;
&lt;p&gt;Add the following annotation to newly created class :&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; [View(&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Id = &amp;quot;View&amp;nbsp;Id&amp;quot;,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Name = &amp;quot;View Name&amp;quot;,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Description = &amp;quot;Description,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; LocationByType = typeof(TranslationStudioDefaultViews.TradosStudioViewsLocation))]&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Add the following code to the class:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;private static readonly Lazy&amp;lt;YourControl&amp;gt; Control = new Lazy&amp;lt;YourControl&amp;gt;(() =&amp;gt; new YourControl());&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;&lt;code&gt; protected override void Initialize(IViewContext context)&lt;/code&gt;&lt;br /&gt;&lt;code&gt; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; }&lt;/code&gt;&lt;br /&gt;&lt;code&gt; protected override Control GetContentControl()&lt;/code&gt;&lt;br /&gt;&lt;code&gt; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; return Control.Value;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; }&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;How to use WPF in your plugin&lt;/h3&gt;
&lt;p&gt;The plugin template by default creates a Windows Forms project that means the&amp;nbsp;libraries which we need to use to create xaml views are not imported.&lt;/p&gt;
&lt;p&gt;Add the flowing references to your plugin:&amp;nbsp;&lt;span style="color:#339966;"&gt;PresentationFramework.dll,&amp;nbsp;System.Xaml.dll,&amp;nbsp;UIAutomationProvider.dll&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;After adding missing libraries we are ready to create user controls from Presentation Framework. Create a new User Control and name it for example &lt;span style="color:#339966;"&gt;MainViewControl.xaml.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;What we have until now? A&amp;nbsp;User Control which inherits from&amp;nbsp;System.Windows.Forms and another one from Presentation Framework.&lt;/p&gt;
&lt;h3&gt;How to display the user control from Presentation Framework&lt;/h3&gt;
&lt;p&gt;If we take a look at GetControl() method from the class created&amp;nbsp;before it returns a control from Windows Form. &lt;strong&gt;What we need to do is to display the WPF control inside of the Windows Forms control.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;From &lt;strong&gt;Toolbox&amp;nbsp;&lt;/strong&gt;drag&amp;amp;drop an &lt;span style="color:#339966;"&gt;&amp;quot;ElementHost&amp;quot;&lt;/span&gt; to the user control from windows forms.(this element&amp;nbsp;is found&lt;span style="color:#339966;"&gt; System.Windows.Forms.Integration&lt;/span&gt;).&lt;/p&gt;
&lt;p&gt;Constructor of windows forms control should look like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt;public YourWindowsFormsControl()&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; {&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; InitializeComponent();&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; var wpfMainWindow = new MainViewControl(); &lt;span style="color:#000000;"&gt;//initialize wpf control&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; wpfMainWindow.InitializeComponent();&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; elementHost.Child =wpfMainWindow; &lt;span style="color:#000000;"&gt;//assign the control to element host&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; }&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Studio Documentation, Plugin, view, wpf, openexchange&lt;/div&gt;
</description></item><item><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf/revision/7</link><pubDate>Wed, 16 May 2018 10:18:31 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4f017ac6-5d68-4e48-8c9c-a5435a81069d</guid><dc:creator>Andrea-Melinda Ghisa</dc:creator><comments>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf#comments</comments><description>Revision 7 posted to Studio Developers WIKI by Andrea-Melinda Ghisa on 5/16/2018 10:18:31 AM&lt;br /&gt;
&lt;p&gt;In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation. Compete code sample&amp;nbsp; can be found&amp;nbsp;&lt;a href="https://github.com/sdl/Sdl-Community/tree/master/TmAnonymizer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;How to create a View in Studio&lt;/h3&gt;
&lt;p&gt;1. First step is to create a new&amp;nbsp;project in Visual Studio using Trados Studio template.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. &lt;strong&gt;Create a new user control&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;3. &lt;strong&gt;Create a new class&lt;/strong&gt; which inherits&amp;nbsp;&lt;span style="color:#339966;"&gt;AbstractViewController&lt;/span&gt; class. This class will be the entry point of the application.&lt;/p&gt;
&lt;p&gt;Add the following annotation to newly created class :&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; [View(&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Id = &amp;quot;View&amp;nbsp;Id&amp;quot;,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Name = &amp;quot;View Name&amp;quot;,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Description = &amp;quot;Description,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; LocationByType = typeof(TranslationStudioDefaultViews.TradosStudioViewsLocation))]&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Add the following code to the class:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;private static readonly Lazy&amp;lt;YourControl&amp;gt; Control = new Lazy&amp;lt;YourControl&amp;gt;(() =&amp;gt; new YourControl());&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;&lt;code&gt; protected override void Initialize(IViewContext context)&lt;/code&gt;&lt;br /&gt;&lt;code&gt; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; }&lt;/code&gt;&lt;br /&gt;&lt;code&gt; protected override Control GetContentControl()&lt;/code&gt;&lt;br /&gt;&lt;code&gt; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; return Control.Value;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; }&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;How to use WPF in your plugin&lt;/h3&gt;
&lt;p&gt;The plugin template by default creates a Windows Forms project that means the&amp;nbsp;libraries which we need to use to create xaml views are not imported.&lt;/p&gt;
&lt;p&gt;Add the flowing references to your plugin:&amp;nbsp;&lt;span style="color:#339966;"&gt;PresentationFramework.dll,&amp;nbsp;System.Xaml.dll,&amp;nbsp;UIAutomationProvider.dll&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;After adding missing libraries we are ready to create user controls from Presentation Framework.&lt;/p&gt;
&lt;p&gt;Create a new User Control and name it for example &lt;span style="color:#339966;"&gt;MainViewControl.xaml&lt;/span&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Studio Documentation, Plugin, view, wpf, openexchange&lt;/div&gt;
</description></item><item><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf/revision/6</link><pubDate>Wed, 16 May 2018 10:09:05 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4f017ac6-5d68-4e48-8c9c-a5435a81069d</guid><dc:creator>Andrea-Melinda Ghisa</dc:creator><comments>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf#comments</comments><description>Revision 6 posted to Studio Developers WIKI by Andrea-Melinda Ghisa on 5/16/2018 10:09:05 AM&lt;br /&gt;
&lt;p&gt;In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation. Compete code sample&amp;nbsp; can be found&amp;nbsp;&lt;a href="https://github.com/sdl/Sdl-Community/tree/master/TmAnonymizer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;How to create a View in Studio&lt;/h3&gt;
&lt;p&gt;1. First step is to create a new&amp;nbsp;project in Visual Studio using Trados Studio template.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. &lt;strong&gt;Create a new user control&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;3. &lt;strong&gt;Create a new class&lt;/strong&gt; which inherits&amp;nbsp;&lt;span style="color:#339966;"&gt;AbstractViewController&lt;/span&gt; class. This class will be the entry point of the application.&lt;/p&gt;
&lt;p&gt;Add the following annotation to newly created class :&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; [View(&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Id = &amp;quot;View&amp;nbsp;Id&amp;quot;,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Name = &amp;quot;View Name&amp;quot;,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; Description = &amp;quot;Description,&lt;/span&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;span style="color:#339966;"&gt; LocationByType = typeof(TranslationStudioDefaultViews.TradosStudioViewsLocation))]&amp;nbsp;&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Add the following code to the class:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;private static readonly Lazy&amp;lt;YourControl&amp;gt; Control = new Lazy&amp;lt;YourControl&amp;gt;(() =&amp;gt; new YourControl());&lt;/code&gt;&lt;br /&gt; &lt;br /&gt;&lt;code&gt; protected override void Initialize(IViewContext context)&lt;/code&gt;&lt;br /&gt;&lt;code&gt; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; }&lt;/code&gt;&lt;br /&gt;&lt;code&gt; protected override Control GetContentControl()&lt;/code&gt;&lt;br /&gt;&lt;code&gt; {&lt;/code&gt;&lt;br /&gt;&lt;code&gt; return Control.Value;&lt;/code&gt;&lt;br /&gt;&lt;code&gt; }&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Studio Documentation, Plugin, view, wpf, openexchange&lt;/div&gt;
</description></item><item><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf/revision/5</link><pubDate>Wed, 16 May 2018 10:06:54 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4f017ac6-5d68-4e48-8c9c-a5435a81069d</guid><dc:creator>Andrea-Melinda Ghisa</dc:creator><comments>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf#comments</comments><description>Revision 5 posted to Studio Developers WIKI by Andrea-Melinda Ghisa on 5/16/2018 10:06:54 AM&lt;br /&gt;
&lt;p&gt;In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation. Compete code sample&amp;nbsp; can be found&amp;nbsp;&lt;a href="https://github.com/sdl/Sdl-Community/tree/master/TmAnonymizer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;How to create a View in Studio&lt;/h3&gt;
&lt;p&gt;1. First step is to create a new&amp;nbsp;project in Visual Studio using Trados Studio template.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. &lt;strong&gt;Create a new class&lt;/strong&gt; which inherits&amp;nbsp;&lt;span style="color:#339966;"&gt;AbstractViewController&lt;/span&gt; class. This class will be the entry point of the application.&lt;/p&gt;
&lt;p&gt;Add the following annotation to newly created class :&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#339966;"&gt; [View(&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339966;"&gt; Id = &amp;quot;View&amp;nbsp;Id&amp;quot;,&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339966;"&gt; Name = &amp;quot;View Name&amp;quot;,&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339966;"&gt; Description = &amp;quot;Description,&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339966;"&gt; LocationByType = typeof(TranslationStudioDefaultViews.TradosStudioViewsLocation))]&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;3. &lt;strong&gt;Create a new user control&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Studio Documentation, Plugin, view, wpf, openexchange&lt;/div&gt;
</description></item><item><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf/revision/4</link><pubDate>Wed, 16 May 2018 10:05:39 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4f017ac6-5d68-4e48-8c9c-a5435a81069d</guid><dc:creator>Andrea-Melinda Ghisa</dc:creator><comments>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf#comments</comments><description>Revision 4 posted to Studio Developers WIKI by Andrea-Melinda Ghisa on 5/16/2018 10:05:39 AM&lt;br /&gt;
&lt;p&gt;In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation. Compete code sample&amp;nbsp; can be found&amp;nbsp;&lt;a href="https://github.com/sdl/Sdl-Community/tree/master/TmAnonymizer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;How to create a View in Studio&lt;/h3&gt;
&lt;p&gt;1. First step is to create a new&amp;nbsp;project in Visual Studio using Trados Studio template.&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/template1.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;2. Create a new class which inherits&amp;nbsp;&lt;span style="color:#339966;"&gt;AbstractViewController&lt;/span&gt; class. This class will be the entry point of the application.&lt;/p&gt;
&lt;p&gt;Add the following annotation to newly created class :&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#339966;"&gt; [View(&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339966;"&gt; Id = &amp;quot;View&amp;nbsp;Id&amp;quot;,&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339966;"&gt; Name = &amp;quot;View Name&amp;quot;,&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339966;"&gt; Description = &amp;quot;Description,&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#339966;"&gt; LocationByType = typeof(TranslationStudioDefaultViews.TradosStudioViewsLocation))]&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Studio Documentation, Plugin, view, wpf, openexchange&lt;/div&gt;
</description></item><item><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf/revision/3</link><pubDate>Wed, 16 May 2018 09:57:59 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4f017ac6-5d68-4e48-8c9c-a5435a81069d</guid><dc:creator>Andrea-Melinda Ghisa</dc:creator><comments>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf#comments</comments><description>Revision 3 posted to Studio Developers WIKI by Andrea-Melinda Ghisa on 5/16/2018 9:57:59 AM&lt;br /&gt;
&lt;p&gt;In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation. Compete code sample&amp;nbsp; can be found&amp;nbsp;&lt;a href="https://github.com/sdl/Sdl-Community/tree/master/TmAnonymizer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="/cfs-file/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png"&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-wikis-components-files/00-00-00-00-39/description.png" alt=" " /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Studio Documentation, Plugin, view, wpf, openexchange&lt;/div&gt;
</description></item><item><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf/revision/2</link><pubDate>Wed, 16 May 2018 09:54:33 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4f017ac6-5d68-4e48-8c9c-a5435a81069d</guid><dc:creator>Andrea-Melinda Ghisa</dc:creator><comments>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf#comments</comments><description>Revision 2 posted to Studio Developers WIKI by Andrea-Melinda Ghisa on 5/16/2018 9:54:33 AM&lt;br /&gt;
&lt;p&gt;In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Studio Documentation, wpf, openexchange&lt;/div&gt;
</description></item><item><title>How to create a View plugin in Studio using WPF</title><link>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf/revision/1</link><pubDate>Wed, 16 May 2018 09:54:02 GMT</pubDate><guid isPermaLink="false">10acfa76-f078-475b-a7ef-fc5b3e8d2934:4f017ac6-5d68-4e48-8c9c-a5435a81069d</guid><dc:creator>Andrea-Melinda Ghisa</dc:creator><comments>https://uat.community.rws.com/developers-more/trados-portfolio/trados-studio-developers/w/trados-studio-api/3254/how-to-create-a-view-plugin-in-studio-using-wpf#comments</comments><description>Revision 1 posted to Studio Developers WIKI by Andrea-Melinda Ghisa on 5/16/2018 9:54:02 AM&lt;br /&gt;
&lt;p&gt;In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;

&lt;div style="font-size: 90%;"&gt;Tags: Studio Documentation, openexchange&lt;/div&gt;
</description></item></channel></rss>