相关疑难解决方法(0)

Dispatcher在Textchanged事件中的Messagebox.Show上抛出InvalidOperationException

首先,这是我的错误的错误日志条目

crash program @ 15-9-2011 15:01:30error:System.InvalidOperationException: Dispatcher processing has been suspended, but messages are still being processed. at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)

无论如何代码:

private void TB_postcode_cijfers_TextChanged(object sender, TextChangedEventArgs e){
if (TB_postcode_cijfers.Text != string.Empty || TB_postcode_cijfers.Text.Length > 0)
{
    LBL_postcode.Content = Postcode_cijfers + Postcode_letters;
    if (TB_postcode_cijfers.Text.Length == 4 && TB_postcode_letters.Text.Length == 2)
    {
        if (!ZoekOpPostcode(Injectioncheck(TB_postcode_cijfers.Text + TB_postcode_letters.Text)))
        {
            //MessageBox.Show("Geen resultaat gevonden, " + errortext);
            if (MessageBox.Show("Geen resultaat gevonden, " + errortext + ".\n Wilt u …
Run Code Online (Sandbox Code Playgroud)

c# wpf custom-controls

12
推荐指数
1
解决办法
2万
查看次数

标签 统计

c# ×1

custom-controls ×1

wpf ×1