or
datagrid.ItemsSource = gridDataSet.Tables[0].DefaultView; |
From the example code, we see that we can change the culture in Xaml
<telerikInput:RadDatePicker x:Name="datePicker" HorizontalAlignment="Left" Margin="10" Width="200" Culture="en-US" />
we can change Culture as any language in the drop down list such as chinese:
<telerikInput:RadDatePicker x:Name="datePicker" HorizontalAlignment="Left" Margin="10" Width="200" Culture="Chinese (People's Republic of China)" />
We need to change the culture on-the-fly. Can we do it on the Xaml?
If not, we have to do it through code-behind.
How do we get the list of culture list as above string?
thx!
Jane
StyleManager.ApplicationTheme = new VistaTheme(); |
System.NullReferenceException was unhandled by user code |
Message="Object reference not set to an instance of an object." |
Source="PresentationFramework" |
StackTrace: |
at System.Windows.StyleHelper.UpdateTables(PropertyValue& propertyValue, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& resourceDependents, HybridDictionary& dataTriggerRecordFromBinding, HybridDictionary childIndexFromChildName, Boolean& hasInstanceValues) |
at System.Windows.StyleHelper.ProcessTemplateContent(FrameworkTemplate frameworkTemplate, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& resourceDependents, ItemStructList`1& eventDependents, HybridDictionary& dataTriggerRecordFromBinding, HybridDictionary childIndexFromChildID, Boolean& hasInstanceValues) |
at System.Windows.StyleHelper.SealTemplate(FrameworkTemplate frameworkTemplate, Boolean& isSealed, FrameworkElementFactory templateRoot, TriggerCollection triggers, ResourceDictionary resources, HybridDictionary childIndexFromChildID, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& containerDependents, FrugalStructList`1& resourceDependents, ItemStructList`1& eventDependents, HybridDictionary& triggerActions, HybridDictionary& dataTriggerRecordFromBinding, Boolean& hasInstanceValues, EventHandlersStore& eventHandlersStore) |
at System.Windows.FrameworkTemplate.Seal() |
at System.Windows.StyleHelper.SealIfSealable(Object value) |
at System.Windows.ResourceDictionary.RealizeDeferContent(Object key, Object& value, Boolean& canCache) |
at System.Windows.ResourceDictionary.GetValueWithoutLock(Object key, Boolean& canCache) |
at System.Windows.ResourceDictionary.GetValue(Object key, Boolean& canCache) |
at System.Windows.DeferredThemeResourceReference.GetValue(BaseValueSourceInternal valueSource) |
at System.Windows.DependencyPropertyChangedEventArgs.get_NewValue() |
at Telerik.Windows.Controls.RadTabControl.OnLeftTemplateChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TabControl\RadTabControl.cs:line 2371 |
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) |
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) |
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) |
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType) |
at System.Windows.DependencyObject.InvalidateProperty(DependencyProperty dp) |
at System.Windows.StyleHelper.InvalidateContainerDependents(DependencyObject container, FrugalStructList`1& exclusionContainerDependents, FrugalStructList`1& oldContainerDependents, FrugalStructList`1& newContainerDependents) |
at System.Windows.StyleHelper.DoThemeStyleInvalidations(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style style) |
at System.Windows.StyleHelper.UpdateThemeStyleCache(FrameworkElement fe, FrameworkContentElement fce, Style oldThemeStyle, Style newThemeStyle, Style& themeStyleCache) |
at System.Windows.FrameworkElement.OnThemeStyleChanged(DependencyObject d, Object oldValue, Object newValue) |
at System.Windows.StyleHelper.GetThemeStyle(FrameworkElement fe, FrameworkContentElement fce) |
at System.Windows.FrameworkElement.UpdateThemeStyleProperty() |
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e) |
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e) |
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args) |
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType) |
at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, OperationType operationType, Boolean isInternal) |
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value) |
at System.Windows.FrameworkElement.set_DefaultStyleKey(Object value) |
at Telerik.Windows.Controls.RadTabControl.SetDefaultStyleKey() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TabControl\RadTabControl.cs:line 1336 |
at Telerik.Windows.Controls.RadTabControl.OnInitialized(EventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TabControl\RadTabControl.cs:line 1346 |
at System.Windows.Markup.BamlRecordReader.ElementEndInit(Object& element) |
InnerException: |