简体   繁体   中英

Popup as User Control or Templated Control Windows 8 / WinRT C#

I would like a way to create a popup control in one place such as a user control. Then across multiple views, I can use the same popup control.

I think the solution could be to use either User Control or Templated Control. I have never used either of them.

Can I use either the User Control or Templated Control for a popup?

Is there a better solution?

I should also mention that I am using C# / XAML.

You cant apply a Control template directly to a Popup control so a user control is exactly what you need for this.

Just create a User control containing all the content and UI you want and then reuse that control inside a new popup control in every view you want it to appear.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM