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?

Windows Presentation Foundation
Windows Presentation Foundation
A part of the .NET Framework that provides a unified programming model for building line-of-business desktop applications on Windows.
2,784 questions
Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
1,964 questions
C#
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.
11,011 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,989 questions
0 comments No comments
{count} votes

Your answer

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