ChatGPTAIRewritingContent.xaml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <UserControl x:Class="PDF_Master.Views.HomePanel.ChatGPTAI.ChatGPTAIRewritingContent"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:convert="clr-namespace:PDF_Master.DataConvert"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:local="clr-namespace:PDF_Master.Views.HomePanel.ChatGPTAI"
  8. xmlns:converter="clr-namespace:PDF_Master.DataConvert"
  9. xmlns:prism ="http://prismlibrary.com/"
  10. prism:ViewModelLocator.AutoWireViewModel="True"
  11. Background="White" MinWidth="540" MinHeight="460"
  12. mc:Ignorable="d"
  13. d:DesignHeight="760" d:DesignWidth="1032"
  14. >
  15. <UserControl.Resources>
  16. <ResourceDictionary>
  17. <convert:SizeBrushConvert x:Key="SizeBrushConvert" />
  18. <convert:SizeToBoolConvert x:Key="SizeToBoolConvert"/>
  19. </ResourceDictionary>
  20. </UserControl.Resources>
  21. <Grid Margin="32,0,32,0">
  22. <Grid.RowDefinitions>
  23. <RowDefinition Height="*" />
  24. <RowDefinition Height="*" />
  25. </Grid.RowDefinitions>
  26. <StackPanel Grid.Row="0">
  27. <Grid >
  28. <StackPanel HorizontalAlignment="Left">
  29. <TextBlock Text="AI Rewriting" FontFamily="Segoe UI"
  30. FontSize="20"
  31. FontWeight="Bold"
  32. Foreground="{StaticResource color.sys.text.neutral.lv1}" Height="28" HorizontalAlignment="Left"></TextBlock>
  33. <TextBlock
  34. HorizontalAlignment="Center"
  35. FontFamily="Segoe UI"
  36. FontSize="14"
  37. Foreground="#94989C"
  38. Text="Limited to 150 characters per session, 5 times per month"
  39. TextAlignment="Center"
  40. TextWrapping="Wrap"
  41. />
  42. </StackPanel>
  43. <Button HorizontalAlignment="Right" Width="104" Height="32" Content="Rewrite" VerticalAlignment="Bottom" Style="{StaticResource Btn.cta}" Command="{Binding RewriteCommand}" IsEnabled="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length, Converter={StaticResource SizeToBoolConvert}}"></Button>
  44. </Grid>
  45. <Grid Height="260" Margin="0,12,0,0">
  46. <TextBox Name="textBoxEnterCharacters" Height="260" Text="{Binding InputText}" >
  47. </TextBox>
  48. <TextBlock Text="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length,StringFormat={}{0}/150}" Foreground="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length, Converter={StaticResource SizeBrushConvert}}" Panel.ZIndex="1" Height="22" FontSize="14" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,12,8"/>
  49. </Grid>
  50. </StackPanel>
  51. <StackPanel Grid.Row="1">
  52. <Grid >
  53. <TextBlock Text="Result" FontFamily="Segoe UI"
  54. FontSize="20"
  55. FontWeight="Bold"
  56. Foreground="{StaticResource color.sys.text.neutral.lv1}" Height="28" HorizontalAlignment="Left"></TextBlock>
  57. <Button HorizontalAlignment="Right" Width="104" Height="32" Content="Copy" Background="White" Command="{Binding CopyCommand}" ></Button>
  58. </Grid>
  59. <TextBox Height="260" Margin="0,12,0,0" Text="{Binding RewriteText}">
  60. </TextBox>
  61. </StackPanel>
  62. </Grid>
  63. </UserControl>