|
using System;
using System.Windows;
using System.Windows.Controls;
using Interfaces;
namespace Map
{
/// <summary>
/// Interaction logic for MapView.xaml
/// </summary>
public partial class MapView : UserControl, IMapView
{
private IMapViewModel _theMapViewModel;
private readonly IViewFactory _viewFactory;
/// <summary>
/// The View Model.
/// (Automatically Injected by the Castle Windsor Framework)
/// </summary>
public IMapViewModel TheMapViewModel
{
get
{
return _theMapViewModel;
}
set
{
_theMapViewModel = value;
DataContext = _theMapViewModel.TheModel;
}
}
/// <summary>
/// Initializes a new instance of the <see cref="MapView"/> class.
/// </summary>
public MapView(IViewFactory viewFactory)
{
InitializeComponent();
_viewFactory = viewFactory;
}
#region IView Members
/// <summary>
/// Return the View Content.
/// </summary>
/// <returns></returns>
public object GetContent()
{
return this.Content;
}
#endregion
#region IMapView Members
public void ShowView<TView>() where TView : IView
{
throw new NotImplementedException();
}
#endregion
#region IDisposable Members
public void Dispose()
{
throw new NotImplementedException();
}
#endregion
#region Handlers
private void buttonHelp_Click(object sender, RoutedEventArgs e)
{
TheMapViewModel.HandleHelp(e.Source);
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Project Manager and Application Developer, in a wide variety of business applications. Particularly interested in client/server and Graphical User Interface design using Visual C#.
Specialties: 13 Y'rs in C#, 10 Y'rs experience in C++ Highly experienced in wide technologies, IT projects, military projects etc'.