Skip to content

Commit f126142

Browse files
authored
Merge pull request #26 from egvijayanand/working
Minor corrections
2 parents 4cc65cb + 3448fb9 commit f126142

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/DateCalculator/DateCalculator.Forms/App.xaml

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
<x:String x:Key="AppFont">Roboto400</x:String>
1111
<x:Double x:Key="AppFontSize">14</x:Double>
1212

13+
<x:Double x:Key="ItemSpacing">5</x:Double>
14+
1315
<Color x:Key="Primary">#3700B3</Color>
1416
<Color x:Key="White">White</Color>
1517
<Color x:Key="Black">Black</Color>
@@ -28,6 +30,10 @@
2830
<Setter Property="BackgroundColor" Value="{AppThemeBinding Dark={StaticResource BackgroundDark}, Light={StaticResource BackgroundLight}}" />
2931
</Style>
3032

33+
<Style TargetType="StackLayout">
34+
<Setter Property="Spacing" Value="{StaticResource ItemSpacing}" />
35+
</Style>
36+
3137
<Style TargetType="Label">
3238
<Setter Property="TextColor" Value="{AppThemeBinding Dark={StaticResource TextDark}, Light={StaticResource TextLight}}" />
3339
<Setter Property="FontFamily" Value="{StaticResource AppFont}" />

src/DateCalculator/DateCalculator.Shared/ViewModels/DateViewModel.cs

+6-5
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public DateViewModel()
6464

6565
public IList<int> Range { get; init; }
6666

67+
// While using classic MVVM
6768
/*
6869
public DateTime StartDate
6970
{
@@ -104,25 +105,25 @@ public bool DiffMode
104105
public string SelectedMode
105106
{
106107
get => selectedMode;
107-
set => SetProperty(ref selectedMode, value, onChanged: FindTheResult);
108+
set => SetProperty(ref selectedMode, value, onChanged: FindTheDate);
108109
}
109110
110111
public int SelectedYear
111112
{
112113
get => selectedYear;
113-
set => SetProperty(ref selectedYear, value, onChanged: FindTheResult);
114+
set => SetProperty(ref selectedYear, value, onChanged: FindTheDate);
114115
}
115116
116117
public int SelectedMonth
117118
{
118119
get => selectedMonth;
119-
set => SetProperty(ref selectedMonth, value, onChanged: FindTheResult);
120+
set => SetProperty(ref selectedMonth, value, onChanged: FindTheDate);
120121
}
121122
122123
public int SelectedDay
123124
{
124125
get => selectedDay;
125-
set => SetProperty(ref selectedDay, value, onChanged: FindTheResult);
126+
set => SetProperty(ref selectedDay, value, onChanged: FindTheDate);
126127
}
127128
public string ResultCaption
128129
{
@@ -142,7 +143,7 @@ public string DiffInDays
142143
set => SetProperty(ref diffInDays, value);
143144
}
144145
145-
public ICommand DiffCommand => new Command(FindTheResult);
146+
public ICommand DiffCommand => new Command(FindTheDate);
146147
*/
147148

148149
partial void OnDiffModeChanged(bool value)

0 commit comments

Comments
 (0)