You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.1 KiB
41 lines
1.1 KiB
namespace ShoopNCook.Views;
|
|
|
|
public partial class IngredientView : ContentView
|
|
{
|
|
|
|
private readonly BindableProperty NameProperty =
|
|
BindableProperty.Create(nameof(Name), typeof(string), typeof(IngredientView), default(string));
|
|
|
|
private readonly BindableProperty QuantityProperty =
|
|
BindableProperty.Create(nameof(Quantity), typeof(float), typeof(IngredientView), default(float));
|
|
|
|
private readonly BindableProperty UnitProperty =
|
|
BindableProperty.Create(nameof(Unit), typeof(string), typeof(IngredientView), default(string));
|
|
|
|
public string Name
|
|
{
|
|
get => (string)GetValue(NameProperty);
|
|
set => SetValue(NameProperty, value);
|
|
}
|
|
|
|
public float Quantity
|
|
{
|
|
get => (float)GetValue(QuantityProperty);
|
|
set => SetValue(QuantityProperty, value);
|
|
}
|
|
|
|
public string Unit
|
|
{
|
|
get => (string)GetValue(UnitProperty);
|
|
set => SetValue(UnitProperty, value);
|
|
}
|
|
|
|
public IngredientView(string name, float quantity, string unit)
|
|
{
|
|
InitializeComponent();
|
|
|
|
Name = name;
|
|
Quantity = quantity;
|
|
Unit = unit;
|
|
}
|
|
} |