MindFusion.Wpf Pack Programmer's Guide
ConditionalFormatForm Class
Remarks See Also
 





A form which can be used to define conditional formats for cells within a worksheet.

Namespace: MindFusion.Spreadsheet.Wpf.StandardForms
Assembly: MindFusion.Spreadsheet.Wpf.StandardForms

 Syntax

C#  Copy Code

public class ConditionalFormatForm : Window, IComponentConnector

Visual Basic  Copy Code

Public Class ConditionalFormatForm
    Inherits Window
    Implements IComponentConnector

 Remarks

This form can be used to add, edit, and remove conditional formats for a cell or a range of cells. To use the form, create an instance of the ConditionalFormatForm class, by providing the related workbook and the IStyle object of the target cell or range of cells, and call the ShowDialog method. To apply the changes made through the form, call the Apply method. The following image shows the form:

 Example

The code below demonstrates how to display the conditional format form for an existing CellRange instance.

C#  Copy Code

var form = new ConditionalFormatForm(workbook, cellRange.Style);
if (form.ShowDialog() == true)
{
    worksheet.BeginInit();
    using (workbook.StartChangeOperation(worksheet))
        form.Apply(cellRange.Style);
    worksheet.EndInit();
}

Visual Basic  Copy Code

Dim form = New ConditionalFormatForm(workbook, cellRange.Style)
If form.ShowDialog() = True Then

    worksheet.BeginInit()
    Using workbook.StartChangeOperation(worksheet)
        form.Apply(cellRange.Style)
    End Using
    worksheet.EndInit()

End If

 Inheritance Hierarchy

System.Object
    System.Windows.Threading.DispatcherObject
        System.Windows.DependencyObject
            System.Windows.Media.Visual
                System.Windows.UIElement
                    System.Windows.FrameworkElement
                        System.Windows.Controls.Control
                            System.Windows.Controls.ContentControl
                                System.Windows.Window
                                    MindFusion.Spreadsheet.Wpf.StandardForms.ConditionalFormatForm

 See Also

ConditionalFormatForm Members
MindFusion.Spreadsheet.Wpf.StandardForms Namespace