You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "The C# extensibility API allows your custom Studio Pro extensions developed in C# to interact with some internal services of Studio Pro."
6
6
weight: 10
7
-
no_list: false
8
-
description_list: true
9
7
aliases:
10
8
- /apidocs-mxsdk/apidocs/extensibility-api/
11
9
---
@@ -20,46 +18,53 @@ For information on new releases of the Extensibility API, see [Extensibility: C#
20
18
21
19
## Introduction
22
20
23
-
Extensions can be written in C#, described here, or using a web API which is documented separately in [Extensibility API for Web Developers](/apidocs-mxsdk/apidocs/web-extensibility-api-11/).
21
+
Extensions can be written in C#, described here, or using a web API (for more information about the Web API, see [Extensibility API for Web Developers](/apidocs-mxsdk/apidocs/web-extensibility-api-11/)).
24
22
25
-
If you need to add your own custom UI to Studio Pro, you can achieve this using web technology. Your web-based UI will be rendered in Studio Pro using a hosted web view, the API provides communication functionality between your web UI and the C# extension logic.
23
+
To add a custom UI to Studio Pro, you can use web technology. Your web-based UI will be rendered in Studio Pro through a hosted web view, and the API provides communication between your UI and the C# extension logic.
26
24
27
25
## Prerequisites
28
26
29
-
* You need at least a basic understanding of the Mendix platform.
30
-
* You need some understanding of the Mendix Model.
31
-
* You need to have some C# development experience. Extensions are developed using [C#](https://docs.microsoft.com/en-us/dotnet/), and compiled into a `.dll` assembly file.
27
+
To use the C# API, you must have:
28
+
29
+
* A basic understanding of the Mendix platform
30
+
* Some understanding of the Mendix Model
31
+
* Come C# development experience
32
+
33
+
Extensions are developed using [C#](https://docs.microsoft.com/en-us/dotnet/) and compiled into a `.dll` assembly file.
32
34
33
35
## Getting Started
34
36
35
-
For detailed explanation on how to get started with extensions, check out[Get Started with the Extensibility API](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/get-started/).
37
+
For detailed information on how to get started with extensions, see[Get Started with the Extensibility API](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/get-started/).
36
38
37
-
You can also check out our examples and [API reference documentation](https://github.com/mendix/ExtensionAPI-Samples).
39
+
You can also review some examples and [API reference documentation](https://github.com/mendix/ExtensionAPI-Samples).
38
40
39
41
## How-tos
40
42
41
43
Here is a list of how-tos for you to begin with:
42
44
43
-
*[How to Create a Menu Extension Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/create-menu-extension/)
44
-
*[How to Create a Dockable Pane Extension Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/create-dockable-pane-extension/)
45
-
*[How to Create a Context Menu Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/create-context-menu/)
46
-
*[How to Create a Web View Hosted Inside a Modal Dialog Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/create-modal-web-view/)
47
-
*[How to Create Microflows for Calculations Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/create-microflows-for-calculations/)
45
+
*[How to Create a Menu Extension](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/create-menu-extension/)
46
+
*[How to Create a Dockable Pane Extension](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/create-dockable-pane-extension/)
47
+
*[How to Create a Context Menu](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/create-context-menu/)
48
+
*[How to Create a Web View Hosted Inside a Modal Dialog](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/create-modal-web-view/)
49
+
*[How to Create Microflows for Calculations](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/create-microflows-for-calculations/)
50
+
*[How to Interact with the Model API](/apidocs-mxsdk/apidocs/interact-with-model-api-11/)
51
+
*[How to Create a Microflow and Add Activities](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/create-microflow-add-activities/)
52
+
*[How to Add Menus and Sub-menus](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/add-menu/)
53
+
*[How to Build a To-do Example Extension](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/build-todo-example-extension/)
54
+
*[How to Export a C# Extension](/apidocs-mxsdk/apidocs/csharp-extensibility-api-11/export-an-extension/)
48
55
49
56
## Advanced APIs
50
57
51
-
APIs for the Mendix platform's advanced users:
58
+
Below are APIs for advanced users:
52
59
53
60
*[Use the Untyped Model Access API Using C#](/apidocs-mxsdk/apidocs/untyped-model-access-api-11/)
54
61
55
-
## Learn More
62
+
## Reference Guide
63
+
64
+
Review the following reference guides to explore additional Extensibility API topics:
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/csharp/extensibility-api-howtos/_index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,4 +9,4 @@ description_list: true
9
9
10
10
## Introduction
11
11
12
-
The following how-tos teach you how to use the Extensibility API for C# Developers in different use cases.
12
+
The following how-tos describe how to use the C# Extensibility API in different use cases.
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/csharp/extensibility-api-howtos/add-menu.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
title: "Add Menus and Submenus to Studio Pro Using C#"
2
+
title: "Add Menus and Sub-menus to Studio Pro Using C#"
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/csharp/extensibility-api-reference-guide/_index.md
+1-5Lines changed: 1 addition & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,8 +9,4 @@ description_list: true
9
9
10
10
## Introduction
11
11
12
-
In the **Reference Guide**, you can explore a variety of topics related to the Extensibility API in detail.
13
-
14
-
### Documentation in This Category
15
-
16
-
The **Reference Guide** category contains the following documents:
12
+
In the following Reference Guide documents, you can explore a variety of topics related to the C# Extensibility API:
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/csharp/extensibility-api-reference-guide/extension-points.md
+11-14Lines changed: 11 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,34 +7,31 @@ weight: 9
7
7
8
8
## Introduction
9
9
10
-
Extension points allow you to hook functionality into various areas of the Studio Pro IDE. Extension point is a base class that you as an extension developer can inherit from. Your functionality will then be loaded by Studio Pro. These classes all have the `*Extension` suffix, inherit from [`ExtensionBase`](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI/ExtensionBase.md) base class, and contain a few virtual or abstract members.
10
+
Extension points allow you to hook functionality into various areas of the Studio Pro IDE. `ExtensionPoint`is a base class that extension developers can inherit from. Once inherited, your functionality will be loaded by Studio Pro. These classes all have the `*Extension` suffix, inherit from the [`ExtensionBase`](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI/ExtensionBase.md) base class, and include a few virtual or abstract members.
11
11
12
-
Extension point is the only way you can add a custom behavior to Studio Pro. The rest of the APIs are there only to aid with implementing or expressing these behaviors.
12
+
`ExtensionPoint`is the only way to add custom behavior to Studio Pro. All other APIs provided solely to support the implementation or expression of these behaviors.
13
13
14
-
To be injected, your class must be decorated with [ExportAttribute](https://docs.microsoft.com/en-us/dotnet/api/system.composition.exportattribute?view=dotnet-plat-ext-6.0)
15
-
like in the example above. This attribute is part of [Managed Extensibility Framework](https://docs.microsoft.com/en-us/dotnet/framework/mef/)
16
-
that is employed by Studio Pro.
14
+
To be injected, your class must be decorated with the [ExportAttribute](https://docs.microsoft.com/en-us/dotnet/api/system.composition.exportattribute?view=dotnet-plat-ext-6.0),
15
+
as shown in the example above. This attribute is part of the [Managed Extensibility Framework](https://docs.microsoft.com/en-us/dotnet/framework/mef/) that is used by Studio Pro.
17
16
18
17
## List of Available Extension Points
19
18
20
19
### Studio Pro UI Extensions
21
20
22
-
*[ContextMenuExtension](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.UI.Menu/ContextMenuExtension-1.md) – This allows injecting new context menu items into model elements.
23
-
24
-
*[MenuExtension](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.UI.Menu/MenuExtension.md) – This allows injecting new menu items into Studio Pro menu bar.
25
-
21
+
*[ContextMenuExtension](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.UI.Menu/ContextMenuExtension-1.md) – allows injecting new context menu items into model elements
22
+
*[MenuExtension](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.UI.Menu/MenuExtension.md) – allows injecting new menu items into the Studio Pro menu bar
26
23
*[DockablePaneExtension](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.UI.DockablePane/DockablePaneExtension.md) – allows introducing new
27
-
[dockable pane](/refguide/studio-pro-overview/#panes) like Connector or Documentation. Panes integrate with Studio Pro
24
+
[dockable pane](/refguide/studio-pro-overview/#panes), like Connector or Documentation; panes integrate with Studio Pro
{{% alert color="info" %}}It is advised to introduce a new **View** menu item for each pane, so that Studio Pro users have a way to open it.{{% /alert %}}
27
+
{{% alert color="info" %}}It is advised to introduce a new **View** menu item for each pane so Studio Pro users have a way to open it.{{% /alert %}}
31
28
32
-
Additionally, there are additional features that provide access to the following:
29
+
There are additional features that provide access to the following:
33
30
34
31
*[Studio Pro configuration](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI/ExtensionBase/Configuration.md)
35
32
*[The currently opened app](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.UI/UIExtensionBase/CurrentApp.md), as well as event subscription mechanism to that app
36
-
* Events can be subscribed to by using the subscribe and unsubscribe methods exposed in [UIExtensionBase](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.UI/UIExtensionBase.md).
33
+
* Events can be subscribed to by using the subscribe and unsubscribe methods exposed in [UIExtensionBase](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.UI/UIExtensionBase.md)
37
34
38
35
### Studio Pro and MxBuild Extensions
39
36
40
-
*[ConsistencyCheckExtension](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.ConsistencyCheck/ConsistencyCheckExtension-1.md) – This allows injecting custom logic into the [Consistency check](/refguide/consistency-errors/) process.
37
+
*[ConsistencyCheckExtension](https://github.com/mendix/ExtensionAPI-Samples/blob/main/API%20Reference/Mendix.StudioPro.ExtensionsAPI.ConsistencyCheck/ConsistencyCheckExtension-1.md) – allows injecting custom logic into the [Consistency check](/refguide/consistency-errors/) process
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/csharp/extensibility-api-reference-guide/services.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ weight: 10
7
7
8
8
## Introduction
9
9
10
-
A Studio Pro service is an interface that exposes some core Studio Pro functionality to extensions. These interfaces are named `I*Service` and can be found in `Mendix.StudioPro.ExtensionsAPI.Services` or `Mendix.StudioPro.ExtensionsAPI.UI.Services` namespaces. It can be injected using the Microsoft Extensions Framework, also referred to as MEF. For more information about MEF and how to use it please refer to the official [Microsoft documentation](https://learn.microsoft.com/en-us/dotnet/framework/mef/)
10
+
A Studio Pro service is an interface that exposes some core Studio Pro functionality to extensions. These interfaces are named `I*Service` and can be found in `Mendix.StudioPro.ExtensionsAPI.Services` or `Mendix.StudioPro.ExtensionsAPI.UI.Services` namespaces. It can be injected using the Microsoft Extensions Framework, also referred to as MEF. For more information about MEF and how to use it, refer to the official [Microsoft documentation](https://learn.microsoft.com/en-us/dotnet/framework/mef/)
11
11
12
12
{{% alert color="info" %}}You should not implement these interfaces in your production code, although it is possible to make sense to do so for unit testing purposes.{{% /alert %}}
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/csharp/extensibility-api-reference-guide/web-view.md
+7-8Lines changed: 7 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,20 +7,19 @@ weight: 12
7
7
8
8
## Introduction
9
9
10
-
In all places where the Studio Pro Extensibility API allows you to add custom UI, you can use web technology to implement the UI.
10
+
Wherever the Studio Pro Extensibility API allows you to add custom UI, you can implement it using web technologies.
11
11
12
-
Studio Pro contains a built-in web view that you can leverage to show your web-based UI.
13
-
Studio Pro also contains a built-in web server that can be used to serve the web UI, as well as to serve data to the web UI.
12
+
Studio Pro includes a built-in web view for displaying your web-based UI. It also provides a built-in web server that can be used to serve both the web UI and the data it requires.
14
13
15
-
In addition, there is a two-way message passing mechanism for direct communication between the web content and the C# part of your extension.
14
+
Additionally, a two-way message passing mechanism enables direct communication between the web content and the C# part of your extension.
16
15
17
16
## Showing a Web View in the UI
18
17
19
-
There are a number of places where the Studio Pro Extensibility API allows you to add custom UI.
18
+
There are a number of places where the Extensibility API allows you to add custom UI.
20
19
21
-
Typically, the Extensibility API requires you to return a view model for your UI, and for every view model type, there is a corresponding base class for showing the UI in a web view.
20
+
Typically, the Extensibility API requires you to return a view model for your UI. Every view model type has a corresponding base class used to display the UI in a web view.
22
21
23
-
The following table shows the APIs that allow you to add custom UI, and the corresponding view model base class:
22
+
The table below lists the APIs that support custom UI and the corresponding view model base class:
24
23
25
24
| UI element | API for adding UI | Base class for view model |
@@ -51,7 +50,7 @@ For serving content to the web view and communicating both ways with it, see [Bu
51
50
52
51
If your pane or tab was open when Studio Pro was closed, your web content might fail to load when you reopen Studio Pro. This is because the `WebServerBaseUrl` property is null due to timing issues in the startup sequence.
53
52
54
-
To resolve this, listen to `OnWebServerBaseUrlChanged` in your `WebServerExtension`. This will get the URL when it gets re-initialized.
53
+
To resolve this, listen to `OnWebServerBaseUrlChanged` in your `WebServerExtension`. This will get the URL when it is reinitialized.
0 commit comments