Styling measures

This commit is contained in:
2025-08-17 10:04:20 +02:00
parent 6ad9cc1518
commit 244e2fd197
3 changed files with 41 additions and 12 deletions

View File

@ -8,6 +8,7 @@
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" /> <ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" /> <ResourceDictionary Source="Resources/Styles/Styles.xaml" />
<ResourceDictionary Source="Resources/Styles/AppStyles.xaml" />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

View File

@ -2,18 +2,18 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="AdventureWorks.MAUI.MainPage" x:Class="AdventureWorks.MAUI.MainPage"
Title="Home"> Title="{StaticResource ApplicationTitle}">
<Grid RowDefinitions="Auto,Auto,Auto, Auto, Auto,Auto, Auto, Auto , Auto" <Grid RowDefinitions="Auto,Auto,Auto, Auto, Auto,Auto, Auto, Auto , Auto"
ColumnDefinitions="Auto, *" ColumnDefinitions="Auto, *"
ColumnSpacing="10" Style="{StaticResource Grid.Page}">
RowSpacing="10"
Margin="10"
Padding="10">
<Label Grid.Row="0" <Label Grid.Row="0"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Text="User Information" Text="User Information"
FontSize="Title" /> FontSize="Title" />
<Label Grid.Row="1" <Label Grid.Row="1"
Grid.ColumnSpan="2" Grid.ColumnSpan="2"
Text="Use this Screen to Modify User Information." Text="Use this Screen to Modify User Information."
@ -24,6 +24,8 @@
Margin="0,0,0,20" Margin="0,0,0,20"
HeightRequest="1" HeightRequest="1"
Color="Black" /> Color="Black" />
<Label Grid.Row="3" <Label Grid.Row="3"
Text="Login ID" /> Text="Login ID" />
<VerticalStackLayout Grid.Row="3" <VerticalStackLayout Grid.Row="3"
@ -33,9 +35,6 @@
<Label FontSize="Micro" <Label FontSize="Micro"
Text="Please use a combination of letters and numbers." /> Text="Please use a combination of letters and numbers." />
</VerticalStackLayout> </VerticalStackLayout>
<Entry Grid.Row="3"
Grid.Column="1"
Text=""/>
<Label Grid.Row="4" <Label Grid.Row="4"
Text="First Name" /> Text="First Name" />
<Entry Grid.Row="4" <Entry Grid.Row="4"
@ -55,19 +54,19 @@
Grid.Column="1" Grid.Column="1"
Wrap="Wrap" Wrap="Wrap"
Direction="Row"> Direction="Row">
<HorizontalStackLayout Spacing="5"> <HorizontalStackLayout>
<Label Text="401k?"/> <Label Text="401k?"/>
<CheckBox IsChecked="True"/> <CheckBox IsChecked="True"/>
</HorizontalStackLayout> </HorizontalStackLayout>
<HorizontalStackLayout Spacing="5"> <HorizontalStackLayout >
<Label Text="Flex Time?"/> <Label Text="Flex Time?"/>
<CheckBox IsChecked="False"/> <CheckBox IsChecked="False"/>
</HorizontalStackLayout> </HorizontalStackLayout>
<HorizontalStackLayout Spacing="5"> <HorizontalStackLayout >
<Label Text="Health Care?"/> <Label Text="Health Care?"/>
<CheckBox IsChecked="True"/> <CheckBox IsChecked="True"/>
</HorizontalStackLayout> </HorizontalStackLayout>
<HorizontalStackLayout Spacing="5"> <HorizontalStackLayout >
<Label Text="Health Savings Account?"/> <Label Text="Health Savings Account?"/>
<CheckBox IsChecked="True"/> <CheckBox IsChecked="True"/>
</HorizontalStackLayout> </HorizontalStackLayout>

View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xaml-comp compile="true" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<x:String x:Key="ApplicationTitle">
Adventure Works
</x:String>
<x:Int32 x:Key="DefaultSpacingForGrid">10</x:Int32>
<Style TargetType="Grid"
x:Key="Grid.Page">
<Setter Property="ColumnSpacing" Value="{StaticResource DefaultSpacingForGrid}" />
<Setter Property="RowSpacing" Value="{StaticResource DefaultSpacingForGrid}" />
<Setter Property="Margin" Value="{StaticResource DefaultSpacingForGrid}" />
<Setter Property="Padding" Value="{StaticResource DefaultSpacingForGrid}" />
</Style>
<Style TargetType="Label">
<Setter Property="VerticalTextAlignment" Value="Center" />
</Style>
<Style TargetType="HorizontalStackLayout">
<Setter Property="Spacing" Value="5" />
</Style>
<Style TargetType="Button">
<Setter Property="WidthRequest" Value="100"/>
<Setter Property="BackgroundColor" Value="Blue"/>
<Setter Property="TextColor" Value="White"/>
</Style>
</ResourceDictionary>