开发者

Savefiledialog from a callback on a server

We have a button that fires a command which goes to the server to do some validation. This is done asynchronously and if the validation is okay (i.e. the user has the correct permission), I want to show the SaveFileDialog.

However, this is not a user initiated action which means calling the SaveFileDialog.ShowDialog() method raises a "Dialog must be user initiated" exception.

Is there any way to make this work the way I want?

To 开发者_如何学编程other option is to launch the SaveFileDialog and make the request after the file has been selected. Not ideal but it works.

JD.


There is no work around after all it would be a pointless restriction if there were a work around.

I think your alternative design choice make sense. You might consider using a busy indicator with the message "Validating..." or some such whilst the async validation occurs then do what ever it is you would have done once the asyc operation completes.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜