Skip to content

Commit ecf1cc7

Browse files
committed
replaced textblocks with linkbutton controls
1 parent 64e90c7 commit ecf1cc7

File tree

5 files changed

+33
-101
lines changed

5 files changed

+33
-101
lines changed

RetailCoder.VBE/UI/Settings/GeneralSettings.xaml

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -97,26 +97,12 @@
9797
<ColumnDefinition MaxWidth="75"/>
9898
<ColumnDefinition MaxWidth="75"/>
9999
</Grid.ColumnDefinitions>
100-
<TextBlock Foreground="Blue"
101-
Grid.Column="1"
102-
TextDecorations="Underline"
103-
Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ImportSettings}"
104-
VerticalAlignment="Center"
105-
Margin="5,0,5,0">
106-
<TextBlock.InputBindings>
107-
<MouseBinding Command="{Binding ImportButtonCommand}" MouseAction="LeftClick" />
108-
</TextBlock.InputBindings>
109-
</TextBlock>
110-
<TextBlock Foreground="Blue"
111-
Grid.Column="2"
112-
TextDecorations="Underline"
113-
Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ExportSettings}"
114-
VerticalAlignment="Center"
115-
Margin="5,0,5,0">
116-
<TextBlock.InputBindings>
117-
<MouseBinding Command="{Binding ExportButtonCommand}" MouseAction="LeftClick" />
118-
</TextBlock.InputBindings>
119-
</TextBlock>
100+
<controls:LinkButton Grid.Column="1" Margin="2"
101+
Command="{Binding ImportButtonCommand}"
102+
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ImportSettings}"/>
103+
<controls:LinkButton Grid.Column="2" Margin="2"
104+
Command="{Binding ExportButtonCommand}"
105+
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ExportSettings}"/>
120106
</Grid>
121107
</StackPanel>
122108
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right"/>

RetailCoder.VBE/UI/Settings/IndenterSettings.xaml

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -58,26 +58,12 @@
5858
<ColumnDefinition MaxWidth="75"/>
5959
<ColumnDefinition MaxWidth="75"/>
6060
</Grid.ColumnDefinitions>
61-
<TextBlock Foreground="Blue"
62-
Grid.Column="1"
63-
TextDecorations="Underline"
64-
Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ImportSettings}"
65-
VerticalAlignment="Center"
66-
Margin="5,0,5,0">
67-
<TextBlock.InputBindings>
68-
<MouseBinding Command="{Binding ImportButtonCommand}" MouseAction="LeftClick" />
69-
</TextBlock.InputBindings>
70-
</TextBlock>
71-
<TextBlock Foreground="Blue"
72-
Grid.Column="2"
73-
TextDecorations="Underline"
74-
Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ExportSettings}"
75-
VerticalAlignment="Center"
76-
Margin="5,0,5,0">
77-
<TextBlock.InputBindings>
78-
<MouseBinding Command="{Binding ExportButtonCommand}" MouseAction="LeftClick" />
79-
</TextBlock.InputBindings>
80-
</TextBlock>
61+
<controls:LinkButton Grid.Column="1" Margin="2"
62+
Command="{Binding ImportButtonCommand}"
63+
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ImportSettings}"/>
64+
<controls:LinkButton Grid.Column="2" Margin="2"
65+
Command="{Binding ExportButtonCommand}"
66+
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ExportSettings}"/>
8167
</Grid>
8268
</StackPanel>
8369
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right"/>

RetailCoder.VBE/UI/Settings/InspectionSettings.xaml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -286,27 +286,13 @@
286286
<ColumnDefinition MaxWidth="75"/>
287287
<ColumnDefinition MaxWidth="75"/>
288288
</Grid.ColumnDefinitions>
289-
<TextBlock Foreground="Blue"
290-
Grid.Column="1"
291-
TextDecorations="Underline"
292-
Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ImportSettings}"
293-
VerticalAlignment="Center"
294-
Margin="5,0,5,0">
295-
<TextBlock.InputBindings>
296-
<MouseBinding Command="{Binding ImportButtonCommand}" MouseAction="LeftClick" />
297-
</TextBlock.InputBindings>
298-
</TextBlock>
299-
<TextBlock Foreground="Blue"
300-
Grid.Column="2"
301-
TextDecorations="Underline"
302-
Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ExportSettings}"
303-
VerticalAlignment="Center"
304-
Margin="5,0,5,0">
305-
<TextBlock.InputBindings>
306-
<MouseBinding Command="{Binding ExportButtonCommand}" MouseAction="LeftClick" />
307-
</TextBlock.InputBindings>
308-
</TextBlock>
309-
</Grid>
289+
<controls:LinkButton Grid.Column="1" Margin="2"
290+
Command="{Binding ImportButtonCommand}"
291+
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ImportSettings}"/>
292+
<controls:LinkButton Grid.Column="2" Margin="2"
293+
Command="{Binding ExportButtonCommand}"
294+
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ExportSettings}"/>
295+
</Grid>
310296
</StackPanel>
311297
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right"/>
312298
</DockPanel>

RetailCoder.VBE/UI/Settings/TodoSettings.xaml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
xmlns:settings="clr-namespace:Rubberduck.UI.Settings"
77
xmlns:themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero"
88
xmlns:converters="clr-namespace:Rubberduck.UI.Settings.Converters"
9+
xmlns:controls="clr-namespace:Rubberduck.UI.Controls"
910
mc:Ignorable="d"
1011
d:DesignHeight="300" d:DesignWidth="300"
1112
d:DataContext="{d:DesignInstance {x:Type settings:TodoSettingsViewModel}, IsDesignTimeCreatable=False}">
@@ -271,26 +272,12 @@
271272
<ColumnDefinition MaxWidth="75"/>
272273
<ColumnDefinition MaxWidth="75"/>
273274
</Grid.ColumnDefinitions>
274-
<TextBlock Foreground="Blue"
275-
Grid.Column="1"
276-
TextDecorations="Underline"
277-
Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ImportSettings}"
278-
VerticalAlignment="Center"
279-
Margin="5,0,5,0">
280-
<TextBlock.InputBindings>
281-
<MouseBinding Command="{Binding ImportButtonCommand}" MouseAction="LeftClick" />
282-
</TextBlock.InputBindings>
283-
</TextBlock>
284-
<TextBlock Foreground="Blue"
285-
Grid.Column="2"
286-
TextDecorations="Underline"
287-
Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ExportSettings}"
288-
VerticalAlignment="Center"
289-
Margin="5,0,5,0">
290-
<TextBlock.InputBindings>
291-
<MouseBinding Command="{Binding ExportButtonCommand}" MouseAction="LeftClick" />
292-
</TextBlock.InputBindings>
293-
</TextBlock>
275+
<controls:LinkButton Grid.Column="1" Margin="2"
276+
Command="{Binding ImportButtonCommand}"
277+
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ImportSettings}"/>
278+
<controls:LinkButton Grid.Column="2" Margin="2"
279+
Command="{Binding ExportButtonCommand}"
280+
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ExportSettings}"/>
294281
</Grid>
295282
</StackPanel>
296283
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right"/>

RetailCoder.VBE/UI/Settings/UnitTestSettings.xaml

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
xmlns:settingsConfig="clr-namespace:Rubberduck.Settings"
88
xmlns:converters="clr-namespace:Rubberduck.UI.Settings.Converters"
99
xmlns:core="clr-namespace:System;assembly=mscorlib"
10+
xmlns:controls="clr-namespace:Rubberduck.UI.Controls"
1011
mc:Ignorable="d"
1112
d:DesignHeight="300" d:DesignWidth="300"
1213
d:DataContext="{d:DesignInstance {x:Type settings:UnitTestSettingsViewModel}, IsDesignTimeCreatable=False}">
@@ -59,26 +60,12 @@
5960
<ColumnDefinition MaxWidth="75"/>
6061
<ColumnDefinition MaxWidth="75"/>
6162
</Grid.ColumnDefinitions>
62-
<TextBlock Foreground="Blue"
63-
Grid.Column="1"
64-
TextDecorations="Underline"
65-
Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ImportSettings}"
66-
VerticalAlignment="Center"
67-
Margin="5,0,5,0">
68-
<TextBlock.InputBindings>
69-
<MouseBinding Command="{Binding ImportButtonCommand}" MouseAction="LeftClick" />
70-
</TextBlock.InputBindings>
71-
</TextBlock>
72-
<TextBlock Foreground="Blue"
73-
Grid.Column="2"
74-
TextDecorations="Underline"
75-
Text="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ExportSettings}"
76-
VerticalAlignment="Center"
77-
Margin="5,0,5,0">
78-
<TextBlock.InputBindings>
79-
<MouseBinding Command="{Binding ExportButtonCommand}" MouseAction="LeftClick" />
80-
</TextBlock.InputBindings>
81-
</TextBlock>
63+
<controls:LinkButton Grid.Column="1" Margin="2"
64+
Command="{Binding ImportButtonCommand}"
65+
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ImportSettings}"/>
66+
<controls:LinkButton Grid.Column="2" Margin="2"
67+
Command="{Binding ExportButtonCommand}"
68+
Content="{Resx ResxName=Rubberduck.UI.RubberduckUI, Key=SettingsCaption_ExportSettings}"/>
8269
</Grid>
8370
</StackPanel>
8471
<StackPanel Orientation="Horizontal" DockPanel.Dock="Right"/>

0 commit comments

Comments
 (0)