Skip to content

Commit 7225c80

Browse files
author
Sébastien Geiser
committed
Some scroll for docs
1 parent ad00611 commit 7225c80

File tree

4 files changed

+67
-34
lines changed

4 files changed

+67
-34
lines changed

RegexDialog/RegExToolDialog.xaml

Lines changed: 55 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@
578578
<Grid.RowDefinitions>
579579
<RowDefinition x:Name="RegexLanguageElementFirstRow" Height="*" MinHeight="50" />
580580
<RowDefinition Height="5" />
581-
<RowDefinition Height="0.1*" MinHeight="20"/>
581+
<RowDefinition Height="0.2*" MinHeight="20"/>
582582
</Grid.RowDefinitions>
583583
<DockPanel>
584584
<Grid DockPanel.Dock="Top">
@@ -680,28 +680,31 @@
680680
Grid.Row="1"
681681
VerticalAlignment="Stretch"
682682
HorizontalAlignment="Stretch"/>
683-
<local:SearchableTextControl x:Name="tbxRegexLanguageElementDescription"
684-
Padding="2,0"
685-
Grid.Row="2"
686-
Focusable="True"
687-
BorderBrush="Gray"
688-
BorderThickness="1"
689-
Background="WhiteSmoke"
690-
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
691-
ScrollViewer.VerticalScrollBarVisibility="Auto"
692-
SearchText="{Binding Text, ElementName=FindLanguageElementTextBox}"
693-
IsHighlight="True"
694-
IsMatchCase="False"
695-
IsSelectable="True"
696-
IsMatchAccents="False"/>
683+
<Border BorderThickness="1"
684+
BorderBrush="Gray"
685+
Grid.Row="2">
686+
<ScrollViewer VerticalScrollBarVisibility="Auto">
687+
<local:SearchableTextControl x:Name="tbxRegexLanguageElementDescription"
688+
Padding="2,0"
689+
Focusable="True"
690+
BorderThickness="0"
691+
Background="WhiteSmoke"
692+
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
693+
SearchText="{Binding Text, ElementName=FindLanguageElementTextBox}"
694+
IsHighlight="True"
695+
IsMatchCase="False"
696+
IsSelectable="True"
697+
IsMatchAccents="False"/>
698+
</ScrollViewer>
699+
</Border>
697700
</Grid>
698701
</TabItem>
699702
<TabItem Name="ReplaceTabItem" Header="_Replace Elements" >
700703
<Grid>
701704
<Grid.RowDefinitions>
702705
<RowDefinition x:Name="ReplaceLanguageElementFirstRow" Height="*" MinHeight="50" />
703706
<RowDefinition Height="5" />
704-
<RowDefinition Height="0.1*" MinHeight="20" />
707+
<RowDefinition Height="0.2*" MinHeight="20" />
705708
</Grid.RowDefinitions>
706709
<ListView Name="ReplaceLanguageElementsListView" SelectionChanged="ReplaceLanguageElementsListView_SelectionChanged">
707710
<ListView.ItemTemplate>
@@ -728,24 +731,42 @@
728731
</Grid>
729732
</TabItem>
730733
<TabItem x:Name="RegOptionsTabItem" Header="Regex Op_tions" >
731-
<StackPanel>
732-
<ItemsControl Name="icRegexOptions">
733-
<ItemsControl.ItemTemplate>
734-
<DataTemplate>
735-
<CheckBox IsChecked="{Binding Selected}"
736-
Content="{Binding Name}"
737-
ToolTip="{Binding Description}"/>
738-
</DataTemplate>
739-
</ItemsControl.ItemTemplate>
740-
</ItemsControl>
741-
<TextBlock>
742-
<Hyperlink NavigateUri="https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regexoptions"
743-
RequestNavigate="Hyperlink_RequestNavigate">
744-
More informations on Regex options
745-
</Hyperlink>
746-
</TextBlock>
747-
748-
</StackPanel>
734+
<Grid>
735+
<Grid.RowDefinitions>
736+
<RowDefinition Height="*" MinHeight="50" />
737+
<RowDefinition Height="5" />
738+
<RowDefinition Height="0.2*" MinHeight="20" />
739+
</Grid.RowDefinitions>
740+
<StackPanelEx Margin="5" MarginBetweenChildren="5">
741+
<ListBox Name="icRegexOptions"
742+
SelectionChanged="icRegexOptions_SelectionChanged"
743+
BorderThickness="0">
744+
<ItemsControl.ItemTemplate>
745+
<DataTemplate>
746+
<CheckBox IsChecked="{Binding Selected}"
747+
Content="{Binding Name}"
748+
ToolTip="{Binding Description}"/>
749+
</DataTemplate>
750+
</ItemsControl.ItemTemplate>
751+
</ListBox>
752+
<TextBlock>
753+
<Hyperlink NavigateUri="https://docs.microsoft.com/en-us/dotnet/api/system.text.regularexpressions.regexoptions"
754+
RequestNavigate="Hyperlink_RequestNavigate">
755+
More informations on Regex options
756+
</Hyperlink>
757+
</TextBlock>
758+
</StackPanelEx>
759+
<GridSplitter Grid.Row="1"
760+
VerticalAlignment="Stretch"
761+
HorizontalAlignment="Stretch"/>
762+
<TextBox Name="tbxRegexOptionDescription"
763+
IsReadOnly="True"
764+
TextWrapping="Wrap"
765+
Grid.Row="2"
766+
Background="WhiteSmoke"
767+
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
768+
ScrollViewer.VerticalScrollBarVisibility="Auto"/>
769+
</Grid>
749770
</TabItem>
750771
<TabItem x:Name="TextSourceTabItem" Header="Ot_her Options">
751772
<DockPanel>

RegexDialog/RegExToolDialog.xaml.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2391,5 +2391,13 @@ private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.
23912391
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri));
23922392
e.Handled = true;
23932393
}
2394+
2395+
private void icRegexOptions_SelectionChanged(object sender, SelectionChangedEventArgs e)
2396+
{
2397+
if(icRegexOptions.SelectedValue is RegExOptionViewModel optionModel)
2398+
{
2399+
tbxRegexOptionDescription.Text = optionModel.Description;
2400+
}
2401+
}
23942402
}
23952403
}

RegexDialog/RegexDialog.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@
4545
<StartupObject />
4646
</PropertyGroup>
4747
<ItemGroup>
48+
<Reference Include="CodingSeb.Layouts, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
49+
<HintPath>..\packages\CodingSeb.Layouts.1.0.1\lib\net47\CodingSeb.Layouts.dll</HintPath>
50+
</Reference>
4851
<Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
4952
<HintPath>..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
5053
</Reference>

RegexDialog/packages.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="AvalonEdit" version="6.0.1" targetFramework="net46" />
4+
<package id="CodingSeb.Layouts" version="1.0.1" targetFramework="net47" />
45
<package id="Costura.Fody" version="4.1.0" targetFramework="net47" />
56
<package id="CS-Script.bin" version="3.30.5.1" targetFramework="net46" />
67
<package id="CS-Script.lib" version="3.30.5.1" targetFramework="net46" />

0 commit comments

Comments
 (0)