Added: Styles

This commit is contained in:
TheJoKlLa 2020-09-10 17:45:36 +02:00
parent 2025f9155b
commit 8366ea0f64
7 changed files with 45 additions and 14 deletions

View File

@ -3,6 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.App"> x:Class="Borepin.App">
<Application.Resources> <Application.Resources>
<ResourceDictionary Source="Styles/LightTheme.xaml" />
</Application.Resources> </Application.Resources>
</Application> </Application>

View File

@ -29,10 +29,13 @@
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon> <DependentUpon>Resources.resx</DependentUpon>
</Compile> </Compile>
<Compile Update="Resources\TextResource.Designer.cs"> <Compile Update="Resources\Text\TextResource.de.Designer.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>TextResource.resx</DependentUpon> <DependentUpon>TextResource.de.resx</DependentUpon>
</Compile>
<Compile Update="Styles\LightTheme.xaml.cs">
<DependentUpon>LightTheme.xaml</DependentUpon>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
@ -40,9 +43,12 @@
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput> <LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Update="Resources\TextResource.resx"> <EmbeddedResource Update="Resources\Text\TextResource.de.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>TextResource.Designer.cs</LastGenOutput> <LastGenOutput>TextResource.de.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Styles\LightTheme.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -3,18 +3,18 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.MainPage"> x:Class="Borepin.MainPage">
<StackLayout> <StackLayout BackgroundColor="#FFFFFFFF">
<Frame BackgroundColor="#2196F3" Padding="24" CornerRadius="0"> <Frame BackgroundColor="{DynamicResource SecondColor}" Padding="24" CornerRadius="0">
<Label Text="Welcome to Xamarin.Forms!" HorizontalTextAlignment="Center" TextColor="White" FontSize="36"/> <Label Text="Welcome to FabAccess" HorizontalTextAlignment="Center" TextColor="{DynamicResource FirstColor}" FontSize="36"/>
</Frame> </Frame>
<Label Text="Start developing now" FontSize="Title" Padding="30,10,30,10"/> <Label Text="Join now" FontSize="Title" Padding="30,10,30,10" />
<Label Text="Make changes to your XAML file and save to see your UI update in the running app with XAML Hot Reload. Give it a try!" FontSize="16" Padding="30,0,30,0"/> <Label Text="Register a Card and start working." FontSize="16" Padding="30,0,30,0" TextColor="{DynamicResource FourthColor}"/>
<Label FontSize="16" Padding="30,24,30,0"> <Label FontSize="16" Padding="30,24,30,0" TextColor="{DynamicResource FourthColor}">
<Label.FormattedText> <Label.FormattedText>
<FormattedString> <FormattedString>
<FormattedString.Spans> <FormattedString.Spans>
<Span Text="Learn more at "/> <Span Text="Learn more at "/>
<Span Text="https://aka.ms/xamarin-quickstart" FontAttributes="Bold"/> <Span Text="https://fab-access.org" FontAttributes="Bold" TextColor="{DynamicResource ThirdColor}"/>
</FormattedString.Spans> </FormattedString.Spans>
</FormattedString> </FormattedString>
</Label.FormattedText> </Label.FormattedText>

View File

@ -8,7 +8,7 @@
// </auto-generated> // </auto-generated>
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
namespace Borepin.Resources { namespace Borepin.Resources.Text {
using System; using System;
@ -39,7 +39,7 @@ namespace Borepin.Resources {
internal static global::System.Resources.ResourceManager ResourceManager { internal static global::System.Resources.ResourceManager ResourceManager {
get { get {
if (object.ReferenceEquals(resourceMan, null)) { if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Borepin.Resources.TextResource", typeof(TextResource).Assembly); global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Borepin.Resources.Text.TextResource", typeof(TextResource).Assembly);
resourceMan = temp; resourceMan = temp;
} }
return resourceMan; return resourceMan;

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Borepin.Styles.LightTheme">
<Color x:Key="FirstColor">#FF00D4AA</Color>
<Color x:Key="SecondColor">#FF3C474D</Color>
<Color x:Key="ThirdColor">#FF333333</Color>
<Color x:Key="FourthColor">#FF555555</Color>
<Color x:Key="FifthColor">#FFCCCCCC</Color>
</ResourceDictionary>

View File

@ -0,0 +1,14 @@
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace Borepin.Styles
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class LightTheme : ResourceDictionary
{
public LightTheme()
{
InitializeComponent();
}
}
}