N
N
NameOf Var2017-04-29 23:08:29
WPF
NameOf Var, 2017-04-29 23:08:29

How to hide the form after clicking the "Open" button in the OpenFileDialog?

How can I hide the current window after the user clicks the "Open" button in the OpenFileDialog?

OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.ShowDialog();

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sanostee, 2017-04-29
@andrewpianykh

if (openFileDialog1.ShowDialog() == true)
{
    this.Hide();
}

A
Alexander Ter, 2017-04-30
@alexsandr0000

if (ofd.ShowDialog() == true)
{
    Opacity = 0f;
}

Opacity = 1.0f;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question