表达式混合、按钮状态,如何?

发布于 2024-11-30 06:44:23 字数 285 浏览 0 评论 0原文

很抱歉问了这样一个基本的问题,但我对 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 技术交流群。

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

发布评论

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

评论(1

变身佩奇 2024-12-07 06:44:23

您的问题看起来与我前几天遇到的问题非常相似。

如果您转到此线程,您可能可以使用它作为解决方案: 表达式混合交互:如何设置触发器来查找按钮的 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.

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