Best way to implement a multilingual application in silverlight and WPF - c#

I have always been interested in how should I implement a multilingual applications and what or which way I should go to deal with this and also what's the best way to control the layouts in application scope? I've read many articles but the more read, the more confused I get. I want to know Is there any standard pattern to implement application such as this.
Any advice will be helpful.

I have found Location using MarkupExtension the best way to do localization in WPF and I also have successfully used it in one of my WPF projects.
It allows you to change the language of whole application at run-time. You can allow user to select and change language at run-time without requiring user to restart the app.

I'm currently developing a multilingual application, these links helped me a lot:
WPF Globalization and Localization Overview
WPF Localization Guidance
IMO working with BAML is very painful instead I'm using WPF localization extension now, It's very good library and very easy to use.

Related

C# - Custom GUI Design

So over the years I have seen quite a few C# and VB applications which have custom UI designs. One of which I can give an example of is the DayZCommander (C#) application which looks like this:
I was wondering this because I wanted to start making login forms which look like this (note this is just a photoshop render):
And just use it for overall form design.
If you can give me some information, or an answer on this topic please do.
Thanks.
First of all you'll have to use WPF to easily achieve these kinda results (It might be possible with WinForms but it will very hard).
You can also use 3rd party controls like MahApps Metro (also available using NuGet). Here's an example of what you can end up with :
You have also tools like Microsoft Expression Blend that will make creating animated UIs/Custom control templates very easy. but sooner or later you'll to dive in XAML to create your own custom control templates but that's beyond the scope of this answer (there are plenty of good tutorials online).

Embed html in C# Forms

Is there a way to embed HTML into a windows forms custom usercontrol? I want to create a lightweight control to be used in a .NET 4.0 application, but since the contents of it is viable to change, I was thinking using HTML to lay it out might be easiest. Is there a way to achieve this in windows forms? There are some other topics with C# and HTML but pretty sure non involves creating a control that parses HTML and displays it.
Thanks
You could use a WebBrowser, but I'd recommend not going down that path. Just use traditional controls to accomplish what you need, if at all possible, maybe combined with a little GDI+.
A WebBrowser would be your best bet in terms of ease of use and maintenance. You can have further control over the contents themselves by accessing the browser.Document.DomDocument interfaces and events. I would not recommend using GDI since it can become a pain to maintain and manage custom rendering in the long run.
I have been trying to do a similar thing and have found awesomium. They have a dotnet and mono wrapper and quite fine grain control over the whole thing acts. It is also free as long as your company makes less than 100k a year.
Forgot to mention it is a browser that you basically embed in your application so you don't need to worry about the user not having it installed or anything and is consistant over pc's and OS's

dynamic string localization in WPF

I have a C#/WPF application and I am attempting to add multi-language support. From my looking around I've found that using resource files of string values for each language is how I should go about doing this. Then update the CultureInfo. This seems to work fine if the culture info is set at or before the creation of the window, but I want the ability to dynamically change the culture. How can I do this? I've tried playing around with binding and dynamicResource, but couldn't figure out how to get either one to work. I guess I should add that I'm pretty much a beginner with the WPF stuff.
Take a look at this Codeplex project. It provides a dynamic localization system that blends well with WPF's binding system.

What is the best C# font selection control?

To start off with, a little context for the question...
I have a C# .NET 2.0 program that generates web pages... I am looking for a control that allows the user to pick web friendly fonts for use in generating the web page to run on as many computer as possible. I'm currently useing the MS font dialog, but I have not found a way to filter it's list of fonts available. Additionally, I wouldn't mind buying a control if it has a more attractive use interface...
So... What font selection/picking control do you feel is the best and what attributes stand out for your choice?
My favorite is available through DevExpress.com. Their ExtraEditors library has a FontEdit component. Also if you embrace their controls it will improve the overall appearance of you app.
http://www.devexpress.com/Products/NET/Controls/WinForms/Editors/

C# controls in a MFC Application

I am responsible for the User Interface of an application written completely in Visual C++ using MFC and some third-part controls. I would like to use C# (WinForms or even better WPF) to improve the application look&feel.
I would like some advices about how to do it. Links, articles, examples...
Right now the user interface is isolated in a single project and I don't want to compile the whole module with CLR. So how do I have to manage that from the architectural point of view?
I have already looked at the Internet for the subject and read MSDN information. I would like more detailed information...is it convinient? pros/cons? have you used this approach successfully in a "big" application?
I don't want to compile the whole ui project with CLR...can I just have all the .NET code in a isolated project and call it from the ui project? what's the best way to do it?
Thanks in advance.
A good starting point is the Win32 and WPF interop page on MSDN.
I found this codeproject article gave a good introduction to the subject of mixing mfc / winforms code.
When faced with the same problem, I made an ActiveX control in C# and used it in my MFC app. The folks at MS took out support for building ActiveX controls with .NET, but it's still possible to do so with a plain Jane COM class which has a custom [ComRegisterFunction()] and [ComUnregisterFunction].
Although MS would like to tell us that the /clr flag will solve our problems, it measurably slowed down my large MFC app.

Categories

Resources