Activate TextSelection on all interesting values/results (#213)
If we allow users to select texts, the application will feel more like a "Desktop app", will be easier to use on a tablet and users will be more prompt to use Ctrl+C to use the result in another app.
This commit is contained in:
parent
7cad778cc0
commit
62317fd63b
@ -371,12 +371,13 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="ActiveStates">
|
||||
<VisualState x:Name="Active"/>
|
||||
<VisualState x:Name="Normal">
|
||||
<VisualState x:Name="Active">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="normalOutput.FontWeight" Value="Light"/>
|
||||
<Setter Target="normalOutput.FontWeight" Value="SemiBold"/>
|
||||
<Setter Target="normalOutput.IsTextSelectionEnabled" Value="True"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Normal"/>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<ScrollViewer x:Name="textContainer"
|
||||
@ -390,7 +391,7 @@
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="SemiBold"
|
||||
FontWeight="Light"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
Text="{TemplateBinding DisplayValue}"
|
||||
TextAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
@ -457,12 +458,13 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="ActiveStates">
|
||||
<VisualState x:Name="Active"/>
|
||||
<VisualState x:Name="Normal">
|
||||
<VisualState x:Name="Active">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="normalOutput.FontWeight" Value="Light"/>
|
||||
<Setter Target="normalOutput.IsTextSelectionEnabled" Value="True"/>
|
||||
<Setter Target="normalOutput.FontWeight" Value="SemiBold"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Normal"/>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<ScrollViewer x:Name="textContainer"
|
||||
@ -476,7 +478,7 @@
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="SemiBold"
|
||||
FontWeight="Light"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
Text="{TemplateBinding DisplayValue}"
|
||||
TextAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
@ -544,12 +546,13 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="ActiveStates">
|
||||
<VisualState x:Name="Active"/>
|
||||
<VisualState x:Name="Normal">
|
||||
<VisualState x:Name="Active">
|
||||
<VisualState.Setters>
|
||||
<Setter Target="normalOutput.FontWeight" Value="Light"/>
|
||||
<Setter Target="normalOutput.FontWeight" Value="SemiBold"/>
|
||||
<Setter Target="normalOutput.IsTextSelectionEnabled" Value="True"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Normal"/>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<ScrollViewer x:Name="textContainer"
|
||||
@ -563,7 +566,7 @@
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
FontWeight="SemiBold"
|
||||
FontWeight="Light"
|
||||
AutomationProperties.AccessibilityView="Raw"
|
||||
Text="{TemplateBinding DisplayValue}"
|
||||
TextAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
|
@ -459,11 +459,13 @@
|
||||
AutomationProperties.LiveSetting="Polite"
|
||||
AutomationProperties.Name="{Binding StrDateDiffResultAutomationName}"
|
||||
ContextFlyout="{StaticResource ResultsContextMenu}"
|
||||
IsTextSelectionEnabled="True"
|
||||
Text="{Binding StrDateDiffResult}"/>
|
||||
<TextBlock Grid.Row="10"
|
||||
Style="{ThemeResource BaseTextBlockStyle}"
|
||||
Foreground="{ThemeResource SystemControlPageTextBaseMediumBrush}"
|
||||
ContextFlyout="{StaticResource ResultsContextMenu}"
|
||||
IsTextSelectionEnabled="True"
|
||||
Text="{Binding StrDateDiffResultInDays, Mode=OneWay}"
|
||||
Visibility="{Binding IsDiffInDays, Converter={StaticResource BooleanToVisibilityNegationConverter}}"/>
|
||||
</Grid>
|
||||
@ -602,6 +604,7 @@
|
||||
AutomationProperties.LiveSetting="Polite"
|
||||
AutomationProperties.Name="{Binding StrDateResultAutomationName}"
|
||||
ContextFlyout="{StaticResource ResultsContextMenu}"
|
||||
IsTextSelectionEnabled="True"
|
||||
Text="{Binding StrDateResult}"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
@ -64,15 +64,19 @@
|
||||
ContextFlyout="{StaticResource HistoryContextMenu}">
|
||||
<TextBlock x:Name="exprTextBlock"
|
||||
Margin="0,0,0,4"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{ThemeResource BodyTextBlockMediumStyle}"
|
||||
AutomationProperties.Name="{x:Bind AccExpression}"
|
||||
IsTextSelectionEnabled="True"
|
||||
Text="{x:Bind Expression}"
|
||||
TextAlignment="Right"
|
||||
TextWrapping="Wrap"/>
|
||||
<TextBlock x:Name="resultTextBlock"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{ThemeResource TitleTextBlockStyle}"
|
||||
FontWeight="SemiBold"
|
||||
AutomationProperties.Name="{x:Bind AccResult}"
|
||||
IsTextSelectionEnabled="True"
|
||||
Text="{x:Bind Result}"
|
||||
TextAlignment="Right"
|
||||
TextWrapping="Wrap"/>
|
||||
|
@ -56,9 +56,11 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Margin="0,2,14,0"
|
||||
HorizontalAlignment="Right"
|
||||
Style="{ThemeResource TitleTextBlockStyle}"
|
||||
FontWeight="SemiBold"
|
||||
FlowDirection="LeftToRight"
|
||||
IsTextSelectionEnabled="True"
|
||||
Text="{x:Bind Model.Value, Mode=OneWay}"
|
||||
TextAlignment="Right"
|
||||
TextReadingOrder="DetectFromContent"
|
||||
|
Loading…
Reference in New Issue
Block a user