This is a migrated thread and some comments may be shown as answers.

[Solved] Setting HeaderText from resource file

1 Answer 129 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Adam
Top achievements
Rank 1
Adam asked on 30 Apr 2009, 03:24 AM
I noticed in the fixes for the latest release (http://www.telerik.com/versionnotes.aspx?id=1897) that it mentions you can set the HeaderText at runtime.

Can this be set in XAML? I'm using a resource file for localisation puposes and would like to edit the appearance of the control in XAML and the behaviour in the C# code behind but the following binding throws an exception:

HeaderText="{Binding StockpileArea, Source={StaticResource ServiceObjectDisplayNames}}" 

 


Also, I noticed that Silverlight does'nt support the x:Type extension. Is there any way to set the DataType in XAML?

 

 

 

1 Answer, 1 is accepted

Sort by
0
Hristo
Telerik team
answered on 01 May 2009, 08:32 AM
Hello Adam,

In Silverlight 2 there is a limitation - you cannot bind objects that are not FrameworkElement. GridViewColumn derive from DependencyObject thus you cannot bind it (but you can set the HeaderText in code).
As for the x:Type right now we don't support setting it in XAML but with the next official release we will try to add TypeConverter that will allow it.

Sorry for the inconvenience caused.
Let us know if you need more information.

All the best,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
GridView
Asked by
Adam
Top achievements
Rank 1
Answers by
Hristo
Telerik team
Share this question
or