mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
95 lines
4.2 KiB
XML
95 lines
4.2 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:vm="clr-namespace:Remotely.Desktop.Linux.ViewModels;assembly=Remotely_Desktop"
|
|
xmlns:Models="clr-namespace:Remotely.Shared.Models;assembly=Remotely_Shared"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="Remotely.Desktop.Linux.Views.ChatWindow"
|
|
Icon="/Assets/favicon.ico"
|
|
HasSystemDecorations="False"
|
|
BorderBrush="DimGray"
|
|
BorderThickness="1"
|
|
MinHeight="250"
|
|
MinWidth="200"
|
|
Topmost="True"
|
|
Title="Remotely Chat" Height="450" Width="350">
|
|
|
|
<Window.DataContext>
|
|
<vm:ChatWindowViewModel />
|
|
</Window.DataContext>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border Name="TitleBanner" Height="50" Background="#FF464646">
|
|
<DockPanel Margin="10,4,0,0">
|
|
|
|
<DockPanel>
|
|
<Image Height="50" Width="50" Source="/Assets/Remotely_Icon.png" Margin="0,0,10,0"></Image>
|
|
<TextBlock Foreground="#FF1D90F1" FontWeight="Bold" FontSize="20" VerticalAlignment="Center">
|
|
Remotely Chat
|
|
</TextBlock>
|
|
</DockPanel>
|
|
|
|
<Button Classes="TitlebarButton" Command="{Binding CloseCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}" Content="X" />
|
|
<Button Classes="TitlebarButton" Command="{Binding MinimizeCommand}" CommandParameter="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}" Content="_"/>
|
|
</DockPanel>
|
|
</Border>
|
|
|
|
<TextBlock Grid.Row="1"
|
|
Text="{Binding ChatSessionHeader}"
|
|
FontWeight="Bold"
|
|
Foreground="DimGray"
|
|
Margin="10,10,10,0"
|
|
TextWrapping="Wrap">
|
|
</TextBlock>
|
|
|
|
<Grid Grid.Row="2">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition />
|
|
<RowDefinition Height="5" />
|
|
<RowDefinition Height="50" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<Border BorderBrush="Gray" BorderThickness="1" Margin="5">
|
|
<ScrollViewer x:Name="MessagesScrollViewer">
|
|
<ItemsControl x:Name="MessagesListBox" Items="{Binding ChatMessages}">
|
|
<ItemsControl.ItemTemplate>
|
|
<DataTemplate DataType="{x:Type Models:ChatMessage}">
|
|
<!-- TODO: Replace with Run when implemented. -->
|
|
<DockPanel Margin="5">
|
|
<TextBlock Text="{Binding SenderName}" FontWeight="Bold" TextWrapping="Wrap" FontSize="14">
|
|
<TextBlock.Styles>
|
|
<Style Selector="TextBlock[Text=You]">
|
|
<Style.Setters>
|
|
<Setter Property="Foreground" Value="SteelBlue"></Setter>
|
|
</Style.Setters>
|
|
</Style>
|
|
</TextBlock.Styles>
|
|
</TextBlock>
|
|
|
|
<TextBlock TextWrapping="Wrap" FontSize="14" Margin="0,0,5,0">: </TextBlock>
|
|
<TextBlock Text="{Binding Message}" TextWrapping="Wrap" FontSize="14"></TextBlock>
|
|
</DockPanel>
|
|
</DataTemplate>
|
|
</ItemsControl.ItemTemplate>
|
|
</ItemsControl>
|
|
</ScrollViewer>
|
|
</Border>
|
|
|
|
<GridSplitter Grid.Row="1" Height="5" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" />
|
|
|
|
<TextBox Grid.Row="2"
|
|
x:Name="InputTextBox"
|
|
FontSize="14"
|
|
Margin="5"
|
|
Text="{Binding InputText, Mode=TwoWay}"
|
|
TextWrapping="Wrap" />
|
|
</Grid>
|
|
</Grid>
|
|
</Window>
|