Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Border everywhere #650

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
354239b
Implement Border and CornerRadius properties in Android and iOS
jsuarezruiz May 25, 2021
fcd1d5e
Updated Stubs
jsuarezruiz May 25, 2021
bc09248
Fixed build error
jsuarezruiz May 25, 2021
c8d39e3
Implement border properties in WinUI
jsuarezruiz May 25, 2021
73692e3
Merge branch 'main' into cornerradius-everywhere
jsuarezruiz May 31, 2021
138887d
Merge branch 'main' into cornerradius-everywhere
jsuarezruiz Jun 1, 2021
872b5e8
avoid mismatch exception
StephaneDelcroix Jun 2, 2021
009c4d0
Merge branch 'main' into cornerradius-everywhere
jsuarezruiz Jun 15, 2021
8cdf33f
Merge branch 'main' into cornerradius-everywhere
jsuarezruiz Jun 30, 2021
16f286d
Added sample
jsuarezruiz Jun 30, 2021
156463f
Updated sample
jsuarezruiz Jun 30, 2021
6f2b781
Merge main
jsuarezruiz Jul 7, 2021
35c17ee
Fix build error
jsuarezruiz Jul 9, 2021
83950a9
Updated border ViewExtensions
jsuarezruiz Jul 9, 2021
0136ef6
Updated sample
jsuarezruiz Jul 9, 2021
b8b86f0
Fix build error
jsuarezruiz Jul 12, 2021
027421b
Merge branch 'main' into cornerradius-everywhere
jsuarezruiz Jul 14, 2021
96cfc92
Merge branch 'main' into cornerradius-everywhere
jsuarezruiz Aug 13, 2021
03837a7
Updated to use BorderShape
jsuarezruiz Aug 17, 2021
4f39aed
Implement Border Dash properties
jsuarezruiz Aug 17, 2021
ca082b9
Added more validations
jsuarezruiz Aug 17, 2021
afd45ea
Add more samples
jsuarezruiz Aug 17, 2021
3b457b1
Fix iOS issue and update the main borders sample
jsuarezruiz Aug 17, 2021
d08022f
Initial Windows WrapperView impl
jsuarezruiz Aug 18, 2021
a8d4513
Updated Borders implementation on Windows
jsuarezruiz Aug 24, 2021
50b3185
Correctly apply custom Border in Windows CalendarDatePicker
jsuarezruiz Aug 24, 2021
06b82de
Updated Core ViewModel
jsuarezruiz Aug 24, 2021
e655469
Notify background changes if changed the border
jsuarezruiz Aug 24, 2021
dff0b86
Merge branch 'main' into cornerradius-everywhere
Aug 25, 2021
da5e31c
Merge branch 'main' into cornerradius-everywhere
Aug 25, 2021
be982ce
Fixed build error
jsuarezruiz Aug 25, 2021
f216b2f
Added more samples
jsuarezruiz Aug 25, 2021
81ad1f5
Fix error setting background in Android
jsuarezruiz Aug 25, 2021
b1c12fa
Updated type converter
jsuarezruiz Aug 25, 2021
96df8df
Moved DoubleCollection back to Controls
jsuarezruiz Aug 25, 2021
2b6f207
Fix build failing in tests
jsuarezruiz Aug 25, 2021
55d9aca
Merge branch 'main' into cornerradius-everywhere
PureWeen Aug 25, 2021
662f193
- remove shadowed BP's
PureWeen Aug 25, 2021
ac55184
Merge remote-tracking branch 'origin/main' into cornerradius-everywhere
mattleibow Aug 25, 2021
7447835
Fixed Issue 2254
jsuarezruiz Aug 26, 2021
8e8385b
Fix Issue 2262
jsuarezruiz Aug 26, 2021
ff52ada
Fix issue setting background on iOS
jsuarezruiz Aug 26, 2021
f64f1c9
Register RoundRectangle
jsuarezruiz Aug 26, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"profiles": {
"Maui.Controls.Sample.WinUI": {
"Windows Machine": {
"commandName": "MsixPackage"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@
BackgroundColor="Red"
TextColor="White"
Text="Button"/>
<Label
Text="Custom Border"
Style="{StaticResource Headline}" />
<Button
BackgroundColor="LightBlue"
TextColor="White"
Text="Button"
BorderBrush="Blue"
BorderWidth="4"
BorderShape="12, 0, 0, 24" />
<Label
Text="Image Source"
Style="{StaticResource Headline}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@
Text="TextColor"
Style="{StaticResource Headline}"/>
<DatePicker TextColor="Red"/>
<Label
Text="Custom Border"
Style="{StaticResource Headline}" />
<DatePicker
TextColor="White"
Background="Violet"
BorderBrush="Purple"
BorderWidth="4"
BorderShape="12, 0, 0, 24" />
</VerticalStackLayout>
</views:BasePage.Content>
</views:BasePage>
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@
<Entry
Text="Text"
Background="Orange"/>
<Label
Text="Custom Border"
Style="{StaticResource Headline}" />
<Entry
TextColor="Green"
BorderBrush="Green"
BorderWidth="4"
BorderShape="12, 0, 0, 24" />
</VerticalStackLayout>
</ScrollView>
</views:BasePage.Content>
Expand Down
10 changes: 10 additions & 0 deletions src/Controls/samples/Controls.Sample/Pages/Controls/ImagePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@
</FontImageSource>
</Image.Source>
</Image>
<Label
Text="Custom Border"
Style="{StaticResource Headline}" />
<Image
Source="https://aka.ms/campus.jpg"
HeightRequest="200"
WidthRequest="200"
BorderBrush="Pink"
BorderWidth="4"
BorderShape="12, 0, 0, 24" />
</VerticalStackLayout>
</ScrollView>
</views:BasePage.Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@
<Label
TextColor="Red"
Text="TextColor"/>

<Label
Text="Custom Border"
Style="{StaticResource Headline}" />
<Label
Text="Label"
TextColor="White"
Background="Red"
BorderBrush="Orange"
BorderWidth="4"
BorderShape="12, 0, 0, 24" />
<Label
Text="Html text"
Style="{StaticResource Headline}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@
</x:Array>
</Picker.ItemsSource>
</Picker>
<Label
Text="Custom Border"
Style="{StaticResource Headline}" />
<Picker
Title="Select an item"
SelectedIndex="1"
BorderBrush="Orange"
BorderWidth="4"
BorderShape="12, 0, 0, 24" />
</VerticalStackLayout>
</views:BasePage.Content>
</views:BasePage>
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
Style="{StaticResource Headline}"/>
<TimePicker
IsEnabled="False"/>
<Label
Text="Custom Border"
Style="{StaticResource Headline}" />
<TimePicker
TextColor="White"
Background="LightGreen"
BorderBrush="Green"
BorderWidth="4"
BorderShape="12, 0, 0, 24" />
</VerticalStackLayout>
</views:BasePage.Content>
</views:BasePage>
161 changes: 161 additions & 0 deletions src/Controls/samples/Controls.Sample/Pages/Core/BordersPage.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
<?xml version="1.0" encoding="utf-8" ?>
<views:BasePage
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Maui.Controls.Sample.Pages.BordersPage"
xmlns:views="clr-namespace:Maui.Controls.Sample.Pages.Base"
Title="Borders">
<views:BasePage.Resources>
<ResourceDictionary>

<Style x:Key="InfoStyle" TargetType="Label">
<Setter Property="FontSize" Value="8" />
</Style>

</ResourceDictionary>
</views:BasePage.Resources>
<Grid
Padding="12">
<Grid.RowDefinitions>
<RowDefinition Height="80" />
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ScrollView
Orientation="Horizontal"
HorizontalScrollBarVisibility="Default"
VerticalScrollBarVisibility="Never">
<Grid
Padding="6">
<Entry
x:Name="BorderView"
Text="Entry"
TextColor="White"
HorizontalOptions="Center"
HeightRequest="50"
WidthRequest="150"/>
</Grid>
</ScrollView>
<ScrollView
Grid.Row="1">
<StackLayout>
<Label
Text="Border Shape"
Style="{StaticResource Headline}"/>
<Picker
x:Name="BorderShapePicker"
SelectedIndexChanged="OnBorderShapeSelectedIndexChanged">
<Picker.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Rectangle</x:String>
<x:String>RoundRectangle</x:String>
<x:String>Ellipse</x:String>
</x:Array>
</Picker.ItemsSource>
</Picker>
<Label
Text="Background"
Style="{StaticResource Headline}"/>
<Label
Text="Background Start Color"
Style="{StaticResource InfoStyle}" />
<Entry
x:Name="BackgroundStartColor"
Text="#00B4DB"
Placeholder="Background Start Color Hex"
TextChanged="OnBackgroundChanged" />
<Label
Text="Background End Color"
Style="{StaticResource InfoStyle}" />
<Entry
x:Name="BackgroundEndColor"
Text="#0083B0"
Placeholder="Background End Color Hex"
TextChanged="OnBackgroundChanged"/>
<Label
Text="Border"
Style="{StaticResource Headline}"/>
<Label
Text="Border Start Color"
Style="{StaticResource InfoStyle}" />
<Entry
x:Name="BorderStartColor"
Text="#CAC531"
Placeholder="Border Start Color Hex"
TextChanged="OnBorderChanged"/>
<Label
Text="Border End Color"
Style="{StaticResource InfoStyle}" />
<Entry
x:Name="BorderEndColor"
Text="#F3F9A7"
Placeholder="Border End Color Hex"
TextChanged="OnBorderChanged"/>
<Label
Text="{Binding Source={x:Reference BorderWidthSlider}, Path=Value, StringFormat='{}Border Width: {0}'}"
Style="{StaticResource InfoStyle}" />
<Slider
x:Name="BorderWidthSlider"
Maximum="20"
Minimum="0"
Value="5"
ValueChanged="OnBorderWidthChanged" />
<Label
Text="Border Dash Array:"
Style="{StaticResource InfoStyle}" />
<Entry
x:Name="BorderDashArrayEntry"
Text="1, 1"
TextChanged="OnBorderDashArrayChanged"/>
<Label
Text="{Binding Source={x:Reference BorderDashOffsetSlider}, Path=Value, StringFormat='{}Border Dash Offset: {0}'}"
Style="{StaticResource InfoStyle}" />
<Slider
x:Name="BorderDashOffsetSlider"
Maximum="2"
Minimum="0"
Value="1"
ValueChanged="OnBorderDashOffsetChanged" />
<StackLayout
x:Name="CornerRadiusLayout">
<Label
Text="Corner Radius"
Style="{StaticResource Headline}"/>
<Label
Text="{Binding Source={x:Reference TopLeftCornerSlider}, Path=Value, StringFormat='{}Top Left Corner Radius: {0}'}"
Style="{StaticResource InfoStyle}"/>
<Slider
x:Name="TopLeftCornerSlider"
Maximum="60"
Minimum="0"
Value="20"
ValueChanged="OnCornerRadiusChanged" />
<Label
Text="{Binding Source={x:Reference TopRightCornerSlider}, Path=Value, StringFormat='{}Top Right Corner Radius: {0}'}"
Style="{StaticResource InfoStyle}" />
<Slider
x:Name="TopRightCornerSlider"
Maximum="60"
Minimum="6"
ValueChanged="OnCornerRadiusChanged" />
<Label
Text="{Binding Source={x:Reference BottomLeftCornerSlider}, Path=Value, StringFormat='{}Bottom Left Corner Radius: {0}'}"
Style="{StaticResource InfoStyle}" />
<Slider
x:Name="BottomLeftCornerSlider"
Maximum="60"
Minimum="6"
ValueChanged="OnCornerRadiusChanged" />
<Label
Text="{Binding Source={x:Reference BottomRightCornerSlider}, Path=Value, StringFormat='{}Bottom Right Corner Radius: {0}'}"
Style="{StaticResource InfoStyle}" />
<Slider
x:Name="BottomRightCornerSlider"
Maximum="60"
Minimum="0"
Value="12"
ValueChanged="OnCornerRadiusChanged" />
</StackLayout>
</StackLayout>
</ScrollView>
</Grid>
</views:BasePage>
Loading