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 Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
<ResourceDictionary Source="Resources/Styles/AppStyles.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

View File

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