如何将宽度设置为100%
我有一个 silverlight stackpanel,我想将其宽度设置为 100%。
我正在动态添加堆栈面板(C#)
I have a silverlight stackpanel and i want to set its width to 100%.
i'm adding the stackpanel dynamically (C#)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试在 StackPanel 上将 HorizontalAlignment 设置为“Stretch”,并确保包含的元素也是您期望的宽度。
Try setting HorizontalAlignment to "Stretch" on your StackPanel and make sure your containing element is also the width you expect.
使用父容器的属性而不是 300?
Instead of 300, use a property of the parent container?