added keyboard navigation for selected images -> TOOD: allow visual keyboardnavigation when photo is not maximized
This commit is contained in:
@@ -20,7 +20,9 @@
|
||||
ExtendClientAreaChromeHints="NoChrome"
|
||||
TransparencyLevelHint="AcrylicBlur"
|
||||
Background="Transparent"
|
||||
ExtendClientAreaToDecorationsHint="True">
|
||||
ExtendClientAreaToDecorationsHint="True"
|
||||
Focusable="True"
|
||||
KeyDown="OnKeyDownHandler">
|
||||
|
||||
<Design.DataContext>
|
||||
<vm:MainWindowViewModel/>
|
||||
@@ -115,7 +117,8 @@
|
||||
<ItemsRepeater ItemsSource="{Binding Photos}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
ClipToBounds="False">
|
||||
ClipToBounds="False"
|
||||
IsTabStop="True">
|
||||
<ItemsRepeater.Layout>
|
||||
<UniformGridLayout MinItemWidth="220"
|
||||
MinItemHeight="290"
|
||||
@@ -150,7 +153,9 @@
|
||||
ClipToBounds="True"
|
||||
Background="#14000000">
|
||||
<Image Source="{Binding PreviewImage}"
|
||||
Stretch="UniformToFill"/>
|
||||
Stretch="UniformToFill"
|
||||
PointerEntered="PointerEnteredPhotoHandler"
|
||||
/>
|
||||
</Border>
|
||||
|
||||
<TextBlock Text="{Binding DisplayName}"
|
||||
@@ -184,14 +189,15 @@
|
||||
<TransitioningContentControl Grid.Row="0"
|
||||
Grid.RowSpan="2"
|
||||
Content="{Binding SelectedPhoto}"
|
||||
ZIndex="50">
|
||||
ZIndex="50"
|
||||
>
|
||||
<TransitioningContentControl.PageTransition>
|
||||
<CrossFade Duration="0:0:0.18"/>
|
||||
</TransitioningContentControl.PageTransition>
|
||||
|
||||
<i:Interaction.Behaviors>
|
||||
<ic:EventTriggerBehavior EventName="PointerReleased">
|
||||
<ic:InvokeCommandAction Command="{Binding Path=DataContext.SelectedPhotoClicked, ElementName=Root}"/>
|
||||
<ic:InvokeCommandAction Command="{Binding Path=DataContext.ResetSelectedPhoto, ElementName=Root}"/>
|
||||
</ic:EventTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
|
||||
@@ -211,7 +217,7 @@
|
||||
Stretch="Uniform">
|
||||
<i:Interaction.Behaviors>
|
||||
<ic:EventTriggerBehavior EventName="PointerReleased">
|
||||
<ic:InvokeCommandAction Command="{Binding Path=DataContext.SelectedPhotoClicked, ElementName=Root}"/>
|
||||
<ic:InvokeCommandAction Command="{Binding Path=DataContext.ResetSelectedPhoto, ElementName=Root}"/>
|
||||
</ic:EventTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
</Image>
|
||||
|
||||
Reference in New Issue
Block a user