-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatView.xaml
More file actions
43 lines (42 loc) · 1.8 KB
/
ChatView.xaml
File metadata and controls
43 lines (42 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="JARVIS.ChatView"
xmlns:maui="clr-namespace:Microsoft.Maui.Controls;assembly=Microsoft.Maui.Controls">
<Grid RowDefinitions="*,Auto">
<ListView x:Name="MessageList"
ItemsSource="{Binding Messages}"
HasUnevenRows="True"
SelectionMode="None"
BackgroundColor="Transparent">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Frame Padding="10"
CornerRadius="15"
BackgroundColor="#40000000"
HorizontalOptions="{Binding IsUser, Converter={StaticResource MessageAlignmentConverter}}">
<Label Text="{Binding Text}"
TextColor="White"
FontSize="14"/>
</Frame>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
<Grid Grid.Row="1"
ColumnDefinitions="*,Auto"
Padding="10">
<Entry x:Name="MessageEntry"
Placeholder="Digite sua mensagem..."
ReturnCommand="{Binding SendCommand}"
BackgroundColor="#20000000"
TextColor="White"/>
<Button Grid.Column="1"
Text="Enviar"
Clicked="OnSendClicked"
CornerRadius="20"
BackgroundColor="DeepSkyBlue"
TextColor="White"/>
</Grid>
</Grid>
</ContentView>