# Call ux:Name of another Uno file

**URL:** <https://forums.fusetools.com/t/call-ux-name-of-another-uno-file/1284>\
**Category:** How-to Discussions\
**Created:** [April 30, 2015, 6:36pm UTC](https://forums.fusetools.com/t/call-ux-name-of-another-uno-file/1284 "2015-04-30T18:36:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cristian\_Karmy1](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy1/32/480_2.png) [@Cristian\_Karmy1](https://forums.fusetools.com/u/Cristian_Karmy1)\
**Post date:** [April 30, 2015, 6:36pm UTC](https://forums.fusetools.com/t/call-ux-name-of-another-uno-file/1284/1 "2015-04-30T18:36:07Z")

</div>

How can I call a ux:Name of another Uno file?

Like:

```auto
<Change Target="Mytrigger.On" Value="true" />

```

But Mytrigger is in the Mainview.ux?

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [May 1, 2015, 2:17pm UTC](https://forums.fusetools.com/t/call-ux-name-of-another-uno-file/1284/2 "2015-05-01T14:17:42Z")

</div>

Hi,

UX files are classes - which can be instantiated many times, so symbols in other UX files are not globally available, you have to know what instance of Mainview.ux you are talking about.

This means that animators like `<Change>` can not be used across UX files like this. You have to add a `.uno` code behind and make sure you have access to the other instance.

In order to give a more specific example I need to see what your project and UX files look like.

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy1](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy1/32/480_2.png) [@Cristian\_Karmy1](https://forums.fusetools.com/u/Cristian_Karmy1)\
**Post date:** [May 4, 2015, 2:09pm UTC](https://forums.fusetools.com/t/call-ux-name-of-another-uno-file/1284/3 "2015-05-04T14:09:01Z")

</div>

Im working on a project very similar to the Data Example (Movie List [https://www.fusetools.com/developers/guides/examples/movielist](https://www.fusetools.com/developers/guides/examples/movielist)).

I want to change the Value On of a trigger that is in MyApp.ux from MovieEntry.ux.

In the MovieEntry.ux I have this:

```auto
<CLicked Handler="Activate" />

```

In his CodeBehind:

```auto
void Activate(object sender, ClickedArgs args)
{
 MyTrigger.On = true;
}

```

In the MyApp.ux:

```auto
<ManualTrigger ux:Name="MyTrigger">
    <Move....... />
<ManualTrigger>

```

How can achive this? To call MyTrigger.On from MovieEntry.ux??

Thanks!

---

<div class="post-metadata">

**Author:** ![Anders\_Lassen](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/anders_lassen/32/522_2.png) [@Anders\_Lassen](https://forums.fusetools.com/u/Anders_Lassen)\
**Post date:** [May 4, 2015, 2:12pm UTC](https://forums.fusetools.com/t/call-ux-name-of-another-uno-file/1284/4 "2015-05-04T14:12:41Z")

</div>

You need to somehow get access to the MyTrigger on MyApp. This means you need access to an instance of MyApp from the MovieEntry (dependency injection).

For example, im MovieEntry.ux.uno:

```auto
public MyApp App;

```

And when populating the list, make sure you set the App:

```auto
foreach (var movie in _movies) 
{
    var ui = new MovieEntry
    {
        App = this,
        ...

```

Then you can do:

```auto
void Activate(object sender, ClickedArgs args)
{
     App.MyTrigger.On = true;
}

```

---

<div class="post-metadata">

**Author:** ![Alexander\_Bladyko](https://avatars.discourse-cdn.com/v4/letter/a/e47774/32.png) [@Alexander\_Bladyko](https://forums.fusetools.com/u/Alexander_Bladyko)\
**Post date:** [May 4, 2015, 2:16pm UTC](https://forums.fusetools.com/t/call-ux-name-of-another-uno-file/1284/5 "2015-05-04T14:16:02Z")

</div>

You may create an event in MovieEntry and subscribe the event and activate trigger at MyApp.ux.uno.

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy1](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy1/32/480_2.png) [@Cristian\_Karmy1](https://forums.fusetools.com/u/Cristian_Karmy1)\
**Post date:** [May 5, 2015, 2:13am UTC](https://forums.fusetools.com/t/call-ux-name-of-another-uno-file/1284/6 "2015-05-05T02:13:41Z")

</div>

Thanks! Now I understand! I will try now… 🙂

---

<div class="post-metadata">

**Author:** ![Cristian\_Karmy](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/cristian_karmy/32/480_2.png) [@Cristian\_Karmy](https://forums.fusetools.com/u/Cristian_Karmy)\
**Post date:** [May 5, 2015, 7:56pm UTC](https://forums.fusetools.com/t/call-ux-name-of-another-uno-file/1284/7 "2015-05-05T19:56:08Z")

</div>

.
