diff --git a/Views/Components/CounterView.xaml b/Views/Components/CounterView.xaml index b460938..52b5890 100644 --- a/Views/Components/CounterView.xaml +++ b/Views/Components/CounterView.xaml @@ -1,52 +1,52 @@ - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Views/Components/CounterView.xaml.cs b/Views/Components/CounterView.xaml.cs index 39b1b2f..0d52151 100644 --- a/Views/Components/CounterView.xaml.cs +++ b/Views/Components/CounterView.xaml.cs @@ -1,51 +1,51 @@ -namespace ShoopNCook.Views; - -public partial class CounterView : ContentView -{ - - private readonly BindableProperty CountProperty = - BindableProperty.Create(nameof(CountLabel), typeof(uint), typeof(CounterView), default(uint) + 1); - - private readonly BindableProperty CounterLabelProperty = - BindableProperty.Create(nameof(CounterLabel), typeof(string), typeof(CounterView), default(string)); - - public CounterView() - { - InitializeComponent(); - CountLabel.BindingContext = this; - CountLabel.SetBinding(Label.TextProperty, nameof(Count)); - - CounterLabel.BindingContext = this; - CounterLabel.SetBinding(Label.TextProperty, nameof(CounterText)); - } - - public uint Count - { - get => (uint)GetValue(CountProperty); - set - { - SetValue(CountProperty, value <= 1 ? 1 : uint.Parse(value.ToString())); - OnPropertyChanged(nameof(Count)); - } - } - - public string CounterText - { - get => (string)GetValue(CounterLabelProperty); - set - { - SetValue(CounterLabelProperty, value); - OnPropertyChanged(nameof(CounterText)); - } - } - - private void OnPlus(object o, EventArgs e) - { - Count += 1; - } - - private void OnMinus(object o, EventArgs e) - { - Count -= 1; - } +namespace ShoopNCook.Views; + +public partial class CounterView : ContentView +{ + + private readonly BindableProperty CountProperty = + BindableProperty.Create(nameof(CountLabel), typeof(uint), typeof(CounterView), default(uint) + 1); + + private readonly BindableProperty CounterLabelProperty = + BindableProperty.Create(nameof(CounterLabel), typeof(string), typeof(CounterView), default(string)); + + public CounterView() + { + InitializeComponent(); + CountLabel.BindingContext = this; + CountLabel.SetBinding(Label.TextProperty, nameof(Count)); + + CounterLabel.BindingContext = this; + CounterLabel.SetBinding(Label.TextProperty, nameof(CounterText)); + } + + public uint Count + { + get => (uint)GetValue(CountProperty); + set + { + SetValue(CountProperty, value <= 1 ? 1 : uint.Parse(value.ToString())); + OnPropertyChanged(nameof(Count)); + } + } + + public string CounterText + { + get => (string)GetValue(CounterLabelProperty); + set + { + SetValue(CounterLabelProperty, value); + OnPropertyChanged(nameof(CounterText)); + } + } + + private void OnPlus(object o, EventArgs e) + { + Count += 1; + } + + private void OnMinus(object o, EventArgs e) + { + Count -= 1; + } } \ No newline at end of file diff --git a/Views/HomePage.xaml b/Views/HomePage.xaml index 38dcd43..fa9eae2 100644 --- a/Views/HomePage.xaml +++ b/Views/HomePage.xaml @@ -25,7 +25,9 @@ HeightRequest="65"/> -