P
P
pimanov32019-11-23 19:48:29
WPF
pimanov3, 2019-11-23 19:48:29

How to get rid of clutter during the transition?

From the AgentsNew window, when the button is pressed, the following code is executed:

ManagerAgents taskWindow = new ManagerAgents();
taskWindow.Hide();
taskWindow.Show();

There is a heaping up of the same window on the same one already open.
How to get rid of the initial leaving only the last?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Senture, 2019-11-27
@pimanov3

The question is not entirely clear, but try this:

ManagerAgents taskWindow = new ManagerAgents();
this.Hide();
taskWindow.ShowDialog();
this.Show();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question