I see. So you have two problems.
[1]. The back button gains focus.
I believe the back button should never focus. There is already a key gesture to return, so the tuning focus is dumb. Why he was not already disconnected to concentrate, I do not know. Here is all you do:
<Button TabIndex="-1" Style="{StaticResource BackButtonStyle}" />
Or you can do it with a style:
<Grid Background="Black"> <Grid.Resources> <Style TargetType="Button" BasedOn="{StaticResource BackButtonStyle}" x:Name="MyBackButtonStyle"> <Setter Property="TabIndex" Value="-1" /> </Style> </Grid.Resources> <Button Style="{StaticResource MyBackButtonStyle}" /> </Grid>
Using this new style (or just updating an existing one) will cause the back button to never get focus. If you want it to be able to receive focus, for some reason the solution would be to handle the GotFocus event and just use (sender as Button).Focus(FocusState.Unfocused); . To be fair, you must also determine why you want to remove focus.
[2]. No animation
This is a common problem. The reason is that you do not want to customize the animation on the ListView , you want to customize the animation on the ListView ItemsPanel . Here is all you want to do:
<ListView> <ListView.ItemsPanel> <ItemsPanelTemplate> <StackPanel> <StackPanel.ChildrenTransitions> <AddDeleteThemeTransition /> </StackPanel.ChildrenTransitions> </StackPanel> </ItemsPanelTemplate> </ListView.ItemsPanel> </ListView>
It is so simple. (my sample is a StackPanel , remember to use a WrapGrid , as you have in your code). You only had transitions in the wrong place. So now you can deal with the focus problem that you have, and you can get the transitions you need.
I could offer some advice. Since you are using view models, it is strange to hear that you are not using delegate commands either. If you want to use MVVM at best, the delegate teams solve a lot of problems for you. Read here: http://blog.jerrynixon.com/2012/08/most-people-are-doing-mvvm-all-wrong.html
And for the second tip. It seems to me that you are using the default templates from Visual Studio. Most developers get started. The problem is that these templates are not very good to teach best practices. My suggestion: don't be afraid of an empty template.
Good luck