sketchflow / blend中的相对路径定位___ [英] Relative path targeting in sketchflow / blend__

查看:68
本文介绍了sketchflow / blend中的相对路径定位___的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何定位目前范围之外(通常在上方)的内容。假设我有一个屏幕或组件,其中包含一堆状态。在其中我有一个用户控件或另一个嵌套组件。我试图从嵌套元素中触发
父屏幕或组件中的一个状态。希望这是有道理的。基本上我正试图找到一种方法来定位我们在Flash中使用parent或parent.parent的方式。因此,我可以控制多个组件,控制相对"父"中相同的
事物。

谢谢,

How do I target something that's outside (usually above) the my current scope. Let's say I have a screen or component with a bunch of states in it. In it I have a user control or another nested component. I'm trying to trigger one of the states in the parent screen or component, from within that nested element. Hopefully that makes sense. Basically I'm trying to find a way of targeting the way we do parent, or parent.parent in Flash. So that I can have a control in multiple components, controlling the same things in its relative "parent".

Thanks,

-o

推荐答案

有几种方法,你可以遍历可视树(parent.parent的粗略等价物)并找到那种方式的视觉对象。但是,我认为首选方法是在您的usercontrol上公开父
可以订阅并正确处理的事件。 这使您的用户控件保持通用性并有助于重用。
There are a couple of approaches, you could traverse up the visual tree (the rough equivalent of parent.parent) and find the visual objects that way. However I would sy the preferred method would be to expose events on your usercontrol that the parent can subscribe to and handle appropriately.  This allows your usercontrol to stay general and helps with reuse.


这篇关于sketchflow / blend中的相对路径定位___的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆