No Key event handling in MapItemsControl

This commit is contained in:
ClemensF 2018-11-10 22:38:46 +01:00
parent 49a399311e
commit 6214b9f321
2 changed files with 8 additions and 0 deletions

View file

@ -5,9 +5,11 @@
#if WINDOWS_UWP
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using KeyEventArgs = Windows.UI.Xaml.Input.KeyRoutedEventArgs;
#else
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;
#endif
namespace MapControl
@ -46,5 +48,10 @@ namespace MapControl
{
return item is MapItem;
}
protected override void OnKeyDown(KeyEventArgs e)
{
e.Handled = true;
}
}
}

View file

@ -18,6 +18,7 @@
</Setter>
</Style>
<Style TargetType="map:MapItem">
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="HorizontalAlignment" Value="Stretch"/>
<Setter Property="VerticalAlignment" Value="Stretch"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>