MindFusion.Wpf Pack Programmer's Guide
ReportQueryStyleEventArgs.Style Property
See Also
 





Gets or sets the style to use for the processed cell or null (Nothing in Visual Basic) to use the default style.

Namespace: MindFusion.Scheduling.Reporting
Assembly: MindFusion.Scheduling.Wpf.Reporting

 Syntax

C#  Copy Code

public ReportStyle Style { get; set; }

Visual Basic  Copy Code

Public Property Style As ReportStyle

 Property Value

An instance of the ReportStyle class.

 Remarks

In order to specify custom visualization settings for the cell, you need to instantiate a ReportStyle object, set only those properties you are interested in changing and assign the object to this property.

 Example

The following example demonstrates how to specify red background for all items which end in the past:

C#  Copy Code
void OnQueryStyle(object sender, ReportQueryStyleEventArgs e)
{
    if (e.Item.EndTime < DateTime.Now)
    {
        ReportStyle customStyle = new ReportStyle();
        customStyle.Background = Brushes.Red;
        e.Style = customStyle;
    }
}
Visual Basic  Copy Code

Sub OnQueryStyle(ByVal sender As Object, ByVal e As ReportQueryStyleEventArgs)

    If e.Item.EndTime < DateTime.Now Then

        Dim customStyle As New ReportStyle()
        customStyle.Background = Brushes.Red
        e.Style = customStyle

    End If

End Sub

 See Also

ReportQueryStyleEventArgs Members
ReportQueryStyleEventArgs Class
MindFusion.Scheduling.Reporting Namespace