1

I need to focus the Grid(UI Element) when it is placed inside the Scroll viewer.

Code:

  <ScrollViewer>
        <Grid x:Name="RootGrid">
            <Border 
                    Height="24"
                    Width="300"
                    Focusable="True"
                    Background="White"
                    BorderBrush="Silver"
                    BorderThickness="1"
                    SnapsToDevicePixels="True">
                <Grid Background="Red" Focusable="True" x:Name="ViewGrid">
                </Grid>
            </Border>
        </Grid>
    </ScrollViewer>

Problem Faced:

1.When I click the above control, scroll viewer is the focused element but i need Grid element needs to focused. Please suggest solution to fix this.

Magesh Maggi
  • 269
  • 2
  • 10

0 Answers0