Data is not populating in WPF Form

Abhishek Bali 0 Reputation points
2024-06-27T10:30:54.05+00:00

I am working on a VSTO Excel Addin and on a button click I am opening a WPF form.

case 1: I am working on a Citrix environment and Citrix opened on a single screen now I open excel and click on my ribbon button and my WPF form is working fine. But when I drag my cirtix window from single monitor to dual monitor my wpf form goes blank as present is screenshot.

enter image description here

case 2: I am working on a Citrix environment and Citrix opened on a dual screen(on both screens) now I open Excel and click on my ribbon button and my wpf form is working fine. But when I drag my cirtix window from dual monitor to single monitor, my wpf form goes blank as above.

I am using show dialog for displaying WPF form.

var prepareViewForm = new WpfContainerForm(objPrepareView, (int)Globals.ThisAddIn.Application.Width, (int)Globals.ThisAddIn.Application.Height);
prepareViewForm.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
prepareViewForm.HideWindowBezel();

var result = prepareViewForm.ShowDialog();

I have tried changing properties StartPosition from CenterParent to Manual. Tried fixing the positions of the form but also did not work.

How can i fix this problem?

Developer technologies | Windows Presentation Foundation
Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Excel | For business | Windows
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
0 comments No comments
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.