|
|
|
|
@ -5,20 +5,65 @@
|
|
|
|
|
xmlns:views="clr-namespace:BookAStar.Views;assembly=BookAStar"
|
|
|
|
|
xmlns:controls="clr-namespace:XLabs.Forms.Controls;assembly=XLabs.Forms"
|
|
|
|
|
xmlns:toolkit="clr-namespace:XLabs.Forms.Mvvm;assembly=XLabs.Forms"
|
|
|
|
|
xmlns:converters="clr-namespace:BookAStar.Converters;assembly=BookAStar"
|
|
|
|
|
xmlns:local="clr-namespace:BookAStar;Assembly:BookAStar"
|
|
|
|
|
xmlns:extensions="clr-namespace:BookAStar.Extensions;assembly=BookAStar"
|
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<TabbedPage.Resources>
|
|
|
|
|
<ResourceDictionary>
|
|
|
|
|
<converters:SignalRConnectionStateToObject x:Key="cxToStyleImage" x:TypeArguments="Style">
|
|
|
|
|
|
|
|
|
|
<converters:SignalRConnectionStateToObject.DisconnectedObject>
|
|
|
|
|
<Style TargetType="Image">
|
|
|
|
|
<Setter Property="Source"
|
|
|
|
|
Value="{extensions:ImageResource BookAStar.Images.Chat.disconnected.png}" />
|
|
|
|
|
</Style>
|
|
|
|
|
</converters:SignalRConnectionStateToObject.DisconnectedObject>
|
|
|
|
|
|
|
|
|
|
<converters:SignalRConnectionStateToObject.ConnectedObject>
|
|
|
|
|
<Style TargetType="Image">
|
|
|
|
|
<Setter Property="Source"
|
|
|
|
|
Value="{extensions:ImageResource BookAStar.Images.Chat.connected.png}" />
|
|
|
|
|
</Style>
|
|
|
|
|
</converters:SignalRConnectionStateToObject.ConnectedObject>
|
|
|
|
|
|
|
|
|
|
<converters:SignalRConnectionStateToObject.ConnectingObject>
|
|
|
|
|
<Style TargetType="Image">
|
|
|
|
|
<Setter Property="Source"
|
|
|
|
|
Value="{extensions:ImageResource BookAStar.Images.Chat.connecting.png}" />
|
|
|
|
|
</Style>
|
|
|
|
|
</converters:SignalRConnectionStateToObject.ConnectingObject>
|
|
|
|
|
|
|
|
|
|
<converters:SignalRConnectionStateToObject.ReconnectingObject>
|
|
|
|
|
<Style TargetType="Image">
|
|
|
|
|
<Setter Property="Source"
|
|
|
|
|
Value="{extensions:ImageResource BookAStar.Images.Chat.reconnecting.png}" />
|
|
|
|
|
</Style>
|
|
|
|
|
</converters:SignalRConnectionStateToObject.ReconnectingObject>
|
|
|
|
|
</converters:SignalRConnectionStateToObject>
|
|
|
|
|
</ResourceDictionary>
|
|
|
|
|
</TabbedPage.Resources>
|
|
|
|
|
<TabbedPage.Children>
|
|
|
|
|
<ContentPage Title="Public" Icon="chat_icon_s.png" >
|
|
|
|
|
<StackLayout Padding="5, 5, 5, 5">
|
|
|
|
|
<StackLayout Spacing = "12"
|
|
|
|
|
Orientation = "Horizontal"
|
|
|
|
|
Padding="5, 0, 5, 0">
|
|
|
|
|
<Image
|
|
|
|
|
x:Name="reconnectImage"
|
|
|
|
|
Style="{Binding Source={x:Static local:App.ChatHubConnection},
|
|
|
|
|
Path=State,
|
|
|
|
|
Converter={StaticResource cxToStyleImage}}" />
|
|
|
|
|
<Entry x:Name="messageEntry" Placeholder = "enter your Message"
|
|
|
|
|
VerticalOptions = "Center"
|
|
|
|
|
HorizontalOptions = "FillAndExpand"></Entry>
|
|
|
|
|
<Button x:Name="sendButton" Text = "Send" HorizontalOptions = "End"
|
|
|
|
|
VerticalOptions = "Center"></Button>
|
|
|
|
|
</StackLayout>
|
|
|
|
|
<ListView x:Name="messageList" HasUnevenRows="true">
|
|
|
|
|
<ListView x:Name="messageList" HasUnevenRows="true"
|
|
|
|
|
>
|
|
|
|
|
<ListView.ItemTemplate HeightRequest="80" VerticalOptions="StartAndExpand">
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<ViewCell>
|
|
|
|
|
@ -68,12 +113,13 @@
|
|
|
|
|
<!--
|
|
|
|
|
<controls:ExtendedPicker x:Name="contactPicker" Display="{Binding UserName}"></controls:ExtendedPicker>
|
|
|
|
|
-->
|
|
|
|
|
<controls:ExtendedPicker x:Name="contactPicker" />
|
|
|
|
|
<controls:ExtendedPicker x:Name="contactPicker" />
|
|
|
|
|
<Button x:Name="sendPVButton" Text = "Send" HorizontalOptions = "End"
|
|
|
|
|
VerticalOptions = "Center"></Button>
|
|
|
|
|
</StackLayout>
|
|
|
|
|
<ListView x:Name="PVList" HasUnevenRows="true">
|
|
|
|
|
<ListView.ItemTemplate HeightRequest="80" VerticalOptions="StartAndExpand">
|
|
|
|
|
<ListView.ItemTemplate HeightRequest="80"
|
|
|
|
|
VerticalOptions="StartAndExpand">
|
|
|
|
|
<DataTemplate>
|
|
|
|
|
<ViewCell>
|
|
|
|
|
<ViewCell.View>
|
|
|
|
|
|