Skip to content

Commit ad5d864

Browse files
committed
refactor: remove duplication of DescriptionTextBoxHeight
1 parent cf7fa38 commit ad5d864

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

Desktop/App.xaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
<Application x:Class="Desktop.App"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:sys="clr-namespace:System;assembly=mscorlib"
5+
46
DispatcherUnhandledException="App_OnDispatcherUnhandledException">
57
<Application.Resources>
68
<ResourceDictionary>
@@ -9,6 +11,7 @@
911
Source="pack://application:,,,/PresentationFramework.Fluent;component/Themes/Fluent.xaml" />
1012
</ResourceDictionary.MergedDictionaries>
1113
<Thickness x:Key="DefaultMargin">20</Thickness>
14+
<sys:Double x:Key="DescriptionTextBoxHeight">75</sys:Double>
1215
</ResourceDictionary>
1316
</Application.Resources>
1417
</Application>

Desktop/Tasks/TaskCreation.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
<Label Content="_Name:" Target="{Binding ElementName=Name}" />
2323
<TextBox Grid.Row="1" Name="Name" />
2424
<Label Grid.Row="2" Content="_Description:" Target="{Binding ElementName=Description}" />
25-
<TextBox Grid.Row="3" Name="Description" Height="75" AcceptsReturn="True" TextWrapping="Wrap"
25+
<TextBox Grid.Row="3" Name="Description" Height="{StaticResource DescriptionTextBoxHeight}"
26+
AcceptsReturn="True" TextWrapping="Wrap"
2627
VerticalAlignment="Stretch" />
2728
<Button AutomationProperties.AutomationId="SaveTask" Grid.Row="4" Content="Add" HorizontalAlignment="Right"
2829
IsDefault="True"

Desktop/Tasks/TaskEditing.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<Label Content="_Name:" Target="{Binding ElementName=Name}" />
1212
<TextBox Name="Name" />
1313
<Label Content="_Description:" Target="{Binding ElementName=Description}" />
14-
<TextBox Name="Description" Height="75" AcceptsReturn="True" TextWrapping="Wrap"
14+
<TextBox Name="Description" Height="{StaticResource DescriptionTextBoxHeight}" AcceptsReturn="True"
15+
TextWrapping="Wrap"
1516
VerticalAlignment="Stretch" />
1617
<Button IsDefault="True" Content="Save" HorizontalAlignment="Right" Click="SaveTask" />
1718
</StackPanel>

0 commit comments

Comments
 (0)