Statistiques
| Branche: | Révision:

teotestbluetooth / TestXamConnections / TestXamConnections / Views / AccueilView.xaml @ 4af7febc

Historique | Voir | Annoter | Télécharger (5,256 ko)

1
<?xml version="1.0" encoding="utf-8" ?>
2
<ContentPage
3
    x:Class="TestXamConnections.Views.AccueilView"
4
    xmlns="http://xamarin.com/schemas/2014/forms"
5
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
6
    xmlns:xe="clr-namespace:XamEffects;assembly=XamEffects"
7
    Title="Teo Test Bluetooth - Bienvenue">
8
    <ContentPage.Content>
9
        <StackLayout BackgroundColor="#001729" VerticalOptions="FillAndExpand">
10
            <StackLayout VerticalOptions="CenterAndExpand">
11
                <Frame
12
                    Padding="0"
13
                    BackgroundColor="Transparent"
14
                    BorderColor="#4f5a64"
15
                    CornerRadius="5"
16
                    HasShadow="False"
17
                    HorizontalOptions="Center"
18
                    VerticalOptions="CenterAndExpand"
19
                    WidthRequest="200">
20
                    <StackLayout Spacing="0">
21
                        <Label
22
                            Margin="15"
23
                            FontAttributes="Bold"
24
                            FontSize="18"
25
                            HorizontalOptions="CenterAndExpand"
26
                            HorizontalTextAlignment="Center"
27
                            Text="Teo Test Bluetooth"
28
                            TextColor="White"
29
                            VerticalOptions="CenterAndExpand" />
30
                        <BoxView
31
                            HeightRequest="1"
32
                            HorizontalOptions="FillAndExpand"
33
                            Color="#4f5a64" />
34
                        <StackLayout Margin="20" Spacing="15">
35
                            <!--  Bouton Scan  -->
36
                            <xe:BorderView
37
                                xe:Commands.Tap="{Binding LoadBondedDevicesCommand}"
38
                                xe:TouchEffect.Color="#0060a8"
39
                                BackgroundColor="#003266"
40
                                CornerRadius="65"
41
                                HorizontalOptions="Center">
42
                                <StackLayout Padding="15,10">
43
                                    <Label
44
                                        FontSize="16"
45
                                        HorizontalOptions="Center"
46
                                        HorizontalTextAlignment="Center"
47
                                        Text="Afficher les appareils appairés"
48
                                        TextColor="#34a9ff" />
49
                                </StackLayout>
50
                            </xe:BorderView>
51
                        </StackLayout>
52
                    </StackLayout>
53
                </Frame>
54

    
55
                <Frame
56
                    Padding="0"
57
                    BackgroundColor="Transparent"
58
                    BorderColor="#4f5a64"
59
                    CornerRadius="5"
60
                    HasShadow="False"
61
                    HorizontalOptions="Center"
62
                    IsVisible="{Binding ShowBondedDevices}"
63
                    VerticalOptions="CenterAndExpand"
64
                    WidthRequest="200">
65
                    <StackLayout Spacing="0">
66

    
67
                        <Label
68
                            Margin="15"
69
                            FontSize="Medium"
70
                            HorizontalTextAlignment="Center"
71
                            Text="Bonded Devices"
72
                            TextColor="#34a9ff" />
73

    
74
                        <BoxView
75
                            HeightRequest="1"
76
                            HorizontalOptions="FillAndExpand"
77
                            Color="#4f5a64" />
78

    
79
                        <StackLayout
80
                            x:Name="devicesList"
81
                            Margin="0,5"
82
                            BindableLayout.ItemsSource="{Binding BondedDevicesList}"
83
                            HorizontalOptions="FillAndExpand"
84
                            Orientation="Vertical"
85
                            Spacing="0">
86
                            <BindableLayout.ItemTemplate>
87
                                <DataTemplate>
88
                                    <StackLayout
89
                                        Padding="10"
90
                                        xe:Commands.Tap="{Binding NavigateToDeviceViewCommand}"
91
                                        xe:TouchEffect.Color="#34a9ff"
92
                                        Spacing="0">
93
                                        <Label
94
                                            FontAttributes="Bold"
95
                                            HorizontalTextAlignment="Center"
96
                                            Text="{Binding Device.Name}"
97
                                            TextColor="White" />
98
                                        <Label
99
                                            FontSize="12"
100
                                            HorizontalTextAlignment="Center"
101
                                            Text="{Binding Device.MACAddress}"
102
                                            TextColor="DarkGray" />
103
                                    </StackLayout>
104
                                </DataTemplate>
105
                            </BindableLayout.ItemTemplate>
106
                        </StackLayout>
107

    
108
                    </StackLayout>
109
                </Frame>
110
            </StackLayout>
111
        </StackLayout>
112
    </ContentPage.Content>
113
</ContentPage>