Is there an equivalent of Mac OS X Document modal sheet in .NET?

前端 未结 2 843
无人共我
无人共我 2021-01-15 13:58

My application has been getting more and more requests to have certain dialogs behave similar to Mac OS X Document modal Sheet functionality, where a dialog is modal to just

2条回答
  •  甜味超标
    2021-01-15 14:30

    The Form.ShowDialog method allows you to specify an owner when you call it. In this case the form is modal only to the given owner.

    EDIT: I tried this with mixed results. I created a simple Windows Forms app with a main form, and two others. From a button click on the main form, I opened Form2 using the Show method. Form2 has a button on it as well, and when clicked, I opened Form3 using the ShowDialog method, passing in Form2 as it's owner. While Form3 did seem to be modal to Form2, I could not switch back to Form1 until I closed Form3.

提交回复
热议问题