Posted 8 August 2019, 8:02 pm EST
Hi,
how can we modify the content for the C1MessageBox buttons and translate the button text to the current UICulture?
Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(delegate {
IList<DependencyObject> list = new List<DependencyObject>();
VTreeHelper.GetChildrenOfType(Application.Current.MainWindow, typeof(C1Window), ref list);
if (list != null
&& list.Count > 0) {
C1Window mBox = (C1Window)list[0];
list = new List<DependencyObject>();
VTreeHelper.GetChildrenOfType(mBox, typeof(StackPanel), ref list);
if (list != null
&& list.Count > 0) {
StackPanel sPanel = (StackPanel)list[0];
list = new List<DependencyObject>();
VTreeHelper.GetChildrenOfType(sPanel, typeof(Button), ref list);
if (list.Count > 0) {
var dstButton = list.First() as Button;
Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Background, new Action(() => {
dstButton.Content is Grid ...
}));
}
}
}
}));