表达式混合、按钮状态,如何?
很抱歉问了这样一个基本的问题,但我对 Blend 4 没有太多经验。
我需要做的是,根据我所知或所见,Blend 似乎是执行此操作的地方,是创建一个“状态”,以便按钮在禁用时显示。即,我正在使用的按钮是“注销”按钮...按钮 IsEnabled 属性绑定到 WebContext.User.IsAuthenticated 属性。因此,当应用程序加载时,我希望按钮的“禁用状态”(<-- 在 Blend 中创建?)出现...一旦身份验证完成,与 IsEnabled 的绑定将会更改,并且我希望按钮的“启用状态”提前感谢。如何实现这一点?
Sorry for such a rudimentary question, but I am not experienced in Blend 4 much at all.
What I need to do, and based on the little I know or have seen it seems that Blend is the place to do it, is to create a "state" for a button to appear when it is disabled. i.e., the button I'm working with is a Sign Out button...the button IsEnabled property is bound to the WebContext.User.IsAuthenticated property. So, when the app is loading I want the button's "disabled state (<-- created in Blend?) to appear...once authentication is completed, the binding to IsEnabled will change, and I want the button's "enabled state" to kick in. How to accomplish this? Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的问题看起来与我前几天遇到的问题非常相似。
如果您转到此线程,您可能可以使用它作为解决方案: 表达式混合交互:如何设置触发器来查找按钮的 IsEnabled 值?
我有一个布尔值,称为“IsSavedAllowedBool”。您可能希望将其替换为您绑定到的任何 bool - 看起来好像它可能是 WebContext.User.IsAuthenticated。
Your problem looks extremely similar to an issue I was having the other day.
If you go to this thread you may be able to use that as a solution: Expression Blend Interaction: How to set Trigger to Look for IsEnabled Value of Button?
I have a Boolean value there called "IsSavedAllowedBool". You would want to replace that with whatever bool you are binding to - which looks as if it might be WebContext.User.IsAuthenticated.