In the following tutorial will be explained how create an View in Studio using Window Presentation Foundation. Compete 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 :
[View( Id = "View Id", Name = "View Name", Description = "Description, LocationByType = typeof(TranslationStudioDefaultViews.TradosStudioViewsLocation))]
Add the following code to the class:
private static readonly Lazy<YourControl> Control = new Lazy<YourControl>(() => new YourControl());
protected override void Initialize(IViewContext context) { } protected override Control GetContentControl() { return Control.Value; }
Translate

