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 9100797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:57:23+00:00 2026-06-17T00:57:23+00:00

I have a WPF grid bound to the following class: public class Output{ public

  • 0

I have a WPF grid bound to the following class:

public class Output{
    public string TaskName { get; private set; }
    public string Log { get; set; }
}

Grid:

<DataGrid AutoGenerateColumns="False">
    <DataGrid.Resources>
        <sys:String x:Key="viewdetails">view...</sys:String>
    </DataGrid.Resources>
    <DataGrid.Columns>
        <DataGridTextColumn Header="Task" Binding="{Binding TaskName}" />
        <DataGridHyperlinkColumn Header="Log" 
    ContentBinding="{Binding Source={StaticResource viewdetails}}" >
            <DataGridHyperlinkColumn.ElementStyle>
                <Style TargetType="TextBlock">
                    <EventSetter Event="Hyperlink.Click" Handler="ViewLogClick" />
                </Style>
            </DataGridHyperlinkColumn.ElementStyle>
        </DataGridHyperlinkColumn>
    </DataGrid.Columns>
</DataGrid>

Log is a hyperlink column, on click on the link it show the contents of the log file in a new window.

Is it possible to hide the log link if Output.Log is empty?

  • 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-06-17T00:57:25+00:00Added an answer on June 17, 2026 at 12:57 am

    Thanks for the replies.

    I have created a new property and bound the hyperlink column to LogLink as a workaround:

    private string _log;
    public string Log
        {
            get { return _log; }
            set 
            { 
                _log = value;
                if (!String.IsNullOrEmpty(value))
                {
                    LogLink = "view...";
                }
            }
        }
        private string _logLink;
        public string LogLink
        {
            get
            {
                return _logLink;
            }
            set
            {
                _logLink = value;
                FirePropertyChangedEvent("LogLink");
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a grid in WPF bound to a ObservableCollection(MVVM). I have some monthly
I have a wpf datagrid which is bound to an observable collection. Currently I
I have a class with the following properties: Message(string), Added(DateTime) and LogLevel(string) In my
I have a WPF Toolkit DataGrid bound to an ObservableCollection of Car in my
I have a WPF Data Grid bound to an observable collection, which is working
I have WPF combobox bound to a ObservableCollection ItemCategoryList <ComboBox Grid.Column=1 Grid.Row=2 Height=Auto HorizontalAlignment=Stretch
I have successfully set up a WPF Datagrid with the March 2009 WPF Toolkit
I'm experimenting with databinding in WPF I have this datagrid that is bound to
I have a WPF grid bound a some object. I have 2 states for
I have a DataGrid in my WPF window which is bound to a database.

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.