|
6 | 6 | xmlns:local="clr-namespace:Smart_Summarize"
|
7 | 7 | xmlns:PdfViewer="clr-namespace:Syncfusion.Windows.PdfViewer;assembly=Syncfusion.PdfViewer.WPF"
|
8 | 8 | xmlns:Notification="clr-namespace:Syncfusion.Windows.Controls.Notification;assembly=Syncfusion.SfBusyIndicator.WPF"
|
9 |
| - xmlns:syncfusionskin ="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF" |
| 9 | + xmlns:syncfusionskin ="clr-namespace:Syncfusion.SfSkinManager;assembly=Syncfusion.SfSkinManager.WPF" xmlns:syncfusion="clr-namespace:Syncfusion.UI.Xaml.Chat;assembly=Syncfusion.SfChat.Wpf" |
10 | 10 | mc:Ignorable="d"
|
11 | 11 | Title="MainWindow" Height="450" Width="800" WindowState="Maximized"
|
12 | 12 | syncfusionskin:SfSkinManager.Theme="{syncfusionskin:SkinManagerExtension ThemeName=Windows11Light}">
|
|
15 | 15 | <ColumnDefinition Width="7*"/>
|
16 | 16 | <ColumnDefinition Width="auto"/>
|
17 | 17 | </Grid.ColumnDefinitions>
|
18 |
| - <PdfViewer:PdfViewerControl x:Name="pdfViewer" Grid.Column="0" Loaded="pdfViewer_Loaded" DocumentLoaded="pdfViewer_DocumentLoaded"/> |
19 |
| - <Grid x:Name="summarizeGrid" Grid.Column="1" Visibility="Collapsed"> |
20 |
| - <Grid.RowDefinitions> |
21 |
| - <RowDefinition Height="41"/> |
22 |
| - <RowDefinition/> |
23 |
| - </Grid.RowDefinitions> |
24 |
| - <Grid.ColumnDefinitions> |
25 |
| - <ColumnDefinition Width="2"/> |
26 |
| - <ColumnDefinition/> |
27 |
| - </Grid.ColumnDefinitions> |
28 |
| - <Border x:Name="seperator" Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" BorderThickness="1,0,0,0"/> |
29 |
| - <Label x:Name="aI_Title" Grid.Row="0" Grid.Column="1" FontSize="14" Padding="6,12,0,0" Content="AI Assist" Width="350" HorizontalAlignment="Left"/> |
30 |
| - <Grid x:Name="chatGrid" Grid.Row="1" Grid.Column="1"> |
31 |
| - <Grid.RowDefinitions> |
32 |
| - <RowDefinition/> |
33 |
| - <RowDefinition Height="Auto"/> |
34 |
| - </Grid.RowDefinitions> |
35 |
| - <ScrollViewer Grid.Row="0" x:Name="ChatViewer" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" > |
36 |
| - <StackPanel x:Name="chatStack" Orientation="Vertical" > |
| 18 | + |
| 19 | + <PdfViewer:PdfViewerControl x:Name="pdfViewer" Grid.Column="0" |
| 20 | + Loaded="pdfViewer_Loaded" |
| 21 | + DocumentLoaded="pdfViewer_DocumentLoaded"/> |
| 22 | + <syncfusion:SfAIAssistView |
| 23 | + x:Name="aiAssistView" Visibility="Collapsed" |
| 24 | + Grid.Column ="1" Width="350" Height="Auto" CurrentUser="{Binding CurrentUser}" |
| 25 | + Messages="{Binding Chats}" |
| 26 | + SuggestionSelected="chat_SuggestionSelected" |
| 27 | + Suggestions="{Binding Suggestion}"> |
| 28 | + <syncfusion:SfAIAssistView.BannerTemplate> |
| 29 | + <DataTemplate> |
| 30 | + <StackPanel |
| 31 | + Orientation="Vertical" |
| 32 | + VerticalAlignment="Bottom" |
| 33 | + Margin="0,10,0,0"> |
| 34 | + <Viewbox Height="32" Width="32"> |
| 35 | + <Path |
| 36 | + Margin="4" |
| 37 | + Data="M12.7393 0.396994C12.6915 0.170186 12.4942 0.00592917 12.2625 0.000156701C12.0307 -0.00561577 11.8255 0.14861 11.7665 0.372759L11.6317 0.88471C11.4712 1.49477 10.9948 1.97121 10.3847 2.13174L9.87276 2.26646C9.66167 2.32201 9.51101 2.50807 9.50058 2.72609C9.49014 2.94412 9.62234 3.14371 9.82715 3.21917L10.5469 3.48434C11.0663 3.67572 11.4646 4.10158 11.6208 4.63266L11.7703 5.14108C11.8343 5.35877 12.0369 5.50605 12.2637 5.49981C12.4906 5.49358 12.6847 5.3354 12.7367 5.11453L12.8292 4.72158C12.9661 4.1398 13.3904 3.66811 13.9545 3.47067L14.6652 3.22193C14.8737 3.14895 15.0096 2.94777 14.9995 2.72708C14.9894 2.50639 14.8356 2.31851 14.6213 2.26493L14.1122 2.13768C13.4624 1.97521 12.9622 1.45598 12.8242 0.800453L12.7393 0.396994ZM11.3796 2.78214C11.7234 2.57072 12.0165 2.28608 12.2378 1.94927C12.458 2.28452 12.7496 2.56851 13.0919 2.77995C12.7482 2.99134 12.4564 3.27526 12.2359 3.60987C12.015 3.2757 11.7229 2.99268 11.3796 2.78214ZM4.85357 10.4744C4.91635 10.6878 5.11235 10.8336 5.33379 10.8333L5.34711 10.8331C5.57393 10.8269 5.76811 10.6687 5.82009 10.4478L5.98446 9.74927C6.25825 8.5857 7.10693 7.64233 8.23516 7.24744L9.49856 6.80524C9.7035 6.73351 9.83872 6.53772 9.83322 6.32066C9.82772 6.1036 9.68277 5.9149 9.47446 5.85363L8.57059 5.58779C7.50843 5.2754 6.65671 4.47887 6.27396 3.43999L5.80255 2.16046C5.72974 1.96284 5.54135 1.83282 5.33236 1.83331C5.10615 1.83366 4.90757 1.98624 4.84972 2.20607L4.61022 3.11621C4.28914 4.33632 3.33626 5.2892 2.11615 5.61027L1.20601 5.84978C0.994926 5.90532 0.844266 6.09138 0.833828 6.3094C0.82339 6.52743 0.955587 6.72703 1.1604 6.80249L2.43993 7.2739C3.47881 7.65665 4.27534 8.50837 4.58773 9.57053L4.85357 10.4744ZM7.68415 6.38731C6.62743 6.82043 5.78274 7.636 5.309 8.65736C4.83249 7.63465 3.985 6.82144 2.92852 6.39092C3.98451 5.95938 4.83592 5.14232 5.31175 4.11073C5.78498 5.13721 6.63136 5.95377 7.68415 6.38731ZM11.9893 7.39699C11.9415 7.17019 11.7442 7.00593 11.5125 7.00016C11.2807 6.99438 11.0755 7.14861 11.0165 7.37276L10.8368 8.05536C10.6075 8.92687 9.92687 9.6075 9.05536 9.83684L8.37276 10.0165C8.16167 10.072 8.01101 10.2581 8.00058 10.4761C7.99014 10.6941 8.12233 10.8937 8.32715 10.9692L9.2868 11.3227C10.0289 11.5961 10.5978 12.2045 10.8209 12.9632L11.0203 13.6411C11.0843 13.8588 11.2869 14.006 11.5137 13.9998C11.7406 13.9936 11.9347 13.8354 11.9867 13.6145L12.11 13.0906C12.3056 12.2595 12.9118 11.5856 13.7176 11.3036L14.6652 10.9719C14.8737 10.8989 15.0096 10.6978 14.9995 10.4771C14.9894 10.2564 14.8356 10.0685 14.6213 10.0149L13.9426 9.84526C13.0141 9.61316 12.2997 8.87141 12.1025 7.93494L11.9893 7.39699ZM9.99771 10.543C10.6264 10.2254 11.1444 9.72499 11.4838 9.10985C11.8215 9.72215 12.3367 10.2219 12.9632 10.5402C12.3344 10.8584 11.8194 11.3576 11.4815 11.9678C11.1422 11.3576 10.6262 10.8597 9.99771 10.543Z" |
| 38 | + Fill="Black"> |
| 39 | + </Path> |
| 40 | + </Viewbox> |
| 41 | + <TextBlock Text="AI Assist" FontSize="20" HorizontalAlignment="Center" FontWeight="Bold" Foreground="{DynamicResource ContentForeground}"/> |
| 42 | + <TextBlock Text="Your best AI Companion" HorizontalAlignment="Center" FontSize="16" Foreground="{DynamicResource ContentForeground}"/> |
37 | 43 | </StackPanel>
|
38 |
| - </ScrollViewer> |
39 |
| - <StackPanel x:Name="inputStack" Grid.Row="1" Orientation="Horizontal"> |
40 |
| - <Grid> |
41 |
| - <TextBox x:Name="inputText" Width="340" Padding="0,10,35,10" MinHeight="40" VerticalContentAlignment="Top" AcceptsReturn="True" MaxHeight="90" Margin="5,10" TextWrapping="Wrap" GotFocus="inputText_GotFocus" LostFocus="inputText_LostFocus"/> |
42 |
| - <Button x:Name="sendButton" Margin="5,10,6,15" Height="25" Width="25" VerticalAlignment="Bottom" HorizontalAlignment="Right" Click="sendButton_Click"> |
43 |
| - <Button.Content> |
44 |
| - <Path Data="M0.175518 0.119595C0.324511 -0.00749701 0.533985 -0.0359071 0.711447 0.0469087L15.7114 7.04691C15.8875 7.12906 16 7.30574 16 7.5C16 7.69426 15.8875 7.87094 15.7114 7.95309L0.711447 14.9531C0.533985 15.0359 0.324511 15.0075 0.175518 14.8804C0.0265241 14.7533 -0.0345577 14.5509 0.0192423 14.3626L1.98 7.5L0.0192423 0.637361C-0.0345577 0.449061 0.0265241 0.246686 0.175518 0.119595ZM2.87716 8L1.28191 13.5833L14.3177 7.5L1.28191 1.41666L2.87716 7H9.5C9.77615 7 10 7.22386 10 7.5C10 7.77614 9.77615 8 9.5 8H2.87716Z" |
45 |
| - Height="14" Width="16" Fill="{Binding Path=Foreground, RelativeSource={RelativeSource AncestorType={x:Type Button}}}"/> |
46 |
| - </Button.Content> |
47 |
| - </Button> |
48 |
| - </Grid> |
49 |
| - </StackPanel> |
50 |
| - </Grid> |
51 |
| - <Canvas x:Name="loadingCanvas" Grid.Row="1" Grid.Column="1" Background="White" Opacity="0.5" Visibility="Collapsed"/> |
52 |
| - <Notification:SfBusyIndicator x:Name="loadingIndicator" Grid.Row="1" Grid.Column="1" Visibility="Collapsed" IsBusy="True" AnimationType="DotCircle" ViewboxHeight="75" ViewboxWidth="150"/> |
53 |
| - </Grid> |
| 44 | + </DataTemplate> |
| 45 | + </syncfusion:SfAIAssistView.BannerTemplate> |
| 46 | + </syncfusion:SfAIAssistView> |
54 | 47 | </Grid>
|
55 | 48 | </Window>
|
0 commit comments