Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4081090
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:00:56+00:00 2026-05-20T18:00:56+00:00

I have following wpf: <Style x:Key=HyperlinkStyle TargetType=Hyperlink> <Setter Property=Foreground Value={StaticResource {x:Static SystemColors.ControlTextBrushKey}}/> <Setter Property=TextDecorations

  • 0

I have following wpf:

<Style x:Key="HyperlinkStyle" TargetType="Hyperlink">
    <Setter Property="Foreground"      
            Value="{StaticResource {x:Static SystemColors.ControlTextBrushKey}}"/>
    <Setter Property="TextDecorations" Value="{x:Null}"/>
</Style>

<TextBlock>                 
    <Hyperlink Command="{Binding ClickCommand, Mode=OneTime}"      
               Style="{StaticResource HyperlinkStyle}">
        <StackPanel Orientation="Horizontal">                       
            <Image Margin="0,2,2,0" Source="{Binding Icon}" />         
            <TextBlock Text="{Binding Text}" />                   
        </StackPanel>                
    </Hyperlink>            
</TextBlock>

The problem is that you can’t see if CanClick on the ClickCommand is false.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:00:57+00:00Added an answer on May 20, 2026 at 6:00 pm

    When the hyperlink’s command is false, it is disabled (IsEnabled should be false). Check that this is the case and that the child items also are disabled. Did you try finding where it fails? For example, remove your custom style or the child elements (replace them with a simple text), so you can see where the problem is.

    Edit:
    So the style is the problem. In that case, try inheriting from the default style:

    <Style
        x:Key="HyperlinkStyle"
        TargetType="{x:Type Hyperlink}"
        BasedOn="{StaticResource {x:Type Hyperlink}}">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following ControlTemplate for a WPF TabItem: <ControlTemplate x:Key=DefaultTabItemTemplate TargetType={x:Type TabItem}> <ControlTemplate.Resources>
I have a WPF project with a border using the following style. The plan
In a WPF app I have a ResourceDictionary with Style defined for the TargetType
I have the following xaml for changing the image for WPF button when mouse
I have recently started programming in WPF and bumped into the following problem. I
Using MEF I want to do the following. I have a WPF Shell. To
I have following table structure: Table: Plant PlantID: Primary Key PlantName: String Table: Party
I have the following XAML, which works fine in WPF, but not in Silverlight
I have the following simpl WPf grid, two columns, a button in each column,
I have the following sample code in WPF. It is working well when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.