public static void initDisplay(DependencyObject RootObj) { foreach (TextBox tb in FindVisualChildren <TextBox>(RootObj)) { if (tb.IsReadOnly == true) { tb.Background = new SolidColorBrush(Color.FromArgb(255, 206, 206, 206)); //try //{ // ExTextBox txt = (ExTextBox)tb; // txt.SetIme(); //} //catch //{ //} } tb.Text = ""; try { if (tb.IsTabStop == true && tb.IsEnabled == true) { ExTextBox txt = (ExTextBox)tb; txt.SetIme(); } } catch { } } }
public static void initDisplayIme(DependencyObject RootObj) { foreach (TextBox tb in FindVisualChildren <TextBox>(RootObj)) { try { if (tb.IsTabStop == true && tb.IsEnabled == true) { ExTextBox txt = (ExTextBox)tb; txt.SetIme(); } } catch { } } }