English 中文(简体)
VSTO WPF 展望Addin - 随机没有反应的意向
原标题:VSTO WPF Outlook Addin - Unresponsive UI at random occasions

We have a VSTO addin for Outlook 2007 developed using .Net 4.0 WPF. One of the PC where it got deployed, is having an issue with UI. At some occasions UI becomes unresponsive for few moments. Clicks does not work. After few moments everything gets back to normal and user can click the buttons. Other addins installed on the PC are - SnagIT and Google Desktop Outlook Toolbar.

请帮助我们了解你对此类问题的任何意见。

问题回答

我与“Word Add-In”一样,在一个非常有益的发展箱子上——尽管我正在从事所有工作,但国际律师联合会还是会lock。

我的理论是,尽管我是在从背景线上援引,但Word正在对《国际倡议》做事。

我尝试了一次实验——在新通道上播下温器(即,我方保UI的透镜与Word工人的read一样)——并发挥了作用。 我的《倡议》不再断断续续续续。

小心谨慎,在您的近距离之前清除任何商用物体,尤其谨慎地接触(可能使用派遣国)。 回到办公室,在接触任何区域妇女委员会时,就座。 纽约总部 派遣国与它们重新铺设的路面有关,因此,你只得在办公室接收一个发送机,提供回响等。

Note: If you Dispatcher.Invoke back to the calling thread, you can t use Thread.Join as shown below. (In that case, you would need to handle application events, Thread.Sleep, and Thread.Yield) in a busy loop. Otherwise, you ll get a deadlock.

这里是一片通用的范例:

// This approach makes WPF Windows an order of magnitude more responsive
Thread t = new Thread(() =>
{
    try
    {
        // Implement the IDisposable pattern on your window to release
        //   any resources before the thread exits
        using (var myWindow = new MyWindow())
        {
            // Do any other pre-display initialization with the myWindow
            //   object here...

            myWindow.ShowDialog();
        }
    }
    finally
    {
        // Strongly Recommended (not doing this may cause
        //   weird exceptions at application shutdown):
        Dispatcher.CurrentDispatcher.InvokeShutdown();
    }
});

t.SetApartmentState(ApartmentState.STA); // Required
t.IsBackground = false; // Recommended

t.Start(); // Kicks off the new UI thread
t.Join();  // Blocks execution until the new UI thread has finished executing...

如同你一样,你正在对“国际调查”进行现场工作,在任务完成之前冻结该调查。 您应使用 编码 图书馆从事与国际交易日志无关的工作。 如果你使用<代码>Task进行工作,要求更新调查表,那么你需要使用WPF>。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签