Restructure View/ViewModels into their own distinct folders
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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"
|
||||
@@ -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
|
||||
{
|
||||
Reference in New Issue
Block a user