Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
903
Display ultratimeschedule headers in BOLD
posted

Hi, I'm looking for a way to change the appearance of an UIelement.

I succesfully changed the TEXT with UICreationFilter AfterCreateChildElements but how to change the appearance to make it bold ?

public void AfterCreateChildElements(Infragistics.Win.UIElement parent)
{

(...)

if (parent is ColumnHeaderUIElement)
{
var child = parent.GetDescendant(typeof(TextUIElement)) as TextUIElement;
if (child != null)
{
if (child.Text.Contains(" - "))
{

DateTime date = DateTime.Parse(child.Text.Substring(0, child.Text.IndexOf('-')));
int weekNum = UtilsMain.getWeekNum(date.AddDays(3));
child.Text = weekNum.ToString() + " / " + date.Year;  // text changed to meet my requirements

// NEED TO CHANGE THE FONT TO MAKE IT APPEARS IN BOLD bug no child.Appearance here
}

}

  • 903
    Verified Answer
    posted

    Found the solution : Had to use DrawFilter (and not creation filter)

    Then I filter on the right UI Element and make the appropriate modifications