开发者

Dialog Result not set to true in WPF 4

I have just converted my project to wpf 4 , In my previous version I have used the dialog Result set to true when the save but of a showDialog is click but now I don't get the true value of the dialogResult Property . is there any reason or I need to change the code

 wndWindow childWindow= new wndWindow();
            childWindow.ShowInTaskbar = false;
            childWindow.Owner = this;
            childWindow.ShowDialog();
            if (childWindow.DialogResult == true)
            {     
            }

above is my code and I have just set DialogResult=true in save but of the wndWindow Save. but wh开发者_JS百科en I check for the DialogResult in if condition it is false why is so


you have to set DialogResult=true by your self, otherwise its never true.

look at this to understand the wpf Dialog better.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜