Skip to content

Commit 3829768

Browse files
committed
add AvalonEdit in TryWindow
1 parent 00a48ed commit 3829768

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

TryWindow/MainWindow.xaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
66
xmlns:local="clr-namespace:TryWindow"
7+
xmlns:ae="http://icsharpcode.net/sharpdevelop/avalonedit"
78
Closing="Window_Closing"
89
mc:Ignorable="d"
910
Title="Expression Evaluate" Width="400" Height="300">
@@ -18,10 +19,14 @@
1819
<TextBlock x:Name="ResultTextBlock" />
1920
<TextBlock x:Name="ExecutionTimeTextBlock" />
2021
</StackPanel>
21-
22-
<TextBox x:Name="ScriptTextBox"
23-
AcceptsReturn="True"
24-
VerticalScrollBarVisibility="Auto"/>
22+
23+
<Border BorderBrush="Gray" BorderThickness="1">
24+
<ae:TextEditor x:Name="ScriptTextBox"
25+
ShowLineNumbers="True"
26+
SyntaxHighlighting="C#"
27+
HorizontalScrollBarVisibility="Auto"
28+
VerticalScrollBarVisibility="Auto"/>
29+
</Border>
2530

2631
</DockPanel>
2732
</Window>

TryWindow/TryWindow.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
<WarningLevel>4</WarningLevel>
3636
</PropertyGroup>
3737
<ItemGroup>
38+
<Reference Include="ICSharpCode.AvalonEdit, Version=5.0.3.0, Culture=neutral, PublicKeyToken=9cc39be672370310, processorArchitecture=MSIL">
39+
<HintPath>..\packages\AvalonEdit.5.0.4\lib\Net40\ICSharpCode.AvalonEdit.dll</HintPath>
40+
</Reference>
3841
<Reference Include="Newtonsoft.Json, Version=11.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
3942
<HintPath>..\packages\Newtonsoft.Json.11.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
4043
</Reference>

TryWindow/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3+
<package id="AvalonEdit" version="5.0.4" targetFramework="net45" />
34
<package id="Newtonsoft.Json" version="11.0.2" targetFramework="net462" />
45
</packages>

0 commit comments

Comments
 (0)