Skip to main content
Home Forums General Silverlight Getting Started Passing UiCulture via the ASP.NET Silverlight Control
2 replies. Latest Post by mpitzer on August 18, 2008.
(0)
mpitzer
Member
7 points
12 Posts
08-14-2008 12:33 PM |
Normally you pass culture information to silverlight by setting the following parameters in your HTML:
<param name="culture" value="fr-FR" /><param name="uiculture" value="fr-FR" />
My question is, how is this done when if the ASP.NET server side control is used (ie System.Web.UI.SilverlightControls.Silverlight)?
It doesn't offer any Culture or UICulture properties.
Allen Ch...
Star
13862 points
1,803 Posts
08-18-2008 3:24 AM |
Hi
You can use InitParameters to pass data. In aspx:
<asp:Silverlight InitParameters="uiculture=fr-FR"
In App.xaml.cs add following code:
private void Application_Startup(object sender, StartupEventArgs e) { if (e.InitParams["uiculture"] != null) { Thread.CurrentThread.CurrentUICulture = new CultureInfo(e.InitParams["uiculture"]); } this.RootVisual = new Page(); }
08-18-2008 5:24 AM |
Cool, thanks :D