Custom Property Not Changing Back

i have a custom button with a custom property “IconColor”.

If I change the IconColor value in a WhileTrue, the custom property doesn’t get reset when it goes to false again. I don’t know if i missed something or if this is a bug. Any Ideas?

hey! could you paste some of your code? Its impossible to say whats wrong without knowing more.

Only reason i can think of is if you’re using Set instead of Change. But if that’s not the case, then please paste some of your UX and we’ll figure it out :slight_smile:

<SearchButton ux:Name="SearchButton" Alignment="Right" IconColor="Black" PressedColor="Gray">		
          <Toggle Target="SearchActive"/>

<WhileTrue ux:Name="SearchActive">
     <Change SearchButton.IconColor="White" />

And here is the custom icon button:

<Panel ux:Class="SearchButton" Width="45" Height="45" Margin="5" HitTestMode="LocalBounds">
	<float4 ux:Property="IconColor" />
	<float4 ux:Property="PressedColor" />

	<Circle Width="13" Height="13">
		<Stroke ux:Name="Circle" Color="{Property IconColor}" Width="1"/>

	<Rectangle Width="7" Height="1" Color="{Property IconColor}" ux:Name="Line">
		<Rotation Degrees="-45" />
		<Translation X="-10"/>

		<Change Circle.Color="{Property PressedColor}"/>
		<Change Line.Color="{Property PressedColor}"/>


Not exactly sure why its doing exactly that, but in this case i would instead Change the IconColor instead of Circle.Color and Line.Color individually. Here is a quick example:

	<Panel ux:Class="Foo" Color="{Property SomeColor}">
		<float4 ux:Property="SomeColor" />
		<float4 ux:Property="PressedColor" />
		<float4 ux:Property="ToggledColor" />

			<Toggle Target="t" />
		<WhileTrue ux:Name="t">
			<Change this.SomeColor="{Property ToggledColor}" />
			<Change this.SomeColor="{Property PressedColor}"/>

Thanks that worked.

This is what i am making:

Cool! Good luck!

Feel free to post again if you run into other problems :smiley: