Added plain TextBox to test the databinding on CodeTextBox.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user