|
@@ -1,5 +1,6 @@
|
|
<UserControl x:Class="PDF_Master.Views.Dialog.ChatGPTAIDialogs.SelectedTranslationDialog"
|
|
<UserControl x:Class="PDF_Master.Views.Dialog.ChatGPTAIDialogs.SelectedTranslationDialog"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
|
|
+ xmlns:convert="clr-namespace:PDF_Master.DataConvert"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:cus="clr-namespace:PDF_Master.CustomControl"
|
|
xmlns:cus="clr-namespace:PDF_Master.CustomControl"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
@@ -13,6 +14,12 @@
|
|
prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
|
|
prism:Dialog.WindowStyle="{StaticResource DialogWindowStyle}"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
mc:Ignorable="d">
|
|
mc:Ignorable="d">
|
|
|
|
+ <UserControl.Resources>
|
|
|
|
+ <ResourceDictionary>
|
|
|
|
+ <convert:SizeBrushConvert x:Key="SizeBrushConvert" />
|
|
|
|
+ <convert:SizeToBoolConvert x:Key="SizeToBoolConvert"/>
|
|
|
|
+ </ResourceDictionary>
|
|
|
|
+ </UserControl.Resources>
|
|
<Grid>
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="50"></RowDefinition>
|
|
<RowDefinition Height="50"></RowDefinition>
|
|
@@ -63,11 +70,11 @@
|
|
<StackPanel Orientation="Horizontal" Margin="0,16,0,0">
|
|
<StackPanel Orientation="Horizontal" Margin="0,16,0,0">
|
|
<StackPanel>
|
|
<StackPanel>
|
|
<Grid Width="250" Height="180" Margin="16,0,0,0">
|
|
<Grid Width="250" Height="180" Margin="16,0,0,0">
|
|
- <TextBox Name="textBoxEnterCharacters" Width="250" Height="180" Text="{Binding SelectedText}">
|
|
|
|
|
|
+ <TextBox Name="textBoxEnterCharacters" Width="250" Height="180" Text="{Binding SelectedText}" >
|
|
</TextBox>
|
|
</TextBox>
|
|
- <TextBlock Text="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length,StringFormat={}{0}/150}" Panel.ZIndex="1" Height="22" FontSize="14" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,12,8"/>
|
|
|
|
|
|
+ <TextBlock x:Name="SizeTextBlock" Text="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length,StringFormat={}{0}/150}" Panel.ZIndex="1" Height="22" FontSize="14" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,12,8" Foreground="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length, Converter={StaticResource SizeBrushConvert}}"/>
|
|
</Grid>
|
|
</Grid>
|
|
- <Button HorizontalAlignment="Right" Width="97" Height="24" Content="Translate" VerticalAlignment="Bottom" Style="{StaticResource Btn.cta}" Margin="0,8,0,0" Command="{Binding TranslateCommand}"></Button>
|
|
|
|
|
|
+ <Button HorizontalAlignment="Right" Width="97" Height="24" Content="Translate" VerticalAlignment="Bottom" Style="{StaticResource Btn.cta}" Margin="0,8,0,0" Command="{Binding TranslateCommand}" IsEnabled="{Binding ElementName=textBoxEnterCharacters,Path=Text.Length, Converter={StaticResource SizeToBoolConvert}}"></Button>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
<StackPanel>
|
|
<StackPanel>
|
|
<TextBox Width="250" Height="180" Margin="16,0,0,0" Text="{Binding TranslateText}">
|
|
<TextBox Width="250" Height="180" Margin="16,0,0,0" Text="{Binding TranslateText}">
|