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>
|
</Grid.ColumnDefinitions>
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="ActiveStates">
|
<VisualStateGroup x:Name="ActiveStates">
|
||||||
<VisualState x:Name="Active"/>
|
<VisualState x:Name="Active">
|
||||||
<VisualState x:Name="Normal">
|
|
||||||
<VisualState.Setters>
|
<VisualState.Setters>
|
||||||
<Setter Target="normalOutput.FontWeight" Value="Light"/>
|
<Setter Target="normalOutput.FontWeight" Value="SemiBold"/>
|
||||||
|
<Setter Target="normalOutput.IsTextSelectionEnabled" Value="True"/>
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
<VisualState x:Name="Normal"/>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
</VisualStateManager.VisualStateGroups>
|
</VisualStateManager.VisualStateGroups>
|
||||||
<ScrollViewer x:Name="textContainer"
|
<ScrollViewer x:Name="textContainer"
|
||||||
@ -390,7 +391,7 @@
|
|||||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontWeight="SemiBold"
|
FontWeight="Light"
|
||||||
AutomationProperties.AccessibilityView="Raw"
|
AutomationProperties.AccessibilityView="Raw"
|
||||||
Text="{TemplateBinding DisplayValue}"
|
Text="{TemplateBinding DisplayValue}"
|
||||||
TextAlignment="{TemplateBinding HorizontalContentAlignment}"
|
TextAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
@ -457,12 +458,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="ActiveStates">
|
<VisualStateGroup x:Name="ActiveStates">
|
||||||
<VisualState x:Name="Active"/>
|
<VisualState x:Name="Active">
|
||||||
<VisualState x:Name="Normal">
|
|
||||||
<VisualState.Setters>
|
<VisualState.Setters>
|
||||||
<Setter Target="normalOutput.FontWeight" Value="Light"/>
|
<Setter Target="normalOutput.IsTextSelectionEnabled" Value="True"/>
|
||||||
|
<Setter Target="normalOutput.FontWeight" Value="SemiBold"/>
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
<VisualState x:Name="Normal"/>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
</VisualStateManager.VisualStateGroups>
|
</VisualStateManager.VisualStateGroups>
|
||||||
<ScrollViewer x:Name="textContainer"
|
<ScrollViewer x:Name="textContainer"
|
||||||
@ -476,7 +478,7 @@
|
|||||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontWeight="SemiBold"
|
FontWeight="Light"
|
||||||
AutomationProperties.AccessibilityView="Raw"
|
AutomationProperties.AccessibilityView="Raw"
|
||||||
Text="{TemplateBinding DisplayValue}"
|
Text="{TemplateBinding DisplayValue}"
|
||||||
TextAlignment="{TemplateBinding HorizontalContentAlignment}"
|
TextAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
@ -544,12 +546,13 @@
|
|||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="ActiveStates">
|
<VisualStateGroup x:Name="ActiveStates">
|
||||||
<VisualState x:Name="Active"/>
|
<VisualState x:Name="Active">
|
||||||
<VisualState x:Name="Normal">
|
|
||||||
<VisualState.Setters>
|
<VisualState.Setters>
|
||||||
<Setter Target="normalOutput.FontWeight" Value="Light"/>
|
<Setter Target="normalOutput.FontWeight" Value="SemiBold"/>
|
||||||
|
<Setter Target="normalOutput.IsTextSelectionEnabled" Value="True"/>
|
||||||
</VisualState.Setters>
|
</VisualState.Setters>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
|
<VisualState x:Name="Normal"/>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
</VisualStateManager.VisualStateGroups>
|
</VisualStateManager.VisualStateGroups>
|
||||||
<ScrollViewer x:Name="textContainer"
|
<ScrollViewer x:Name="textContainer"
|
||||||
@ -563,7 +566,7 @@
|
|||||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
Foreground="{TemplateBinding Foreground}"
|
Foreground="{TemplateBinding Foreground}"
|
||||||
FontSize="{TemplateBinding FontSize}"
|
FontSize="{TemplateBinding FontSize}"
|
||||||
FontWeight="SemiBold"
|
FontWeight="Light"
|
||||||
AutomationProperties.AccessibilityView="Raw"
|
AutomationProperties.AccessibilityView="Raw"
|
||||||
Text="{TemplateBinding DisplayValue}"
|
Text="{TemplateBinding DisplayValue}"
|
||||||
TextAlignment="{TemplateBinding HorizontalContentAlignment}"
|
TextAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
@ -459,11 +459,13 @@
|
|||||||
AutomationProperties.LiveSetting="Polite"
|
AutomationProperties.LiveSetting="Polite"
|
||||||
AutomationProperties.Name="{Binding StrDateDiffResultAutomationName}"
|
AutomationProperties.Name="{Binding StrDateDiffResultAutomationName}"
|
||||||
ContextFlyout="{StaticResource ResultsContextMenu}"
|
ContextFlyout="{StaticResource ResultsContextMenu}"
|
||||||
|
IsTextSelectionEnabled="True"
|
||||||
Text="{Binding StrDateDiffResult}"/>
|
Text="{Binding StrDateDiffResult}"/>
|
||||||
<TextBlock Grid.Row="10"
|
<TextBlock Grid.Row="10"
|
||||||
Style="{ThemeResource BaseTextBlockStyle}"
|
Style="{ThemeResource BaseTextBlockStyle}"
|
||||||
Foreground="{ThemeResource SystemControlPageTextBaseMediumBrush}"
|
Foreground="{ThemeResource SystemControlPageTextBaseMediumBrush}"
|
||||||
ContextFlyout="{StaticResource ResultsContextMenu}"
|
ContextFlyout="{StaticResource ResultsContextMenu}"
|
||||||
|
IsTextSelectionEnabled="True"
|
||||||
Text="{Binding StrDateDiffResultInDays, Mode=OneWay}"
|
Text="{Binding StrDateDiffResultInDays, Mode=OneWay}"
|
||||||
Visibility="{Binding IsDiffInDays, Converter={StaticResource BooleanToVisibilityNegationConverter}}"/>
|
Visibility="{Binding IsDiffInDays, Converter={StaticResource BooleanToVisibilityNegationConverter}}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
@ -602,6 +604,7 @@
|
|||||||
AutomationProperties.LiveSetting="Polite"
|
AutomationProperties.LiveSetting="Polite"
|
||||||
AutomationProperties.Name="{Binding StrDateResultAutomationName}"
|
AutomationProperties.Name="{Binding StrDateResultAutomationName}"
|
||||||
ContextFlyout="{StaticResource ResultsContextMenu}"
|
ContextFlyout="{StaticResource ResultsContextMenu}"
|
||||||
|
IsTextSelectionEnabled="True"
|
||||||
Text="{Binding StrDateResult}"/>
|
Text="{Binding StrDateResult}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
@ -64,15 +64,19 @@
|
|||||||
ContextFlyout="{StaticResource HistoryContextMenu}">
|
ContextFlyout="{StaticResource HistoryContextMenu}">
|
||||||
<TextBlock x:Name="exprTextBlock"
|
<TextBlock x:Name="exprTextBlock"
|
||||||
Margin="0,0,0,4"
|
Margin="0,0,0,4"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
Style="{ThemeResource BodyTextBlockMediumStyle}"
|
Style="{ThemeResource BodyTextBlockMediumStyle}"
|
||||||
AutomationProperties.Name="{x:Bind AccExpression}"
|
AutomationProperties.Name="{x:Bind AccExpression}"
|
||||||
|
IsTextSelectionEnabled="True"
|
||||||
Text="{x:Bind Expression}"
|
Text="{x:Bind Expression}"
|
||||||
TextAlignment="Right"
|
TextAlignment="Right"
|
||||||
TextWrapping="Wrap"/>
|
TextWrapping="Wrap"/>
|
||||||
<TextBlock x:Name="resultTextBlock"
|
<TextBlock x:Name="resultTextBlock"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
Style="{ThemeResource TitleTextBlockStyle}"
|
Style="{ThemeResource TitleTextBlockStyle}"
|
||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
AutomationProperties.Name="{x:Bind AccResult}"
|
AutomationProperties.Name="{x:Bind AccResult}"
|
||||||
|
IsTextSelectionEnabled="True"
|
||||||
Text="{x:Bind Result}"
|
Text="{x:Bind Result}"
|
||||||
TextAlignment="Right"
|
TextAlignment="Right"
|
||||||
TextWrapping="Wrap"/>
|
TextWrapping="Wrap"/>
|
||||||
|
@ -56,9 +56,11 @@
|
|||||||
<RowDefinition Height="Auto"/>
|
<RowDefinition Height="Auto"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<TextBlock Margin="0,2,14,0"
|
<TextBlock Margin="0,2,14,0"
|
||||||
|
HorizontalAlignment="Right"
|
||||||
Style="{ThemeResource TitleTextBlockStyle}"
|
Style="{ThemeResource TitleTextBlockStyle}"
|
||||||
FontWeight="SemiBold"
|
FontWeight="SemiBold"
|
||||||
FlowDirection="LeftToRight"
|
FlowDirection="LeftToRight"
|
||||||
|
IsTextSelectionEnabled="True"
|
||||||
Text="{x:Bind Model.Value, Mode=OneWay}"
|
Text="{x:Bind Model.Value, Mode=OneWay}"
|
||||||
TextAlignment="Right"
|
TextAlignment="Right"
|
||||||
TextReadingOrder="DetectFromContent"
|
TextReadingOrder="DetectFromContent"
|
||||||
|
Loading…
Reference in New Issue
Block a user