Files
maui-linux/templates/openmaui-linux-xaml-app/Resources/Styles/Styles.xaml
logikonline 1d9338d823 Add full XAML support for .NET MAUI compatibility
New features:
- MauiAppBuilderExtensions.UseOpenMauiLinux() for standard MAUI integration
- New template: openmaui-linux-xaml with full XAML support
- Standard MAUI XAML syntax (ContentPage, VerticalStackLayout, etc.)
- Resource dictionaries (Colors.xaml, Styles.xaml)
- Compiled XAML support via MauiXaml items

Templates now available:
- dotnet new openmaui-linux      (code-based UI)
- dotnet new openmaui-linux-xaml (XAML-based UI)

Usage:
    var builder = MauiApp.CreateBuilder();
    builder
        .UseMauiApp<App>()
        .UseOpenMauiLinux();  // Enable Linux with XAML
2025-12-19 05:17:50 -05:00

105 lines
4.2 KiB
XML

<?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">
<!-- Headline Style -->
<Style x:Key="Headline" TargetType="Label">
<Setter Property="TextColor" Value="{StaticResource Primary}" />
<Setter Property="FontSize" Value="32" />
<Setter Property="FontAttributes" Value="Bold" />
<Setter Property="HorizontalTextAlignment" Value="Center" />
</Style>
<!-- SubHeadline Style -->
<Style x:Key="SubHeadline" TargetType="Label">
<Setter Property="TextColor" Value="{StaticResource Gray500}" />
<Setter Property="FontSize" Value="18" />
<Setter Property="HorizontalTextAlignment" Value="Center" />
</Style>
<!-- Default Button Style -->
<Style TargetType="Button">
<Setter Property="TextColor" Value="White" />
<Setter Property="BackgroundColor" Value="{StaticResource Primary}" />
<Setter Property="FontSize" Value="14" />
<Setter Property="FontAttributes" Value="Bold" />
<Setter Property="CornerRadius" Value="8" />
<Setter Property="Padding" Value="14,10" />
<Setter Property="MinimumHeightRequest" Value="44" />
<Setter Property="MinimumWidthRequest" Value="44" />
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{StaticResource Gray300}" />
<Setter Property="BackgroundColor" Value="{StaticResource Gray100}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="PointerOver">
<VisualState.Setters>
<Setter Property="BackgroundColor" Value="{StaticResource PrimaryDark}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<!-- Default Entry Style -->
<Style TargetType="Entry">
<Setter Property="TextColor" Value="{StaticResource Gray900}" />
<Setter Property="PlaceholderColor" Value="{StaticResource Gray400}" />
<Setter Property="BackgroundColor" Value="Transparent" />
<Setter Property="FontSize" Value="14" />
<Setter Property="MinimumHeightRequest" Value="44" />
</Style>
<!-- Default Label Style -->
<Style TargetType="Label">
<Setter Property="TextColor" Value="{StaticResource Gray900}" />
<Setter Property="FontSize" Value="14" />
</Style>
<!-- Default CheckBox Style -->
<Style TargetType="CheckBox">
<Setter Property="Color" Value="{StaticResource Primary}" />
</Style>
<!-- Default Switch Style -->
<Style TargetType="Switch">
<Setter Property="OnColor" Value="{StaticResource Primary}" />
<Setter Property="ThumbColor" Value="White" />
</Style>
<!-- Default Slider Style -->
<Style TargetType="Slider">
<Setter Property="MinimumTrackColor" Value="{StaticResource Primary}" />
<Setter Property="MaximumTrackColor" Value="{StaticResource Gray200}" />
<Setter Property="ThumbColor" Value="{StaticResource Primary}" />
</Style>
<!-- Default ProgressBar Style -->
<Style TargetType="ProgressBar">
<Setter Property="ProgressColor" Value="{StaticResource Primary}" />
</Style>
<!-- Default ActivityIndicator Style -->
<Style TargetType="ActivityIndicator">
<Setter Property="Color" Value="{StaticResource Primary}" />
</Style>
<!-- Page Background -->
<Style TargetType="Page" ApplyToDerivedTypes="True">
<Setter Property="BackgroundColor" Value="{StaticResource LightBackground}" />
</Style>
<Style TargetType="ContentPage" ApplyToDerivedTypes="True">
<Setter Property="BackgroundColor" Value="{StaticResource LightBackground}" />
</Style>
</ResourceDictionary>