refactor: cleaup and implemented mvvm

This commit is contained in:
tux
2025-07-05 06:18:00 +05:30
parent 896b2a9f40
commit 7ffdfea18f
13 changed files with 249 additions and 210 deletions

View File

@@ -2,14 +2,16 @@
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="using:highminded.models"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="highminded.ui.controls.ChatUserControl">
x:Class="highminded.ui.controls.ChatUserControl"
x:DataType="vm:ChatViewModel">
<Grid RowDefinitions="*,Auto" Margin="15" RowSpacing="10">
<HtmlPanel Grid.Row="0" Name="ResultBlock" BaseStylesheet="* { font: Inter; color: white; }"
IsContextMenuEnabled="False" IsSelectionEnabled="False" />
<TextBox Grid.Row="1" Name="PromptBox" CornerRadius="5" TextWrapping="Wrap"
KeyDown="PromptBox_OnKeyDown" />
<HtmlPanel Grid.Row="0" BaseStylesheet="* { font: Inter; color: white; }"
IsContextMenuEnabled="False" IsSelectionEnabled="False" Text="{Binding Content}" />
<TextBox Grid.Row="1" CornerRadius="5" TextWrapping="Wrap"
KeyDown="PromptBox_OnKeyDown" Text="{Binding Prompt}" />
</Grid>
</UserControl>