56 lines
1.4 KiB
C#
56 lines
1.4 KiB
C#
using Client.Application.ViewModels;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows;
|
|
using System.Windows.Controls;
|
|
using System.Windows.Data;
|
|
using System.Windows.Documents;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media.Imaging;
|
|
using System.Windows.Shapes;
|
|
|
|
namespace Client.Application.Components
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for Map.xaml
|
|
/// </summary>
|
|
public partial class Map : ContentControl
|
|
{
|
|
public Map()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void ContentControl_MouseWheel(object sender, MouseWheelEventArgs e)
|
|
{
|
|
if (DataContext is MapViewModel)
|
|
{
|
|
var model = (MapViewModel)DataContext;
|
|
model.OnMouseWheel(sender, e);
|
|
}
|
|
}
|
|
|
|
private void ContentControl_MouseLeave(object sender, MouseEventArgs e)
|
|
{
|
|
if (DataContext is MapViewModel)
|
|
{
|
|
var model = (MapViewModel)DataContext;
|
|
model.OnMouseLeave(sender, e);
|
|
}
|
|
}
|
|
|
|
private void ContentControl_MouseMove(object sender, MouseEventArgs e)
|
|
{
|
|
if (DataContext is MapViewModel)
|
|
{
|
|
var model = (MapViewModel)DataContext;
|
|
model.OnMouseMove(sender, e);
|
|
}
|
|
}
|
|
}
|
|
}
|