Added plain TextBox to test the databinding on CodeTextBox.

This commit is contained in:
David
2016-10-13 21:15:10 -04:00
parent 1c44e00a1d
commit 3e96ed3484
6 changed files with 1081 additions and 4 deletions

View File

@@ -1,8 +1,34 @@
using System.Windows;
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Windows;
using Befunge.Editor.Annotations;
using Befunge.Editor.CharStyles;
namespace Befunge.Editor
{
public class TextContext : INotifyPropertyChanged
{
private string _text;
public string Text
{
get { return _text; }
set
{
_text = value;
OnPropertyChanged(nameof(Text));
}
}
public event PropertyChangedEventHandler PropertyChanged;
[NotifyPropertyChangedInvocator]
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
public partial class MainWindow
{
public MainWindow()