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





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

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

 Syntax

C#  Copy Code

public class FormatForm : Window, INotifyPropertyChanged, IComponentConnector

Visual Basic  Copy Code

Public Class FormatForm
    Inherits Window
    Implements INotifyPropertyChanged, IComponentConnector

 Remarks

This form can be used to apply formatting to a cell or a range of cells. To use the form, create an instance of the FormatForm 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 use the form to format the cells identified by an existing CellRange instance.

C#  Copy Code

var form = new FormatForm(workbook, cellRange.Style, workbook.Locale);
if (form.ShowDialog(this) == true)
{
    using (workbook.StartChangeOperation(worksheet))
        form.Apply(cellRange.Style);
}

Visual Basic  Copy Code

Dim form = New FormatForm(workbook, cellRange.Style, workbook.Locale)
If form.ShowDialog(Me) = True Then

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

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.FormatForm

 See Also

FormatForm Members
MindFusion.Spreadsheet.Wpf.StandardForms Namespace