146 lines
5.4 KiB
XML
146 lines
5.4 KiB
XML
<ResourceDictionary
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui"
|
|
xmlns:templateselectors="clr-namespace:BeWo.View.TemplateSelectors"
|
|
xmlns:viewmodel="clr-namespace:BeWo.ViewModel">
|
|
|
|
<DataTemplate x:Key="ConversationHamburgerMenuItemTemplate" DataType="{x:Type viewmodel:AiConversationVM}">
|
|
<dxwui:HamburgerMenuNavigationButton Content="{Binding Displayname}" />
|
|
</DataTemplate>
|
|
|
|
<!-- Conversation Control -->
|
|
<DataTemplate x:Key="ConversationTemplate">
|
|
<Border
|
|
Width="auto"
|
|
Margin="0,0,0,0"
|
|
HorizontalAlignment="Stretch"
|
|
Background="#44000000"
|
|
BorderBrush="Black"
|
|
BorderThickness="1"
|
|
CornerRadius="10, 10, 10, 10">
|
|
<Grid Margin="8">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock
|
|
FontWeight="SemiBold"
|
|
Text="{Binding Displayname}"
|
|
TextTrimming="CharacterEllipsis" />
|
|
<StackPanel Grid.Row="1" Orientation="Horizontal">
|
|
<TextBlock
|
|
FontSize="10"
|
|
FontWeight="Thin"
|
|
Text="Erstellt: " />
|
|
<TextBlock
|
|
FontSize="10"
|
|
FontWeight="Thin"
|
|
Text="{Binding Created, StringFormat={}{0:dd.MM.yyyy HH:mm:ss}}" />
|
|
</StackPanel>
|
|
<StackPanel Grid.Row="2" Orientation="Horizontal">
|
|
<TextBlock
|
|
FontSize="10"
|
|
FontWeight="Thin"
|
|
Text="Modell: " />
|
|
<TextBlock
|
|
FontSize="10"
|
|
FontWeight="Thin"
|
|
Text="{Binding Modell.ModelName}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
|
|
<!-- Assistent Message Control -->
|
|
<DataTemplate x:Key="AssistentMessageTemplate">
|
|
<Grid Margin="0,0,30,0" HorizontalAlignment="Left">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Border
|
|
Width="auto"
|
|
Margin="0,0,4,0"
|
|
Padding="3"
|
|
VerticalAlignment="Top"
|
|
Background="#CCFFFFFF"
|
|
BorderBrush="Black"
|
|
BorderThickness="1"
|
|
CornerRadius="10, 10, 10, 10">
|
|
<Image
|
|
Width="24"
|
|
Height="24"
|
|
Source="..\..\Ressources\Icons\chatbot2.png" />
|
|
</Border>
|
|
<Border
|
|
Grid.Column="1"
|
|
Background="#33000000"
|
|
BorderBrush="Black"
|
|
BorderThickness="1"
|
|
CornerRadius="0, 10, 10, 10">
|
|
<Grid>
|
|
<TextBox
|
|
Height="auto"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
IsReadOnly="True"
|
|
Text="{Binding Message, Converter={StaticResource NewlineConverter}}"
|
|
TextWrapping="Wrap" />
|
|
</Grid>
|
|
</Border>
|
|
</Grid>
|
|
</DataTemplate>
|
|
|
|
<!-- System Message Control -->
|
|
<DataTemplate x:Key="SystemMessageTemplate">
|
|
<Border
|
|
Width="auto"
|
|
Margin="30,0,30,0"
|
|
HorizontalAlignment="Center"
|
|
Background="#33000000"
|
|
BorderBrush="Black"
|
|
BorderThickness="1"
|
|
CornerRadius="0">
|
|
<Grid>
|
|
<TextBox
|
|
Height="auto"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
IsReadOnly="True"
|
|
Text="{Binding Message, Converter={StaticResource NewlineConverter}}"
|
|
TextWrapping="Wrap" />
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
|
|
<!-- User Message Control -->
|
|
<DataTemplate x:Key="UserMessageTemplate">
|
|
<Border
|
|
Width="auto"
|
|
Margin="30,0,0,0"
|
|
HorizontalAlignment="Right"
|
|
Background="#33000000"
|
|
BorderBrush="Black"
|
|
BorderThickness="1"
|
|
CornerRadius="10, 0, 10, 10">
|
|
<Grid>
|
|
<TextBox
|
|
Height="auto"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
IsReadOnly="True"
|
|
Text="{Binding Message, Converter={StaticResource NewlineConverter}}"
|
|
TextWrapping="Wrap" />
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
|
|
|
|
<templateselectors:AiConversationMessageTemplateSelector
|
|
x:Key="AiConversationMessageTemplateSelector"
|
|
AssistentMessageTemplate="{StaticResource AssistentMessageTemplate}"
|
|
SystemMessageTemplate="{StaticResource SystemMessageTemplate}"
|
|
UserMessageTemplate="{StaticResource UserMessageTemplate}" />
|
|
</ResourceDictionary> |