Windows Designer问题 [英] Windows Designer Question

查看:75
本文介绍了Windows Designer问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我是WPF的新手,我已经下载了Microsoft C#Express的试用版。
我创建了一个新项目,在Windows上我试图拖放更多的控制它不允许我。
但是当我添加网格控件时,它允许我向窗口添加多个控件?为什么会这样?

每当我查看应用程序并返回到设计器窗格时,它会向我显示一条消息,说明"装配或相关文档已更新,需要设计人员重新加载。点击这里重新加载"。有人可以向我解释一下。

由于我正在学习WPF,所以非常感谢任何帮助。

解决方案

Hi NewtoLinq

WPF中的Window控件是一个ContentControl,这意味着它可以接受一个且只能接受一个子控件。此外,它没有提供真正的布局功能。相比之下,Grid可以接受任意数量的子节点并提供全面的布局功能。

这就是为什么在WPF的默认Window模板中(实际上在ContentControl根的其他模板中,如UserControl)我们总是为您提供一个布局容器(Grid)作为子元素。

"金条"您在编译和运行时看到的是程序集的结果,您的应用程序依赖于在编译期间进行更新。在Visual Studio的未来版本中,我们正在努力大大减少您将看到这个"金条"的时间。

谢谢,祝你的WPF学习成果好运。我们期待您在学习中对Visual Studio中的WPF和Silverlight Designer提供反馈。如果您有机会试用Visual Studio 2010的Beta版,您会发现它们包含更多工具供初级用户使用。

您可能还想查看新资源如果您决定探索Visual Studio 2010 Beta 1,请访问 http://windowsclient.net/wpfdesigner/default.aspx

标记

Hi,

I am new to WPF and i have downloaded the trial versions of the Microsoft C# Express.
I created a new project and on the Windows i tried to drag and drop more than more control it would not allow me to.
But when i added a Grid Control it lets me add more than one control to the Window ? Why is this so ?

Also whenever i runt the application and return to the designer pane it shows me a message saying that "An assembly or related document has been updated
which requires the designer to be reloaded.Click here to reload". Can somebody explain this to me.


Any help is greatly appreciated cos i am just learning WPF.

解决方案

Hi NewtoLinq

The Window control in WPF is a ContentControl, which means it can accept one and only one child control. In addition it provides no real layout capabilities. The Grid, by contrast, can accept any number of children and provides comprehensive layout capabilities.

This is why in the default Window template for WPF (and in fact in other templates for ContentControl roots such as UserControl) we always provide you with a layout container (the Grid) as a child element.

The "gold bar" you are seeing on compile and run is a consequence of assemblies that your application depends on being updated during compilation. In future releases of Visual Studio we are working on substantially reduce the occasions on which you'll see this "gold bar".

Thanks, and good luck in your WPF learning endeavours. We look forward to your feedback on the WPF and Silverlight Designer in Visual Studio as you learn. If you have the chance to try out the Beta editions of Visual Studio 2010, you should find they contain many more tools for the beginning user to get started.

You may also want to check out the new resources over at http://windowsclient.net/wpfdesigner/default.aspx if you decide to explore Visual Studio 2010 Beta 1.

Mark


这篇关于Windows Designer问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆