I saw a lot of different information on this theme but nothing helped me.
(this.DialogResult = true)
or
(this.DialogResult = false)
. I must make it in MVVM pattern. I am using value -> (bool cls = true)
right now and bind it to DialogResult = {Binding cls}
and change this property in different functions but it doesn't work. I get some exception.Do you know how I can solve this problem with closing OpenFileDialog
?
create as method here is something that may get you along the lines of what you are looking for
void OpenDialogAction(object param)
{
//Add code here
OpenFileDialog d = new OpenFileDialog();
if (d.ShowDialog() == true)
{
//set your variable true
}
else
{
//set your variable false
}
}