Why is there no support for MDI in Compact-Framework?

情到浓时终转凉″ 提交于 2019-12-11 06:15:52

问题


I recently wanted/thought I need a form with two child forms to switch between according to user's selection of a TreeNode.

While searching the web I found this post saying this need is a flaw in my design. Why?

Why are multiple dialogs bad for the CF? Doesn't my usage scenario require this?

If there is support and it is OK to use this, can you point me to it?

Thanks.


回答1:


The CF doesn't support it because the OS itself doesn't support MDI (see the Remarks section in the linked page).

MDI can be pretty easily faked, though, by using UserControls instead of Forms and throwing them in a container like a Frame on your "MDI Parent" Form.

You could also go with a Tab Control motif, and each "document" becomes a tab.




回答2:


In addition to ctacke's answer, remember this, CF is a very small subset of the desktop windows that we all love/hate, such as XP,Vista,Windows 7, including server editions, i.e. the API calls on a CF is smaller as the CF has limited resources such as memory, storage space (I will refuse to define this as disk space as the distinction on the CF is blurred - i.e. flash ram, sd cards, compact flash cards and so on but no hard disk of any kind!) and limited no of connectivity (blue tooth and compact flash - in my experience) and finally a much smaller screen with limited estate.

Really, programming under a CF, is a la-la land as some things that you can do on desktop Windows, you cannot do on CF hence with CF you have to think outside of the box to get around something despite having a smaller set of API's. Like ctacke's answer that is a very good way of 'faking' an MDI.

Hope this answer helps you understand why no MDI exists on CF, Best regards, Tom.



来源:https://stackoverflow.com/questions/1840830/why-is-there-no-support-for-mdi-in-compact-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!