C# Класс 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\"")});
Наследование: WixEntity
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
CustomDialogs List
DialogRefs List
Properties string>.Dictionary
TextStyles Font>.Dictionary
UISequence List

Открытые методы

Метод Описание
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.

Описание методов

On() публичный Метод

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.
Результат CustomUI

On() публичный Метод

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.
Результат CustomUI

ToXElement() публичный Метод

Converts the T:WixSharp.CustomUI instance into WiX T:System.Xml.Linq.XElement.
public ToXElement ( ) : System.Xml.Linq.XElement
Результат System.Xml.Linq.XElement

Описание свойств

CustomDialogs публичное свойство

The collection of T:WixSharp.Dialogs to be defined as the custom Dialog WiX elements inside of the UI element.
public List CustomDialogs
Результат List

DialogRefs публичное свойство

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
Результат List

Properties публичное свойство

The collection of PropertyId vs. PropertyValue pairs to be defined as the Property WiX elements inside of the UI element.
public Dictionary Properties
Результат string>.Dictionary

TextStyles публичное свойство

The collection of StyleId vs. Font pairs to be defined as the TextStyle WiX elements inside of the UI element.
public Dictionary TextStyles
Результат Font>.Dictionary

UISequence публичное свойство

Defines UI sequence via collection of T:WixSharp.PublishingInfo items containing association between Dialog controls and MSI Dialog actions.
public List UISequence
Результат List