-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Add layout with scan button on the bottom
- Loading branch information
1 parent
e9bb3c9
commit 8ff9633
Showing
8 changed files
with
113 additions
and
13 deletions.
There are no files selected for viewing
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,18 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:layouts="clr-namespace:Smartway.UiComponent.Layouts;assembly=Smartway.UiComponent" | ||
mc:Ignorable="d" | ||
x:Class="Smartway.UiComponent.Sample.Layouts.LayoutsSample"> | ||
<ContentPage.Content> | ||
<layouts:ScannableLayout> | ||
<layouts:ScannableLayout.LayoutContent> | ||
<Label Text="Example layout avec bouton scan sur la page" | ||
VerticalOptions="CenterAndExpand" | ||
HorizontalOptions="CenterAndExpand" /> | ||
</layouts:ScannableLayout.LayoutContent> | ||
</layouts:ScannableLayout> | ||
</ContentPage.Content> | ||
</ContentPage> |
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,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
using Xamarin.Forms; | ||
using Xamarin.Forms.Xaml; | ||
|
||
namespace Smartway.UiComponent.Sample.Layouts | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
public partial class LayoutsSample : ContentPage | ||
{ | ||
public LayoutsSample() | ||
{ | ||
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
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
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
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,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ContentView | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:buttons="clr-namespace:Smartway.UiComponent.Buttons;assembly=Smartway.UiComponent" | ||
x:Name="Self" | ||
x:Class="Smartway.UiComponent.Layouts.ScannableLayout"> | ||
<ContentView.Content> | ||
<RelativeLayout> | ||
<ContentView | ||
Content="{Binding LayoutContent, Source={x:Reference Self}}" | ||
RelativeLayout.HeightConstraint="{ConstraintExpression Type=RelativeToParent, Property=Height, Factor=1}" | ||
RelativeLayout.WidthConstraint="{ConstraintExpression Type=RelativeToParent, Property=Width, Factor=1}" > | ||
</ContentView> | ||
<buttons:ScanButton | ||
Command="{Binding ScanButton}" | ||
RelativeLayout.XConstraint="272" | ||
RelativeLayout.YConstraint="480"/> | ||
</RelativeLayout> | ||
</ContentView.Content> | ||
</ContentView> |
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,22 @@ | ||
using Xamarin.Forms; | ||
using Xamarin.Forms.Xaml; | ||
|
||
namespace Smartway.UiComponent.Layouts | ||
{ | ||
[ContentProperty("LayoutContent")] | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
public partial class ScannableLayout | ||
{ | ||
public static readonly BindableProperty LayoutContentProperty = BindableProperty.Create(nameof(LayoutContent), typeof(View), typeof(ScannableLayout)); | ||
|
||
public ScannableLayout() | ||
{ | ||
InitializeComponent(); | ||
} | ||
public View LayoutContent | ||
{ | ||
get => (View)GetValue(LayoutContentProperty); | ||
set => SetValue(LayoutContentProperty, value); | ||
} | ||
} | ||
} |
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