Can i bind separated ScrollView and PageControl?

For example,

  <ClientPanel>
    <DockPanel>
      <PageControl ux:Name="PageControl" Active="page1" Height="50%" Dock="Top">
        <Page Name="page1" Background="#00f">
          <ActivatingAnimation>
            <ScrollTo Target="ScrollView" Position="0,0"/>
          </ActivatingAnimation>
        </Page>
        <Page Name="page2" Background="#0f0">
          <ActivatingAnimation>
            <ScrollTo Target="ScrollView" Position="0,1000"/>
          </ActivatingAnimation>
        </Page>
        <Page Name="page3" Background="#f00">
          <ActivatingAnimation>
            <ScrollTo Target="ScrollView" Position="0,2000"/>
          </ActivatingAnimation>
        </Page>
      </PageControl>
      <ScrollView ux:Name="ScrollView" Height="50%" Dock="Bottom">
        <StackPanel Background="#000">
          <Grid>
            <Each Count="300">
              <Rectangle Height="200" Background="#fff" Margin="0,0,0,10"/>
            </Each>
          </Grid>
        </StackPanel>
        <ScrollingAnimation From="0" To="1000">
          <Set PageControl.Active="page1"/>
        </ScrollingAnimation>
        <ScrollingAnimation From="1000" To="2000">
          <Set PageControl.Active="page2"/>
        </ScrollingAnimation>
        <ScrollingAnimation From="2000" To="3000">
          <Set PageControl.Active="page3"/>
        </ScrollingAnimation>
      </ScrollView>
    </DockPanel>
  </ClientPanel>
</App>```

This code have conflict `Set active page` with `ScrollTo`.

Hi,

I don’t see any problems here. Can you please provide a more complete description of the problem, as in error mesages, screenshots, expected behavior etc?

Anders Lassen wrote:

Hi,

I don’t see any problems here. Can you please provide a more complete description of the problem, as in error mesages, screenshots, expected behavior etc?

Yeah, this code doesn’t have problem. When scrolling over 1000, PageControl shows page2. But it goes back to page1 because ActivatingAnimation.

Like this clip.

Apologies, but I still don’t fully understand what the question/problem is.

Tip: Try using Activated instead of ActivatingAnimation