Przeprowadzka
This commit is contained in:
Executable
+14
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="HomePantry.Views.Controls.ProductCard"
|
||||
x:Name="this">
|
||||
<Border StrokeShape="RoundRectangle 10" Padding="10" Margin="0,5">
|
||||
<Grid RowDefinitions="auto, auto, auto">
|
||||
<BoxView Color="{StaticResource PantryGreen}" HeightRequest="40" />
|
||||
<Label Text="{Binding ProductName, Source={x:Reference this}}" TextColor="White" FontAttributes="Bold" FontSize="16" VerticalOptions="Center" Margin="12,0" />
|
||||
<Label Grid.Row="1" Text="{Binding ProductInfo, Source={x:Reference this}}" FontSize="14" Margin="12,8,12,4" />
|
||||
<Label Grid.Row="2" Text="{Binding ExpiryDate, Source={x:Reference this}}" TextColor="Gray" FontSize="12" Margin="12,0,12,8" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</ContentView>
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
namespace HomePantry.Views.Controls;
|
||||
|
||||
public partial class ProductCard : ContentView
|
||||
{
|
||||
public static readonly BindableProperty ProductNameProperty = BindableProperty.Create(nameof(ProductName), typeof(string), typeof(ProductCard), string.Empty);
|
||||
public string ProductName
|
||||
{
|
||||
get => (string)GetValue(ProductNameProperty);
|
||||
set => SetValue(ProductNameProperty, value);
|
||||
}
|
||||
public static readonly BindableProperty ProductInfoProperty = BindableProperty.Create(nameof(ProductInfo), typeof(string), typeof(ProductCard), string.Empty);
|
||||
public string ProductInfo
|
||||
{
|
||||
get => (string)GetValue(ProductInfoProperty);
|
||||
set => SetValue(ProductInfoProperty, value);
|
||||
}
|
||||
public static readonly BindableProperty ExpiryDateProperty = BindableProperty.Create(nameof(ExpiryDate), typeof(string), typeof(ProductCard), string.Empty);
|
||||
public string ExpiryDate
|
||||
{
|
||||
get => (string)GetValue(ExpiryDateProperty);
|
||||
set => SetValue(ExpiryDateProperty, value);
|
||||
}
|
||||
|
||||
public ProductCard()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user