Windows Embedded Silverlight 的 TabControl

发布于 2024-12-18 18:23:26 字数 196 浏览 1 评论 0 原文

我需要一个用于 Silverlight for Windows Embedded 应用程序的选项卡控件,我的任务是开发。它不是一个开箱即用的受支持的控件,因此我希望可以从头开始构建自定义控件。

作为 Silverlight 和 XAML 的新手,任何人都可以向我指出任何有用的教程/资源吗?

迄今为止我的搜索并没有多大用处。

谢谢

I need a tab control for a Silverlight for Windows Embedded application I am task with developing. It's not a control that is supported out of box, so I am hopeful that it may be possible to build a custom control from scratch.

As a complete newbie to Silverlight and XAML, can anyone point me to any helpful tutorials/resources?

My searches to date have not been much use.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

榆西 2024-12-25 18:23:26

您的最佳方法很大程度上取决于您实际需要选项卡控件执行的操作。如果您只需要一个看起来与默认值略有不同的选项卡控件,那么您最好的选择几乎肯定是重复使用现有的选项卡控件之一(例如,来自 Silverlight Toolkit),并修改其控件模板,使其看起来像您想要的那样。您还可以使用模板的副本来进行您需要的任何行为更改。

但是,即使您需要相当大的变化,而这种方式无法支持(如果是这种情况,我会感到非常惊讶,尽管发生了更奇怪的事情),我强烈建议仍然从选项卡控件开始Silverlight 工具包,并根据需要修改源代码。这比从头开始构建要简单得多。

有一个示例说明如何修改 Silverlight Toolkit 选项卡控件的模板 此处

Your best approach very much depends on what you actually need the tab control to do. If you simply need a tab control that looks a little different from the default, your best bet is almost certainly to just re-use one of the existing tab controls (e.g., from the Silverlight Toolkit), and modify its control template to make it look like what you want. You may also be able to use your copy of the template to make any behavior changes you need as well.

But even if you need fairly dramatic changes that can't be supported in this fashion (I would be quite surprised if this were the case, though stranger things have happened), my strong recommendation would still be to start with the tab control from the Silverlight toolkit, and modify the source as necessary. It will be much simpler than building one from scratch.

There's an example of how to modify the template of the Silverlight Toolkit Tab Control here.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文