Fusion indicateurs
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
commit
4fc193ce37
@ -1 +0,0 @@
|
|||||||
[ ]
|
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,17 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||||
|
x:Class="MauiSpark.Vues.IndicateurVue"
|
||||||
|
x:Name="indicateurVue">
|
||||||
|
|
||||||
|
<Grid
|
||||||
|
x:Name="Grid"
|
||||||
|
SizeChanged="QuandTailleChangee"
|
||||||
|
VerticalOptions="FillAndExpand"
|
||||||
|
HorizontalOptions="FillAndExpand">
|
||||||
|
<Rectangle
|
||||||
|
x:Name="Carre"
|
||||||
|
Fill="{Binding Couleur, Source={x:Reference indicateurVue}}">
|
||||||
|
</Rectangle>
|
||||||
|
</Grid>
|
||||||
|
</ContentView>
|
@ -0,0 +1,28 @@
|
|||||||
|
using CoreLibrary.Core;
|
||||||
|
using MauiSpark.Convertisseurs;
|
||||||
|
using System.Globalization;
|
||||||
|
|
||||||
|
namespace MauiSpark.Vues;
|
||||||
|
|
||||||
|
public partial class IndicateurVue : ContentView
|
||||||
|
{
|
||||||
|
public static readonly BindableProperty CouleurProperty = BindableProperty.Create(nameof(Couleur), typeof(Color), typeof(IndicateurVue), default(Color));
|
||||||
|
|
||||||
|
public Color Couleur
|
||||||
|
{
|
||||||
|
get => (Color)GetValue(CouleurProperty);
|
||||||
|
|
||||||
|
set => SetValue(CouleurProperty, value);
|
||||||
|
}
|
||||||
|
public IndicateurVue()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
BindingContext = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void QuandTailleChangee(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
double taille = Math.Min(Grid.Width, Grid.Height) / 2;
|
||||||
|
Carre.WidthRequest = Carre.HeightRequest = taille;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue