Get notifications about Kanzi Studio events and get access to the core Kanzi Studio operations, such as access to the Kanzi Studio project, get input from the user, and show notifications. More...
Public Member Functions | |
| void | BeginEmphasize (EmphasizeFlag target) |
| Starts emphasizing an ongoing operation. | |
| bool | CanExecutePluginCommand (PluginCommand command, IEnumerable< ProjectItem > items) |
| Checks whether a plugin command can be executed on the specified project items. | |
| bool | CanExecutePluginCommand (string commandName, IEnumerable< ProjectItem > items) |
| Checks whether a plugin command can be executed on the specified project items. | |
| void | ExecutePluginCommand (PluginCommand command, IEnumerable< ProjectItem > items) |
| Executes a plugin command on the specified project items. | |
| void | ExecutePluginCommand (string commandName, IEnumerable< ProjectItem > items) |
| Executes a plugin command on the specified project items. | |
| void | FinishEmphasize (EmphasizeFlag type) |
| Ends emphasizing an ongoing operation and allows Kanzi Studio to return to the normal state. | |
| DateTime? | GetExpirationDateForLicensedFeature (string featureId) |
| Gets the expiration date of the license of an optional feature. | |
| string | GetFolderPathFromUser (string dialogTitle, string initialDirectory, string userPreferencesSetting) |
| Prompts the user to provide a path to a directory. | |
| string | GetFolderPathFromUser (string dialogTitle, string initialPath) |
| Opens a folder browser dialog and returns the selected folder path. | |
| string | GetPathFromUser (string dialogTitle, string initialDirectory, string userPreferencesSetting, string defaultExtension, string filter, PathDialogType pathDialogType, bool multiselect) |
| Opens a Windows dialog that allows the user to browse their computer to select a path. | |
| byte[] | GetPreviewScreenshot (bool useBackground) |
| Captures the current Kanzi Studio Preview frame as a PNG-encoded byte array. | |
| string | GetUserInput (string title, string prompt) |
| Creates a dialog box which prompts the user to provide input. | |
| string | GetUserInput (string title, string prompt, IEnumerable< string > options, string initialValue) |
| Displays a dialog box which prompts the user to select a value from one of the predefined options using a drop-down menu. | |
| MessageBoxResult | GetUserInput (string title, string prompt, MessageBoxButton messageBoxButton) |
| Displays a message box with the specified buttons and returns the user's response. | |
| string | GetUserInput (string title, string prompt, MessageBoxButton messageBoxButton, string extraOptionText) |
| Displays a message box with the specified buttons and an extra option, and returns the user's response. | |
| string | GetUserInput (string title, string prompt, string initialValue) |
| Creates a dialog box which prompts the user to provide input. | |
| void | Log (string message) |
| Writes to the Kanzi Studio Log window. | |
| void | Log (string message, Exception exception) |
| Writes information about an exception to the Kanzi Studio Log window. | |
| void | Log (string message, LogLevel logLevel) |
| Writes to the Kanzi Studio Log window. | |
| void | Redo () |
| Redoes the last undone action in Kanzi Studio. | |
| bool | RegisterPropertyRouter (PropertyRouter router) |
| Registers a property router. | |
| void | SendPreviewCommand (string name, object[] args) |
| Sends commands to the Kanzi Studio Preview. | |
| void | ShowMessageBox (string text, bool isModal) |
| Creates a window with a message. | |
| void | ShowMessageBox (string text, string caption, bool isModal) |
| Displays a window with a title and a message. | |
| void | SubscribeToPropertyValueChanges (string projectItemPath, string propertyName) |
| Tracks property changes in the Kanzi Studio Preview for the project item you set in this function. | |
| void | Undo () |
| Undoes the last action in Kanzi Studio. | |
| bool | UnregisterPropertyRouter (PropertyRouter router) |
| Unregisters a property router. | |
| void | UnsubscribeFromPropertyValueChanges (string projectItemPath, string propertyName) |
| Stops tracking the property changes in the Kanzi Studio Preview for the project item you set in this function. | |
Properties | |
| Project | ActiveProject [get] |
| Gets the currently active project in Kanzi Studio. | |
| string | AssetToolkitPath [get] |
| Provides access to the Asset Toolkit folder. | |
| IEnumerable< ProjectItem > | ClipboardItems [get] |
| Gets the items currently in the clipboard. | |
| Commands | Commands [get] |
| Gets the commands available in Kanzi Studio. | |
| string | FactoryContentPath [get] |
| Provides access to the Factory Content folder. | |
| string | KanziEnvironmentVariablesBatPath [get] |
| Gets the path to the Kanzi environment variables batch file. | |
| DirectoryInfo | KanziExecutableDirectory [get] |
| Gets the path to the directory that contains the Kanzi Studio executable. | |
| string | KanziHome [get] |
| Gets the path to the Kanzi home directory. | |
| DirectoryInfo | KanziWorkspaceDirectory [get] |
| Gets the path to the Kanzi workspace directory. | |
| IPackageUriAccessor | PackageUriAccessor [get] |
| Gets access to the package URI accessor for resolving package URIs. | |
| string | Prefab3DCompositionRootName [get] |
| If the Prefab composition root is a 3D node, Preview patching makes the root node point to "<Isolation Preview Viewport>/<Isolation Preview Scene Placeholder>/<Isolation preview model placeholder>". | |
| Project | PrimaryProject [get] |
| Gets the primary project in the Kanzi solution. | |
| Project | Project [get] |
| Gets the currently active project in Kanzi Studio. | |
| string | ProjectTemplatesPath [get] |
| Gets the path to the project Templates folder. | |
| IEnumerable< ProjectItem > | SelectedItems [get] |
| Gets the currently selected items in Kanzi Studio. | |
| Solution | Solution [get] |
| Gets the Kanzi solution that contains all projects. | |
| string | StatusBarText [get, set] |
| Gets or sets the text shown in the Kanzi Studio status bar. | |
| IUserPreferences | UserPreferences [get] |
| Provides access to Kanzi Studio user preferences. | |
| IGenericUtilities | Utilities [get] |
| Gets access to generic utility functions. | |
| Version | Version [get] |
| Gets the version of Kanzi Studio where you run the plugin. | |
Events | |
| EventHandler< ProjectEventArgs > | BinaryExported |
| Occurs after Kanzi Studio exports the kzb file of the project. | |
| EventHandler | PreviewExited |
| Occurs when the Kanzi Studio Preview closes. | |
| EventHandler< PreviewPropertyChangedEventArgs > | PreviewPropertyChanged |
| Occurs when a property value changes in the Kanzi Studio Preview. | |
| EventHandler | PreviewStarted |
| Occurs when the Kanzi Studio Preview starts. | |
| EventHandler< PreviewStartingEventArgs > | PreviewStarting |
| Occurs when the Kanzi Studio Preview is starting. | |
| EventHandler< ProjectPathEventArgs > | ProjectClosed |
| Occurs when the project is closed. | |
| EventHandler< ProjectEventArgs > | ProjectOpened |
| Occurs when the project is opened. | |
| EventHandler< ProjectSavingEventArgs > | ProjectSaved |
| Occurs when the project is saved. | |
| EventHandler | SelectionChanged |
| Occurs when the selection of a node or a resource in Kanzi Studio changes. | |
| EventHandler< ProjectPathEventArgs > | SolutionClosed |
| Occurs when the primary project is closed. | |
| EventHandler< ProjectEventArgs > | SolutionOpened |
| Occurs when a new primary project is created or loaded. | |
| EventHandler< StatusEventArgs > | StatusChanged |
| Occurs when the Kanzi Studio status changes. | |
Get notifications about Kanzi Studio events and get access to the core Kanzi Studio operations, such as access to the Kanzi Studio project, get input from the user, and show notifications.
| void BeginEmphasize | ( | EmphasizeFlag | target | ) |
Starts emphasizing an ongoing operation.
| target | Target location, for example a preview window. |
| bool CanExecutePluginCommand | ( | PluginCommand | command, |
| IEnumerable< ProjectItem > | items ) |
Checks whether a plugin command can be executed on the specified project items.
| command | The plugin command to check. |
| items | The project items on which to check if the command can be executed. |
| bool CanExecutePluginCommand | ( | string | commandName, |
| IEnumerable< ProjectItem > | items ) |
Checks whether a plugin command can be executed on the specified project items.
| commandName | The name of the plugin command to check. |
| items | The project items on which to check if the command can be executed. |
| void ExecutePluginCommand | ( | PluginCommand | command, |
| IEnumerable< ProjectItem > | items ) |
Executes a plugin command on the specified project items.
| command | The plugin command to execute. |
| items | The project items on which to execute the command. |
| void ExecutePluginCommand | ( | string | commandName, |
| IEnumerable< ProjectItem > | items ) |
Executes a plugin command on the specified project items.
| commandName | The name of the plugin command to execute. |
| items | The project items on which to execute the command. |
| void FinishEmphasize | ( | EmphasizeFlag | type | ) |
Ends emphasizing an ongoing operation and allows Kanzi Studio to return to the normal state.
| type | Target location, for example a preview window. |
Gets the expiration date of the license of an optional feature.
| featureId | The feature ID of the optional feature. |
| string GetFolderPathFromUser | ( | string | dialogTitle, |
| string | initialDirectory, | ||
| string | userPreferencesSetting ) |
Prompts the user to provide a path to a directory.
| dialogTitle | The title of the dialog box. |
| initialDirectory | Initial directory where the folder dialog is opened. |
| userPreferencesSetting | A key to be used for storing the last selected folder in the user preferences. Set as null not to save the path. If an existing value is found from user preferences, that is used over the value supplied in initialDirectory parameter. |
Opens a folder browser dialog and returns the selected folder path.
| dialogTitle | The title of the folder browser dialog. |
| initialPath | The initial path to display in the dialog. |
| string GetPathFromUser | ( | string | dialogTitle, |
| string | initialDirectory, | ||
| string | userPreferencesSetting, | ||
| string | defaultExtension, | ||
| string | filter, | ||
| PathDialogType | pathDialogType, | ||
| bool | multiselect ) |
Opens a Windows dialog that allows the user to browse their computer to select a path.
You can use this function to get a path to either open or save a file.
| dialogTitle | The title of the dialog box. |
| initialDirectory | The initial directory where to open the dialog. |
| userPreferencesSetting | The user preferences key to use to store the last selected directory. Set as null not to save the path. If an existing value is found from user preferences, that is used over the value supplied in initialDirectory parameter. |
| defaultExtension | The default file extension to use to open or save the file. |
| filter | The filter definition that sets which file extensions the dialog allows the user to select. |
| pathDialogType | The type of the dialog. Use PathDialogType.OPEN for the open file dialog and PathDialogType.SAVE for the save file dialog. |
| multiselect | When opening files, sets whether the user is allowed to select multiple files. |
Examples
To open a Windows dialog which allows the user to browse their computer and select a path:
Captures the current Kanzi Studio Preview frame as a PNG-encoded byte array.
| useBackground | If true, the screenshot includes the screen background color; if false, the background is transparent. |
Creates a dialog box which prompts the user to provide input.
For example, you can use this function to get the path of a node where you want your plugin to start executing its commands.
| title | The title of the dialog box. |
| prompt | The message you want to show in the dialog box. |
Examples
To create a dialog box with a title and prompt:
| string GetUserInput | ( | string | title, |
| string | prompt, | ||
| IEnumerable< string > | options, | ||
| string | initialValue ) |
Displays a dialog box which prompts the user to select a value from one of the predefined options using a drop-down menu.
| title | The title of the dialog box. |
| prompt | The message you want to show in the dialog box. |
| options | The options shown in a drop-down box from which the user can select. |
| initialValue | The value preselected in the drop-down menu. |
| MessageBoxResult GetUserInput | ( | string | title, |
| string | prompt, | ||
| MessageBoxButton | messageBoxButton ) |
Displays a message box with the specified buttons and returns the user's response.
| title | The title of the message box. |
| prompt | The message to display in the message box. |
| messageBoxButton | The buttons to display in the message box. |
| string GetUserInput | ( | string | title, |
| string | prompt, | ||
| MessageBoxButton | messageBoxButton, | ||
| string | extraOptionText ) |
Displays a message box with the specified buttons and an extra option, and returns the user's response.
| title | The title of the message box. |
| prompt | The message to display in the message box. |
| messageBoxButton | The buttons to display in the message box. |
| extraOptionText | The text for an additional option button. |
Creates a dialog box which prompts the user to provide input.
For example, you can use this function to get the path of a node where you want your plugin to start executing its commands.
| title | The title of the dialog box. |
| prompt | The message you want to show in the dialog box. |
| initialValue | The predefined value entered in the prompt. |
Examples
To create a dialog box with a title, a prompt, and a text box with a predefined value:
Writes to the Kanzi Studio Log window.
For example, you can use this function to inform the user about the plugin progress in the Log window.
| message | The message you want to print to the Log window. |
Examples
To print a message to the Kanzi Studio Log window:
Writes information about an exception to the Kanzi Studio Log window.
| message | The message you want to print to the Log window before the exception information. |
| exception | The exception to be logged. |
Writes to the Kanzi Studio Log window.
For example, you can use this function to inform the user about the plugin progress in the Log window.
| message | The message you want to print to the Log window. |
| logLevel | The level of the message you want to print to the Log window. |
Examples
To print a message to the Log window as a regular notification:
To print a message to the Log window as a warning:
| void Redo | ( | ) |
Redoes the last undone action in Kanzi Studio.
| bool RegisterPropertyRouter | ( | PropertyRouter | router | ) |
Registers a property router.
A property router can interfere when a user edits properties in Kanzi Studio.
| router | The router to register. |
Sends commands to the Kanzi Studio Preview.
| name | The name of the command you want to send to the Preview. |
| args | The command arguments you want to send (must be serializable.) |
Creates a window with a message.
For example, you can use this function to show a message to the user.
| text | The message you want to show in the window. |
| isModal | Whether the window is modal. When set to true you cannot use the main Kanzi Studio window until you confirm the message in this window. |
Examples
To create a modal window which displays a message:
Displays a window with a title and a message.
For example, you can use this function to show a message to the user.
| text | The message you want to show in the window. |
| caption | The title of the window. |
| isModal | Whether the window is modal. When set to true you cannot use the main Kanzi Studio window until you confirm the message in this window. |
Examples
To create a modal window with a title and which displays a message:
Tracks property changes in the Kanzi Studio Preview for the project item you set in this function.
Triggers change events in project item and in this class.
| projectItemPath | The path to the project item for which you want to track property changes. |
| propertyName | The name of the property the changes of which you want to track. |
| void Undo | ( | ) |
Undoes the last action in Kanzi Studio.
| bool UnregisterPropertyRouter | ( | PropertyRouter | router | ) |
Unregisters a property router.
A property router can interfere when a user edits properties in Kanzi Studio.
| router | The router to unregister. |
Stops tracking the property changes in the Kanzi Studio Preview for the project item you set in this function.
| projectItemPath | The path to the project item for which you want to stop tracking property changes. |
| propertyName | The name of the property the changes of which you want to stop tracking. |
|
get |
Gets the currently active project in Kanzi Studio.
|
get |
Provides access to the Asset Toolkit folder.
|
get |
Gets the items currently in the clipboard.
|
get |
Provides access to the Factory Content folder.
|
get |
Gets the path to the Kanzi environment variables batch file.
|
get |
Gets the path to the directory that contains the Kanzi Studio executable.
|
get |
Gets the path to the Kanzi home directory.
|
get |
Gets the path to the Kanzi workspace directory.
|
get |
Gets access to the package URI accessor for resolving package URIs.
|
get |
If the Prefab composition root is a 3D node, Preview patching makes the root node point to "<Isolation Preview Viewport>/<Isolation Preview Scene Placeholder>/<Isolation preview model placeholder>".
This member returns the new name of the composition root node.
The new name of the composition root node when composing Prefab of a 3D node.
|
get |
Gets the primary project in the Kanzi solution.
The primary project is the project that the user opened in Kanzi Studio.
Gets the currently active project in Kanzi Studio.
This property is obsolete. Use PrimaryProject to get the root of the project hierarchy, or ActiveProject to get the project that is currently active in the UI.
|
get |
Gets the path to the project Templates folder.
Resolved the same way as the New Project dialog — honors source-control mode (uses the repo's Templates) and falls back to the workspace Templates folder otherwise. Use this for any feature that copies template files (e.g. CodeBehind generation) so it tracks the same template root as the application templates.
|
get |
Gets the currently selected items in Kanzi Studio.
|
getset |
Gets or sets the text shown in the Kanzi Studio status bar.
|
get |
Provides access to Kanzi Studio user preferences.
Use this to store settings that are not project dependent.
|
get |
Gets access to generic utility functions.
|
get |
Gets the version of Kanzi Studio where you run the plugin.
The version of Kanzi Studio.
Examples
To get the major, minor, revision, and build numbers of the Kanzi Studio where you run the plugin:
| EventHandler<ProjectEventArgs> BinaryExported |
Occurs after Kanzi Studio exports the kzb file of the project.
Examples
To subscribe to the BinaryExported event:
| EventHandler PreviewExited |
Occurs when the Kanzi Studio Preview closes.
Examples
To subscribe to the PreviewExited event:
| EventHandler<PreviewPropertyChangedEventArgs> PreviewPropertyChanged |
Occurs when a property value changes in the Kanzi Studio Preview.
| EventHandler PreviewStarted |
Occurs when the Kanzi Studio Preview starts.
Examples
To subscribe to the PreviewStarted event:
| EventHandler<PreviewStartingEventArgs> PreviewStarting |
Occurs when the Kanzi Studio Preview is starting.
You can cancel this event.
Examples
To subscribe to the PreviewStarting event:
| EventHandler<ProjectPathEventArgs> ProjectClosed |
Occurs when the project is closed.
Examples
To subscribe to the ProjectClosed event:
| EventHandler<ProjectEventArgs> ProjectOpened |
Occurs when the project is opened.
This can happen when the primary project of a solution is loaded / created or when a subproject is loaded or created.
Examples
To subscribe to the ProjectOpened event:
| EventHandler<ProjectSavingEventArgs> ProjectSaved |
Occurs when the project is saved.
Examples
To subscribe to the ProjectSaved event:
| EventHandler SelectionChanged |
Occurs when the selection of a node or a resource in Kanzi Studio changes.
For example, Kanzi Studio sets off this event when you select a node in a Project or Nodes windows, when you select a library, a directory, or a resource in the Library, or any of the resource windows.
Examples
To subscribe to the SelectionChanged event:
| EventHandler<ProjectPathEventArgs> SolutionClosed |
Occurs when the primary project is closed.
Examples
To subscribe to the SolutionClosed event:
| EventHandler<ProjectEventArgs> SolutionOpened |
Occurs when a new primary project is created or loaded.
| EventHandler<StatusEventArgs> StatusChanged |
Occurs when the Kanzi Studio status changes.