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,12 +1,22 @@
<Window x:Class="Befunge.Editor.MainWindow"
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:loc="clr-namespace:Befunge.Editor.Controls"
xmlns:local="clr-namespace:Befunge.Editor" x:Class="Befunge.Editor.MainWindow"
mc:Ignorable="d"
Title="Befunge Editor" Height="350" Width="525">
<Window.DataContext>
<local:TextContext/>
</Window.DataContext>
<Grid>
<loc:CodeTextBox x:Name="EditRegion" Margin="10,10,10,10.5" Text="Hello, world!"/>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
<RowDefinition Height="1*"/>
</Grid.RowDefinitions>
<loc:CodeTextBox x:Name="EditRegion" Margin="10" Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="0"/>
<TextBox x:Name="PlainTextBox" Margin="10" Text="{Binding Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Grid.Row="1"/>
</Grid>
</Window>