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

  • SEARCH
  • Home
  • 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 8782675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:37:37+00:00 2026-06-13T20:37:37+00:00

<DataGrid x:Name=dgRecords1 CanUserAddRows=False IsReadOnly=True ColumnHeaderStyle={DynamicResource DataGridColumnHeaderStyle1} Style={DynamicResource StyleDatagrid} SelectionChanged=dgRecords1_SelectionChanged Height=251 Width=569 Margin=41,173,168,0> <DataGrid.RowStyle> <Style

  • 0
<DataGrid x:Name="dgRecords1"
          CanUserAddRows="False" IsReadOnly="True"
          ColumnHeaderStyle="{DynamicResource DataGridColumnHeaderStyle1}"
          Style="{DynamicResource StyleDatagrid}"
          SelectionChanged="dgRecords1_SelectionChanged"
          Height="251" Width="569" Margin="41,173,168,0">
  <DataGrid.RowStyle>
    <Style TargetType="DataGridRow">
      <Setter Property="ToolTip">
        <Setter.Value>
          <Border Width="200" Height="80"
                  BorderBrush="Black" BorderThickness="1"
                  Background="AliceBlue">
            <StackPanel Orientation="Vertical">
              <StackPanel Height="30" Background="Black">
                <TextBlock Text="Email Sent To"
                           FontSize="14" FontWeight="Bold" Foreground="White"/>
              </StackPanel>
              <StackPanel>
                <TextBlock Text="{Binding SentToList}"
                           TextWrapping="Wrap" FontWeight="Bold"/>
              </StackPanel>
            </StackPanel>
          </Border>
        </Setter.Value>
      </Setter>
    </Style>
  </DataGrid.RowStyle>

In the code above,

   <TextBlock TextWrapping="Wrap" FontWeight="Bold" Text="{Binding SentToList}" />

I want to check whether there is something in this textblock, and if there is nothing, I need to make the tooltip invisible. Is there some way of doing it using Triggers?

  • 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-13T20:37:39+00:00Added an answer on June 13, 2026 at 8:37 pm

    You could surround your Border by a ToolTip control and bind the Visibility of that control to the same SentToList property by using a binding converter that converts from string to Visibility.

    <Style TargetType="DataGridRow">
        <Style.Resources>
            <local:StringToVisibilityConverter x:Key="StringToVisibilityConverter"/>
        </Style.Resources>
        <Setter Property="ToolTip">
            <Setter.Value>
                <ToolTip Visibility="{Binding SentToList, Converter={StaticResource StringToVisibilityConverter}}">
                    <Border>
                        ...
                    </Border>
                 </ToolTip>
            </Setter.Value>
        </Setter>
    </Style>
    

    The converter might look like this:

    public class StringToVisibilityConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return string.IsNullOrWhiteSpace(value as string) ? Visibility.Collapsed : Visibility.Visible;
        }
    
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datagrid like this: <dg:DataGrid Name=dg AutoGenerateColumns=False CanUserDeleteRows=True> <dg:DataGrid.Columns> <dg:DataGridTextColumn Header=Product Code
<DataGrid AutoGenerateColumns=False Height=200 Margin=0,63,0,0 Name=dataGrid1 MouseDoubleClick=dataGrid1_MouseDoubleClick> <DataGrid.Columns> <DataGridTextColumn Header=Hospital Name Width=100 Binding={Binding hosp_name}/> <DataGridTextColumn
I have a DataGrid , <mx:DataGrid styleName=alternateColor verticalScrollBarStyleName=verticalScrollStyle headerSeparatorSkin=uiExtensions.DataGridHeaderSeparators width=100% height=100% editable=false color=#000000 verticalGridLines=false
<mx:DataGrid visible=false id=dgPosts width=365 click= dataProvider={sendReq.lastResult.loginsuccess.name} x=140.5 y=169> <mx:columns> <mx:DataGridColumn headerText=name dataField=name/> </mx:columns> </mx:DataGrid>
I have the following datagrid in a wpf form: <DataGrid Name=DataGrid AutoGenerateColumns=False VerticalScrollBarVisibility=Auto> <DataGrid.Columns>
I am using a DataGrid: <asp:DataGrid runat=server ID=articleList UseAccessibleHeader=true AutoGenerateColumns=false AlternatingItemStyle-BackColor=#EEEEEE HeaderText=File Name> <Columns>
I am using a WPF DataGrid to display name-value pairs. SelectionUnit is set to
I have a DataGrid table with columns name , phone . In column name
I have a following table ------------ id name ------------ 1 master 2 datagrid 3
I have a datagrid called DataGridView1, column A contains a name, column B contains

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.