以编程方式扩展时出现 Blacklight Expander 问题
我正在 Silverlight 4 中做一个 silverlight 项目,我在我的项目中包含了 BlackLight 项目,这样我就可以使用他们的新控件,特别是停靠面板和自动扩展器,这给我带来了一些小问题。
我想做的是有几个自动扩展器,当我单击按钮时它们会扩展或折叠。更具体地说,在我的情况下,每个自动扩展器都有一组要填充的参数,这些参数又将填充另一个扩展器,当前的扩展器将折叠,刚刚填充的扩展器将扩展。
这个想法很简单,但是当我使用扩展器上的一个按钮时,它只能工作一次......它会第一次扩展/折叠,然后什么也没有。我跟踪代码,它似乎运行得很好,但属性值不会改变
这是我的代码
Private Sub BtnExpand_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles BtnExpand.Click ClientExpander.IsExpanded = False ProjetExpander.IsExpanded = True End Sub
这可能是一个已知的错误,还是我必须重置一些标志才能使其工作?
编辑:忘了提及,如果有什么区别,但 IsExpanded 属性似乎是一个依赖属性。 谢谢。
I am doing a silverlight project in Silverlight 4 and I included the BlackLight project in my project so that I could use their new controls, especialy the dockpanel and the autoexpander, which is causing me at the moment some little problems.
What I would like to do is to have several auto-expander that will expand or collapsed when I click on button. In my case more specifically, each auto-expander have a set of parameter to fill, which in turn will fill the other expander and the current one would collaps and the just filled one would expand.
The idea is simple, yet when I use a button which is on one of my expander, it only works once... It would expand/collapse the first time, then after that, nothing. I trace the code and it seems to go through just fine, but the property value won't change
Here is my code
Private Sub BtnExpand_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles BtnExpand.Click ClientExpander.IsExpanded = False ProjetExpander.IsExpanded = True End Sub
Could it be a known bug, or must I reset some flags to make it work?
Edit : Forgot to mention, if it makes any difference, but the IsExpanded property seems to be a dependancy property.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论