This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
582fdb3
commit db7ca13
Showing
3 changed files
with
47 additions
and
17 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
Xamarin.Forms.Controls/GalleryPages/ShapesGalleries/ShapeAppThemeGallery.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ContentPage | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Xamarin.Forms.Controls.GalleryPages.ShapesGalleries.ShapeAppThemeGallery" | ||
Title="Shapes AppTheme Gallery"> | ||
<ContentPage.Resources> | ||
|
||
<Style x:Key="LayoutAppThemeStyle" TargetType="StackLayout"> | ||
<Setter Property="BackgroundColor" Value="{AppThemeBinding White, Light=White, Dark=Black}" /> | ||
<Setter Property="Padding" Value="12" /> | ||
</Style> | ||
|
||
<Style x:Key="LabelAppThemeStyle" TargetType="Label"> | ||
<Setter Property="TextColor" Value="{AppThemeBinding Black, Light=Green, Dark=Red}" /> | ||
</Style> | ||
|
||
<Style x:Key="ShapeAppThemeStyle" TargetType="Rectangle"> | ||
<Setter Property="Stroke" Value="{AppThemeBinding Black, Light=Green, Dark=Red}" /> | ||
<Setter Property="Fill" Value="{AppThemeBinding Black, Light=Green, Dark=Red}" /> | ||
</Style> | ||
|
||
</ContentPage.Resources> | ||
<ContentPage.Content> | ||
<StackLayout | ||
Style="{DynamicResource LayoutAppThemeStyle}"> | ||
<Label | ||
Style="{DynamicResource LabelAppThemeStyle}">Shape using AppTheme</Label> | ||
<Rectangle | ||
HorizontalOptions="Start" | ||
HeightRequest="80" | ||
WidthRequest="200" | ||
Style="{DynamicResource ShapeAppThemeStyle}"/> | ||
</StackLayout> | ||
</ContentPage.Content> | ||
</ContentPage> |
10 changes: 10 additions & 0 deletions
10
Xamarin.Forms.Controls/GalleryPages/ShapesGalleries/ShapeAppThemeGallery.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace Xamarin.Forms.Controls.GalleryPages.ShapesGalleries | ||
{ | ||
public partial class ShapeAppThemeGallery : ContentPage | ||
{ | ||
public ShapeAppThemeGallery() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters