C# Class WixSharp.Controls.CustomUI

Defines custom UI (WiX UI element). This class is to be used to define the customization of the standard MSI UI. The usual scenario of the customization is the injection of the custom T:WixSharp.Dialog into the sequence of the standard dialogs. This can be accomplished by defining the custom dialog as T:WixSharp.WixForm. Such a T:WixSharp.WixForm can be edited with the Visual Studio form designer.

When T:WixSharp.WixForm is complete it can be converted into T:WixSharp.Dialog with the T:WixSharp.Dialog.ToWDialog() call. And at compile time Wix# compiler converts T:WixSharp.Dialog into the final WiX UI element XML definition.

While it is possible to construct T:WixSharp.CustomUI instance manually it is preferred to use Factory methods of T:WixSharp.CustomUIBuilder (e.g. BuildPostLicenseDialogUI) for this.

project.UI = WUI.WixUI_Common; project.CustomUI = CustomUIBuilder.BuildPostLicenseDialogUI(productActivationDialog, onNextActions: new DialogAction[]{ new ExecueteCustomAction ("ValidateLicenceKey"), new ShowDialog(Dialogs.InstallDirDlg, "SERIALNUMBER_VALIDATED = \"TRUE\"")});
Inheritance: WixEntity
ファイルを表示 Open project: Eun/WixSharp Class Usage Examples

Public Properties

Property Type Description
CustomDialogs List
DialogRefs List
Properties string>.Dictionary
TextStyles Font>.Dictionary
UISequence List

Public Methods

Method Description
On ( Dialog dialog, string control ) : CustomUI

Defines the T:WixSharp.Dialog UI control Action (event handler). customUI.On(activationDialog, Buttons.Cancel, new CloseDialog("Exit"));

On ( string dialog, string control ) : CustomUI

Defines the WiX Dialog UI control Action (event handler). customUI.On(Dialogs.WelcomeDlg, Buttons.Next, new ShowDialog(Dialogs.LicenseAgreementDlg));

ToXElement ( ) : System.Xml.Linq.XElement

Converts the T:WixSharp.CustomUI instance into WiX T:System.Xml.Linq.XElement.

Method Details

On() public method

Defines the T:WixSharp.Dialog UI control Action (event handler). customUI.On(activationDialog, Buttons.Cancel, new CloseDialog("Exit"));
public On ( Dialog dialog, string control ) : CustomUI
dialog Dialog The dialog.
control string The control.
return CustomUI

On() public method

Defines the WiX Dialog UI control Action (event handler). customUI.On(Dialogs.WelcomeDlg, Buttons.Next, new ShowDialog(Dialogs.LicenseAgreementDlg));
public On ( string dialog, string control ) : CustomUI
dialog string The dialog.
control string The control.
return CustomUI

ToXElement() public method

Converts the T:WixSharp.CustomUI instance into WiX T:System.Xml.Linq.XElement.
public ToXElement ( ) : System.Xml.Linq.XElement
return System.Xml.Linq.XElement

Property Details

CustomDialogs public_oe property

The collection of T:WixSharp.Dialogs to be defined as the custom Dialog WiX elements inside of the UI element.
public List CustomDialogs
return List

DialogRefs public_oe property

The collection of dialog IDs to be defined as the DialogRef WiX elements inside of the UI element. By default it contains references to all MSI predefined dialogs.
public List DialogRefs
return List

Properties public_oe property

The collection of PropertyId vs. PropertyValue pairs to be defined as the Property WiX elements inside of the UI element.
public Dictionary Properties
return string>.Dictionary

TextStyles public_oe property

The collection of StyleId vs. Font pairs to be defined as the TextStyle WiX elements inside of the UI element.
public Dictionary TextStyles
return Font>.Dictionary

UISequence public_oe property

Defines UI sequence via collection of T:WixSharp.PublishingInfo items containing association between Dialog controls and MSI Dialog actions.
public List UISequence
return List