开发者

"Global" control visible on multiple pages?

I have this progressbar control which i would like to be visible on several pages 开发者_运维知识库of my application. How to i create a "global" control like this?

Thanks

/Richard


A few questions:

  • What do you mean by global?
  • Would you like to create one instance of your progressbar and share it?
  • What kind of control do you use? Is it UserControl?
  • Are you aware of this toolkit? If not:

I assume that app shows the progressbar when user is downloading or app is doing work in background. Make a Popup to show it to the user. You can put it in the Resources Dictionary, and then dynamicly add it to visual tree. But wont gain any advantage.

It is not a good idea to have one control if your app is based on default navigation system(pages). I strongly advise you to use progressbar form the toolkit. Simply create an instance for each page.


You can't. But you could create a page which includes this progressbar and then show/hide/etc. as necessary.


There are two options for doing this:

a) create a Popup element in code without making it part of the element tree and assign your control as child of that Popup. Then use IsOpen=true to show it.

b) retemplate the PhoneApplicationFrame that is the root of your element tree and insert your global elements in the part of the template that is shared across all pages.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜