mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Range selection in MapItemsControl
This commit is contained in:
parent
da63e55fd4
commit
1fc35d90c0
4 changed files with 41 additions and 9 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
|
||||
namespace MapControl
|
||||
|
|
@ -17,14 +18,12 @@ namespace MapControl
|
|||
DefaultStyleKeyProperty.OverrideMetadata(typeof(MapItem), new FrameworkPropertyMetadata(typeof(MapItem)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Prevent range selection by Shift+MouseLeftButtonDown.
|
||||
/// </summary>
|
||||
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
|
||||
{
|
||||
if (Keyboard.Modifiers.HasFlag(ModifierKeys.Shift))
|
||||
{
|
||||
e.Handled = true;
|
||||
MapItemsControl.SetSelectedItemsRange(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue