create a Tooltip for the header of a GridViewColumnGroup

1 posts, 0 answers
  1. Daniela
    Daniela avatar
    21 posts
    Member since:
    Jun 2012

    Posted 07 Aug 2012 Link to this post

    Hi!
    I'm looking for a solution to create a Tooltip in the header of a GridViewColumnGroup.

    I tried it that way:
    GridViewColumnGroup columngroup = new GridViewColumnGroup();
                     
                   TextBlock header_block = new TextBlock();
                   header_block.Text = purpose.LevelCode;
                    ToolTipService.SetToolTip(header_block, purpose.DisplayName);
     
                    columngroup.Header = header_block;
                    columngroup.Name = purpose.Id.ToString();
                    _visibilityTable.ColumnGroups.Add(columngroup);


    but it is not possible -> Exception occures

    I tried it another way and set the Tooltip directly to the columngroup but this gave a runtime Exception because the columngroup is not an UI Element.

    Is there another possibility (that works)?
Back to Top