alielie
2026-09-10 f3889f2d36c50cf99468594854def9b7ed069fb5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<UserControl x:Class="OpenTapEditor.VariableTextBox"
             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" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:OpenTapEditor.UI"
             mc:Ignorable="d"
xmlns:avalonEdit="http://icsharpcode.net/sharpdevelop/avalonedit"
             x:Name="self"
             Loaded="self_Loaded"
             d:DesignHeight="450" d:DesignWidth="800">
    <UserControl.Resources>
        <Style TargetType="local:MvvmTextEditor">
            <Setter Property="BorderBrush" Value="{StaticResource BorderBrush}"/>
            <Setter Property="BorderThickness" Value="1"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="VerticalAlignment" Value="Center"/>
            <Setter Property="Padding" Value="3"/>
            <Setter Property="FontSize" Value="{DynamicResource GlobalFontSize}"/>
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
 
        <!--<TextBox x:Name="TbPath" Text="{Binding Value,ElementName=self, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>-->
        
        <!--<avalonEdit:TextEditor Name="textEditor" 
                               SyntaxHighlighting="C#"
                           TextChanged="textEditor_TextChanged" FontFamily="Consolas" />-->
        
        <local:MvvmTextEditor DocumentText="{Binding Value,ElementName=self, 
        Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" Loaded="MvvmTextEditor_Loaded" SyntaxHighlighting="C#"/>
 
        <Button Grid.Column="1" Click="Button_Click" Padding="2,0" Content="f(x)"/>
    </Grid>
</UserControl>