鼠标进入鼠标离开?表达混合(银光)
我是一名使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这些输入字段对应于代码中的事件处理程序。尝试向您的项目添加一个按钮,然后双击“Click”事件的输入区域。它将直接带您进入代码。在“// TODO:在此处添加事件处理程序实现”行的正下方。添加以下内容:
现在,当您单击该按钮时,您应该会看到一个消息框。如果您查看按钮的 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:
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.