root / GES_PAC / View / CreateBehaviourView.xaml @ 9fd69a0e
Historique | Voir | Annoter | Télécharger (4,124 ko)
1 |
<?xml version="1.0" encoding="utf-8" ?>
|
---|---|
2 |
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" |
3 |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" |
4 |
xmlns:vm="clr-namespace:GES_PAC.ViewModel" |
5 |
xmlns:tools="clr-namespace:GES_PAC.View.Tools" |
6 |
x:Class="GES_PAC.View.CreateBehaviourView" |
7 |
x:DataType="vm:CreateBehaviourViewModel"> |
8 |
|
9 |
<Grid>
|
10 |
<StackLayout BackgroundColor="White" Spacing="50"> |
11 |
<tools:ConnectionIndicatorView /> |
12 |
<ScrollView>
|
13 |
|
14 |
<VerticalStackLayout Grid.Row="1" Spacing="30"> |
15 |
|
16 |
<Label Text="{Binding Titre}" |
17 |
FontSize="20" |
18 |
FontAttributes="Bold" |
19 |
HorizontalOptions="Center" /> |
20 |
<VerticalStackLayout Spacing="15" WidthRequest="300"> |
21 |
|
22 |
<!-- Type de comportement -->
|
23 |
<VerticalStackLayout>
|
24 |
|
25 |
<Label Text="Type de comportement" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
26 |
|
27 |
<Picker Title="Sélectionnez un type de comportement" |
28 |
ItemsSource="{Binding TypeComp}" |
29 |
ItemDisplayBinding="{Binding Name}" |
30 |
SelectedItem="{Binding SelectedType}" /> |
31 |
|
32 |
|
33 |
<Label Text="Sélectionnez un type de comportement" |
34 |
FontSize="12" |
35 |
TextColor="Red" |
36 |
IsVisible="{Binding TypeError}"/> |
37 |
</VerticalStackLayout>
|
38 |
|
39 |
<!-- Commentaire -->
|
40 |
<VerticalStackLayout>
|
41 |
<Label Text="Commentaire" FontSize="14" TextColor="Gray" FontAttributes="Bold"/> |
42 |
<Entry Text="{Binding Description, Mode=TwoWay, TargetNullValue=''}" |
43 |
FontSize="16" |
44 |
TextColor="Black" |
45 |
Placeholder="(facultatif)"/> |
46 |
</VerticalStackLayout>
|
47 |
|
48 |
<!-- sortie de l'animal -->
|
49 |
<HorizontalStackLayout HorizontalOptions="Center" VerticalOptions="Center"> |
50 |
<CheckBox IsChecked="{Binding IsAnimalOut}" HorizontalOptions="Center" /> |
51 |
<Label Text="Sortie de l'animal" FontSize="14" TextColor="Gray" HorizontalOptions="Center" VerticalOptions="Center" /> |
52 |
</HorizontalStackLayout>
|
53 |
|
54 |
</VerticalStackLayout>
|
55 |
</VerticalStackLayout>
|
56 |
</ScrollView>
|
57 |
<StackLayout
|
58 |
Margin="10" |
59 |
HorizontalOptions="CenterAndExpand" |
60 |
Orientation="Horizontal" |
61 |
VerticalOptions="FillAndExpand"> |
62 |
|
63 |
<Button
|
64 |
Text="Enregistrer" |
65 |
Command="{Binding CreateBehaviourCommand}" |
66 |
Style="{StaticResource btnNormal}" |
67 |
IsEnabled="{Binding IsFormValid}" |
68 |
VerticalOptions="End"/> |
69 |
</StackLayout>
|
70 |
</StackLayout>
|
71 |
<Grid Grid.RowSpan="1" IsVisible="{Binding IsBusy}"> |
72 |
<Border StrokeThickness="0" |
73 |
Background="Black" |
74 |
Opacity="0.5" |
75 |
Padding="20" |
76 |
WidthRequest="160" |
77 |
HeightRequest="160" |
78 |
HorizontalOptions="Center" |
79 |
VerticalOptions="Center" |
80 |
StrokeShape="RoundRectangle 20"> |
81 |
|
82 |
<VerticalStackLayout HorizontalOptions="Center" VerticalOptions="Center"> |
83 |
<ActivityIndicator IsRunning="True" Color="White" /> |
84 |
<Label Text="Chargement..." |
85 |
FontSize="14" |
86 |
TextColor="white" |
87 |
HorizontalOptions="Center"/> |
88 |
</VerticalStackLayout>
|
89 |
</Border>
|
90 |
</Grid>
|
91 |
</Grid>
|
92 |
|
93 |
</ContentPage>
|