# Switch

**URL:** <https://forums.fusetools.com/t/switch/5561>\
**Category:** How-to Discussions\
**Created:** [January 27, 2017, 8:23pm UTC](https://forums.fusetools.com/t/switch/5561 "2017-01-27T20:23:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ana\_Almeida](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@Ana\_Almeida](https://forums.fusetools.com/u/Ana_Almeida)\
**Post date:** [January 27, 2017, 8:23pm UTC](https://forums.fusetools.com/t/switch/5561/1 "2017-01-27T20:23:02Z")

</div>

Hi guys,

I’m using [Switch](https://www.fusetools.com/docs/fuse/controls/switch) with NativeViewHost:

```auto
<NativeViewHost>
	<Switch ux:Name="_sw" Height="25" Width="50">
		<WhileTrue Value="{ReadProperty _sw.Value}">
			<DebugAction Message="Switch.Value = true" />
		 </WhileTrue>
		 <WhileFalse>
			<DebugAction Message="Switch.Value = false" />
		</WhileFalse>
	</Switch>
	<WhileString Value="{status}" Equals="892">
		<Change _sw.Value="True" />
	</WhileString>
</NativeViewHost>

```

This is a screenshot of the page where I need the switch:

![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/Yq4kMXriZiPz-image-1485548174235.png)

And here’s a screenshot of a page where I don’t need the switch:

![file](https://s3.us-east-2.amazonaws.com/fuse-legacy-forum-assets/hUEnFvJD3Jk2-image-1485548228741.png)

The same thing happens on iOS. The Switch appears in other pages where it isn’t suppose to appear.

Does this have any solution beside using a custom switch? If no, is there a way of changing the color of this switch (without NativeHostView enclosure) when the value is true?

I’m using Fuse version 0.32.0 (build 9613).

Thank you!

---

<div class="post-metadata">

**Author:** ![Bent](https://yyz1.discourse-cdn.com/flex035/user_avatar/forums.fusetools.com/bent/32/157_2.png) [@Bent](https://forums.fusetools.com/u/Bent)\
**Post date:** [January 27, 2017, 8:31pm UTC](https://forums.fusetools.com/t/switch/5561/2 "2017-01-27T20:31:37Z")

</div>

AFAIK this is expected behavior. Did you [see the docs](https://www.fusetools.com/docs/fuse/controls/nativeviewhost) for `NativeViewHost`?

> **Note:** Native Controls are always rendered in front of graphics controls.

I’m not sure this is the best way to use it, but one suggestion would be to wrap that component in a `Panel` and use some combination of `While`-style triggers. That way, you should be able to control when it is shown and when it is not.

---

<div class="post-metadata">

**Author:** ![Ana\_Almeida](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@Ana\_Almeida](https://forums.fusetools.com/u/Ana_Almeida)\
**Post date:** [January 27, 2017, 9:05pm UTC](https://forums.fusetools.com/t/switch/5561/3 "2017-01-27T21:05:50Z")

</div>

I did see those docs, I thought it was rendered in front of graphics controls in the page.

I wanted something simpler than using `While`-style triggers, because I only want to use it in one page and don’t want to check in every page if the switch appears.

I will have to use a custom switch. Thanks for your answer.
