Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightbulb header accessibility when selected/focused #24552

Merged
merged 5 commits into from
Feb 6, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Convert C# to XAML
This also lets the colors change appropriately when the theme is
changed.
  • Loading branch information
dpoeschl committed Feb 6, 2018
commit c011f0a6916d42823d000423fda22f2902643b68
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@
</DataTrigger>
</Style.Triggers>
</Style>
<Style x:Key="PreviewPaneHyperlinkStyle" TargetType="Hyperlink">
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsui:EnvironmentColors.ControlLinkTextBrushKey}}" />
<Setter Property="TextDecorations" Value="{x:Null}" />
<Style.Triggers>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these may be redundant or useless, but they're a direct port from C# and I didn't want to make even more changes here.

<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsui:EnvironmentColors.ControlLinkTextHoverBrushKey}}" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Foreground" Value="{DynamicResource {x:Static vsui:EnvironmentColors.PanelHyperlinkDisabledBrushKey}}" />
</Trigger>
<Trigger Property="IsEnabled" Value="True">
<Setter Property="Cursor" Value="Hand" />
</Trigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
<DockPanel MinWidth="400">
<StackPanel Name="HeaderStackPanel" DockPanel.Dock="Top" Visibility="Collapsed"
Expand All @@ -86,7 +101,10 @@
Checked="ExpanderToggleButton_CheckedChanged" Unchecked="ExpanderToggleButton_CheckedChanged"/>
<Border Name="SeverityIconBorder" Height="16" Width="16" Margin="-3,0,0,-2"/>
<TextBlock Name="IdTextBlock" Margin="2,0">
<Hyperlink Name="IdHyperlink" IsEnabled="False" RequestNavigate="LearnMoreHyperlink_RequestNavigate"/>
<Hyperlink Name="IdHyperlink"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trailing whitespace.

IsEnabled="False"
RequestNavigate="LearnMoreHyperlink_RequestNavigate"
Style="{StaticResource PreviewPaneHyperlinkStyle}"/>
</TextBlock>
<Run Name="TitleRun" Style="{StaticResource PreviewPaneRunStyle}"/>
</TextBlock>
Expand All @@ -106,7 +124,10 @@
<TextBlock Name="LearnMoreTextBlock" DockPanel.Dock="Bottom" TextAlignment="Right" Margin="3,0,3,3" Visibility="Collapsed"
FontFamily="{DynamicResource {x:Static vs:VsFonts.EnvironmentFontFamilyKey}}"
FontSize="{DynamicResource {x:Static vs:VsFonts.EnvironmentFontSizeKey}}">
<Hyperlink Name="LearnMoreHyperlink" IsEnabled="False" RequestNavigate="LearnMoreHyperlink_RequestNavigate"/>
<Hyperlink Name="LearnMoreHyperlink"
IsEnabled="False"
RequestNavigate="LearnMoreHyperlink_RequestNavigate"
Style="{StaticResource PreviewPaneHyperlinkStyle}"/>
</TextBlock>
</DockPanel>
<Separator Name="HeaderSeparator" Margin="0" Visibility="Collapsed"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,9 +224,6 @@ private FrameworkElement GetPreviewElement(object previewItem)

private void InitializeHyperlinks(Uri helpLink, string helpLinkToolTipText)
{
IdHyperlink.SetVSHyperLinkStyle();
LearnMoreHyperlink.SetVSHyperLinkStyle();

IdHyperlink.Inlines.Add(_id);
IdHyperlink.NavigateUri = helpLink;
IdHyperlink.IsEnabled = true;
Expand Down

This file was deleted.