Restructure View/ViewModels into their own distinct folders

This commit is contained in:
amaitland
2014-08-05 14:57:24 +10:00
parent ce262257f4
commit 37c43f1710
5 changed files with 8 additions and 7 deletions

View File

@@ -1,39 +0,0 @@
using CefSharp.MinimalExample.Wpf.Mvvm;
using CefSharp.Wpf;
using System.ComponentModel;
using System.Windows;
namespace CefSharp.MinimalExample.Wpf.Views.Main
{
public class MainViewModel
{
public event PropertyChangedEventHandler PropertyChanged;
private IWpfWebBrowser webBrowser;
public IWpfWebBrowser WebBrowser
{
get { return webBrowser; }
set { PropertyChanged.ChangeAndNotify(ref webBrowser, value, () => WebBrowser); }
}
private string title;
public string Title
{
get { return title; }
set { PropertyChanged.ChangeAndNotify(ref title, value, () => Title); }
}
public MainViewModel()
{
PropertyChanged += OnPropertyChanged;
}
private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
{
if (e.PropertyName == "Title")
{
Application.Current.MainWindow.Title = "CefSharp.MinimalExample.Wpf - " + Title;
}
}
}
}

View File

@@ -1,4 +1,4 @@
<UserControl x:Class="CefSharp.MinimalExample.Wpf.Views.Main.MainView"
<UserControl x:Class="CefSharp.MinimalExample.Wpf.Views.MainView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

View File

@@ -1,6 +1,7 @@
using System.Windows.Controls;
using CefSharp.MinimalExample.Wpf.ViewModels;
namespace CefSharp.MinimalExample.Wpf.Views.Main
namespace CefSharp.MinimalExample.Wpf.Views
{
public partial class MainView : UserControl
{