Skip to content

Infragistics Community Forum / Desktop / Ultimate UI for Windows Forms / Setting FontData.Bold via Appearance object on cell

Setting FontData.Bold via Appearance object on cell

New Discussion
Andy Pandy
Andy Pandy asked on Feb 15, 2017 7:58 PM

Good Morning guys,

I am trying to create an Appearance object with the FontData.Bold property set to true and assign this object to a Cell  using the UltraGrid.

var b new Appearance(“a1”);

b.Data.FontData.Bold = DefaultableBoolean.True;

_grid.DisplayLayout.Appearances.Add(b);

_grid.Rows[0].Cells[2].Appearance = _grid.DisplayLayout.Appearances[“a1”];

This fails to work.

Thanks

Sign In to post a reply

Replies

  • 0
    Andy Pandy
    Andy Pandy answered on Feb 15, 2017 9:24 AM

    Just an update…. This seems to work if I do this..

    b.FontData.Bold = DefaultableBoolean.True;

    Can you explain what the difference between b.FontData b.Data.FontData is.

    Thank you

  • 0
    Mike Saltzman
    Mike Saltzman answered on Feb 15, 2017 7:58 PM

    Hi,

    The Data property returns an AppearanceData which is essentially just a struct that is used for appearance resolution and merging. Frankly, I was surprised to discover that the property was even public, but I guess we use it across a lot of difference assemblies.

    Anyway, as a rule, you should pretty much never have to use the Data property on the Appearance. It's basically for Infragistics internal use.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Andy Pandy
Favorites
0
Replies
2
Created On
Feb 15, 2017
Last Post
9 years ago

Suggested Discussions

Tags

Created by

Created on

Feb 15, 2017 7:58 PM

Last activity on

Feb 19, 2026 12:50 PM