|
using System.ComponentModel.Composition;
using System.Threading;
using System.Windows;
using MefBasic.Helper;
namespace MefBasic
{
public class MainWindowPresenter:APresenter<IMainWindow>
{
public MainWindowPresenter(IMainWindow view)
:base(view)
{
ShellPresenter = MefApplication.Bootstrapper.Container.GetExportedValue<ShellPresenter>();
MefApplication.Bootstrapper.Container.ComposeExportedValue(this);
SynchronizationContextHelper.Instance.SetContext(SynchronizationContext.Current);
}
public ShellPresenter ShellPresenter
{
get { return (ShellPresenter)GetValue(ShellPresenterProperty); }
set { SetValue(ShellPresenterProperty, value); }
}
public static readonly DependencyProperty ShellPresenterProperty =
DependencyProperty.Register("ShellPresenter", typeof(ShellPresenter), typeof(MainWindowPresenter), new UIPropertyMetadata(null));
public string Title
{
get { return (string)GetValue(TitleProperty); }
set { SetValue(TitleProperty, value); }
}
public static readonly DependencyProperty TitleProperty =
DependencyProperty.Register("Title", typeof(string), typeof(MainWindowPresenter), new UIPropertyMetadata(null));
}
}
|
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.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.