鼠标进入鼠标离开?表达混合(银光)

发布于 2024-08-06 09:03:01 字数 87 浏览 2 评论 0原文

我是一名使用 Expression Blend 的设计师。有谁知道如何使用事件选项卡?我正在查看一列输入字段,例如鼠标输入等。不知道要在这些内容中添加什么想法?

I'm a designer using Expression blend. Does anyone know how to use the events tab? I'm looking at a column of input fields, such as mouse enter etc. Not sure what to put in these any ideas?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

娇女薄笑 2024-08-13 09:03:01

这些输入字段对应于代码中的事件处理程序。尝试向您的项目添加一个按钮,然后双击“Click”事件的输入区域。它将直接带您进入代码。在“// TODO:在此处添加事件处理程序实现”行的正下方。添加以下内容:

MessageBox.Show("Hello!");

现在,当您单击该按钮时,您应该会看到一个消息框。如果您查看按钮的 Xaml,您应该会看到 Click 属性被分配了一个与代码文件中的函数名称相匹配的值(即 private void Button_Click(object sender, EventArgs ea)应对应于 Xaml

处理事件的最佳实践通常是让您(设计者)主要使用事件作为故事板的触发器,而不是在 Blend 中分配事件处理程序。开发人员可以在代码中连接他们所需的事件;希望您不需要使用除触发动画或 VisualStateManager 更改之外的事件。

Those input fields correspond to event handlers in code. Try adding a Button to your project, then double click in the input area for the "Click" event. It'll take you directly to the code. Right below the line "// TODO: Add event handler implementation here." add the following:

MessageBox.Show("Hello!");

Now when you click the button you should get a message box. If you take a look for the Xaml of your button you should see that the Click attribute is assigned a value that matches the function name from the code file (i.e. private void Button_Click(object sender, EventArgs ea) should correspond to the Xaml <Button Click="Button_Click"/>). The part that is present in code (the function) is usually referred to as an "event handler" and this is the value you see in the input area next to the events in Blend.

The best practices for working with events are generally say for you (the designer) to primarily use events as triggers for storyboards and to not assign event handlers in Blend. A developer can wire up the events they require in code; hopefully you don't need to use events other than to trigger animations or VisualStateManager changes.

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