Hi, thanks for the answer, but i need to change the text of FilterControl runtime.
There is a possibility? I read a example where you change the text of "SortNumberAscending" via code, but i don't find others...
Thanks a lot for the support.
var sortDescending = FindDescendant((dependencyObject as Popup).Child, typeof(Button), "PART_SortDescendingButton"); ((System.Windows.Controls.ContentControl)sortDescending).Content = "Sort in reverse"; var sortAscending = FindDescendant((dependencyObject as Popup).Child, typeof(Button), "PART_SortAscendingButton"); ((System.Windows.Controls.ContentControl)sortAscending).Content = "Sort in forward"; var advance = FindDescendant((dependencyObject as Popup).Child, typeof(Button), "PART_AdvancedFilterButton"); ((System.Windows.Controls.ContentControl)advance).Content = "Advance filtering"; var AdvanceFilter = FindDescendant((dependencyObject as Popup).Child, typeof(Button), "PART_ClearFilterButton"); ((System.Windows.Controls.ContentControl)AdvanceFilter).Content = "clears"; var okbutton = FindDescendant((dependencyObject as Popup).Child, typeof(Button), "PART_OkButton"); ((System.Windows.Controls.ContentControl)okbutton).Content = "okey"; var cancelButton = FindDescendant((dependencyObject as Popup).Child, typeof(Button), "PART_CancelButton"); ((System.Windows.Controls.ContentControl)cancelButton).Content = "stop"; }), DispatcherPriority.ApplicationIdle); |
Hi, it's perfect thanks but i still have one problem:
I dont' find the string "Show rows where:" in the advanced filter control for edit it.
Thanks!
<Style TargetType="{x:Type syncfusion:AdvancedFilterControl}"> <Setter Property="MaxHeight" Value="275" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type syncfusion:AdvancedFilterControl}"> <Grid Height="{TemplateBinding Height}"> . . . . . . . . . . <Grid Margin="30,0,4,4"> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Margin="0,0,10,5" HorizontalAlignment="Stretch" VerticalAlignment="Center" Text="Rows Displayed" /> . . . . . . . . . . </ControlTemplate> </Setter.Value> </Setter> </Style> |
private void Button_Click(object sender, RoutedEventArgs e) { // to display the custom text in AdvanceFilterControl ResourceDictionary myResourceDictionary = new ResourceDictionary(); myResourceDictionary.Source = new Uri("AdvanceFilterControl.xaml", UriKind.Relative); Application.Current.Resources.MergedDictionaries.Add(myResourceDictionary); } |