Files
MauiCourse/AdventureWorks.MAUI/Views/ProductDetailView.xaml

102 lines
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="AdventureWorks.MAUI.Views.ProductDetailView"
xmlns:partial="clr-namespace:AdventureWorks.MAUI.ViewsPartial"
Title="Product Information">
<Border Style="{StaticResource Border.Page}">
<ScrollView>
<Grid RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto"
ColumnDefinitions="Auto, *"
Style="{StaticResource Grid.Page}">
<partial:HeaderView Grid.Row="0"
Grid.ColumnSpan="2"
ViewTitle="Product Information"
ViewDescription="Use this Screen to Modify Product Information." />
<Label Grid.Row="1"
Text="Product Name" />
<Entry Grid.Row="1"
Grid.Column="1" />
<Label Grid.Row="2"
Text="Product Number" />
<Entry Grid.Row="2"
Grid.Column="1" />
<Label Grid.Row="3"
Text="Color" />
<Entry Grid.Row="3"
Grid.Column="1" />
<Label Grid.Row="4"
Text="Cost" />
<HorizontalStackLayout Grid.Row="4"
Grid.Column="1" >
<Entry Text="{Binding Value}"
BindingContext="{x:Reference CostStepper}"/>
<Stepper x:Name="CostStepper"
Minimum="1"
Value="10"
Maximum="{Binding Value}"
BindingContext="{x:Reference PriceStepper}"
Increment="1"/>
</HorizontalStackLayout>
<Label Grid.Row="5"
Text="Price" />
<HorizontalStackLayout Grid.Row="5"
Grid.Column="1" >
<Entry Text="{Binding Value}"
BindingContext="{x:Reference PriceStepper}"/>
<Stepper x:Name="PriceStepper"
Value="20"
Minimum="{Binding Value}"
Maximum="9999"
BindingContext="{x:Reference CostStepper}"
Increment="1"/>
</HorizontalStackLayout>
<Label Grid.Row="6"
Text="Size" />
<Entry Grid.Row="6"
Grid.Column="1" />
<Label Grid.Row="7"
Text="Weight" />
<Entry Grid.Row="7"
Grid.Column="1" />
<Label Grid.Row="8"
Text="Category" />
<Entry Grid.Row="8"
Grid.Column="1" />
<Label Grid.Row="9"
Text="Model" />
<Entry Grid.Row="9"
Grid.Column="1" />
<Label Grid.Row="10"
Text="Selling Start Date" />
<Entry Grid.Row="10"
Grid.Column="1" />
<Label Grid.Row="11"
Text="Selling End Date" />
<Entry Grid.Row="11"
Grid.Column="1" />
<Label Grid.Row="12"
Text="Discontinued Date" />
<Entry Grid.Row="12"
Grid.Column="1" />
<HorizontalStackLayout Grid.Row="13"
Grid.ColumnSpan="1">
<Button Text="Save" />
<Button Text="Cancel" />
</HorizontalStackLayout>
</Grid>
</ScrollView>
</Border>
</ContentPage>