Florent Dugu?
Guest
|
Hi
I'm using Add-in Express 5.1.2022 in Excel 2003.
I have a ADXExcelTaskPane with one control (System.Windows.Forms.Integration.ElementHost), in which one I work using WPF.
The problem is that all WPF context menus are automatically closed as soon as they are opened when used in the task pane.
Simple reproduction : Put a WPF textbox in a custom WPF usercontrol. Link it to the elementHost, this one beeing in a ADXExcelTaskPane. When right click in the textbox, the context menu with cut/copy/paste appear and disappear right after.
Any advice ?
Thanks. |
|
Eugene Astafiev
Guest
|
Hi Florent,
Could you send a sample add-in project which can reproduce the issue to the support e-mail address (see readme.txt)?
BTW What OS do you use? |
|
Florent Dugu?
Guest
|
Hi.
I send you a sample project.
I'm on XP SP3, and I also try on Vista SP1 using a VMWare.
Thanks. |
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hi Florent,
This issue is caused by the WS_CHILD style used for the pane. Unfortunately, we haven?Â?Ð?ét found a solution for this issue. There is a workaround, though. You can try to add the following code to your ADXExcelTaskPane.
private const uint WS_CHILD = 0x40000000;
private const uint WS_CLIPCHILDREN = 0x02000000;
private const uint WS_CLIPSIBLINGS = 0x04000000;
private CreateParams fCreateParams = new CreateParams();
protected override CreateParams CreateParams
{
get
{
fCreateParams = base.CreateParams;
if (!DesignMode)
{
fCreateParams.Style = (int)(WS_CLIPCHILDREN | WS_CLIPSIBLINGS); //| WS_CHILD
}
return fCreateParams;
}
}
But note that this settings make the Excel main window to lose activity when your ADXExcelTaskPane is activated.
Andrei Smolin
Add-in Express Team Leader |
|
Florent Dugu?
Guest
|
Hi
Thanks for checking the problem, also the workaround is a bit weird...
Do you plan on trying to fix this problem in a future release ? |
|
Andrei Smolin
Add-in Express team
Posts: 19138
Joined: 2006-05-11
|
Hi Florent,
As soon as we find a solution, we add it to Add-in Express code. Although currently it looks like there's no solution at all, we will continue to work on this for sure.
Andrei Smolin
Add-in Express Team Leader |
|