About modifying the property outside the current container?

If I tried to change the _A_Text.TextColor by

<Change Target="_A_Text.TextColor" Value="#000" /> 

inside

<EnteringAnimation></EnteringAnimation> 

but failed. And it only work when coding inside Navbutton

<WhilePressed></WhilePressed>

The coding below:

  <DockPanel ...>
      <DirectNavigation ux:Name="_nav_alp" Active="_A"/>

      <Page ux:Name="_A">
          <EnteringAnimation>
              <Change Target="_A.Visibility" Value="Visible" />

              HERE!!!

          </EnteringAnimation>
          <ExitingAnimation>
              <Change Target="_A.Visibility" Value="Hidden" />
          </ExitingAnimation>
          <Text>...</Text>
      </Page>

  </DockPanel>

  <NavigationBar Height="40" Width="260" Alignment="TopLeft">
      <GridLayout RowCount="1" ColumnCount="5" />
      <Panel ux:Class="NavAlp" />

      <Style>
         ...
      </Style>

      <NavButton ux:Name="_A_Nav">
          <Text ux:Name="_A_Text" Content="A-C"/>
          <WhilePressed>
              <NavigateTo Context="_nav_alp" Target="_A" />
              <Change Target="_A_Text.TextColor" Value="#000" />  <<<<<<<<< HERE!
          </WhilePressed>

      </NavButton> 

        ...
  </NavigationBar>

Thank you!

Hi!

<EnteringAnimation/> actually works a bit different from <WhilePressed/> in that it animated backwards. Say the Color you set on your text is #000:

<Text TextColor="#000" ux:Name="text1"/>

Then you can animate from white with <EnteringAnimation/> from #fff like so:

<EnteringAnimation>
    <Change Target="text1" Value="#fff" />
</EnteringAnimation>

Please let me know if this works out for you :slight_smile:

Thank you for reply!

Shouldn’t the target be text1.Color?

I found the solution that is to use ActivatingAnimation instead of EnteringAnimation then worked!

Thank!