Skip to content

Commit a0b3ca8

Browse files
Merge pull request #9272 from mendix/Mendix-11
Mendix 11 Beta 1
2 parents 647b230 + ab3c4f8 commit a0b3ca8

File tree

3,651 files changed

+98933
-5271
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,651 files changed

+98933
-5271
lines changed

content/en/docs/apidocs-mxsdk/apidocs/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ aliases:
99
- /apidocs/
1010
- /apidocs-mxsdk/apidocs/authentication/
1111
- /apidocs/index.html
12+
- /apidocs-mxsdk/apidocs/runtime-api/
1213
#If moving or renaming this doc file, implement a temporary redirect and let the respective team know they should update the URL in the product. See Mapping to Products for more details.
1314
---
1415

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
title: "APIs for Studio Pro 10"
3+
url: /apidocs-mxsdk/apidocs/apis-for-studio-pro-10/
4+
no_list: false
5+
description_list: true
6+
description: "Provides the documentation of APIs for Studio Pro 10, including Extensibility API and Mendix Runtime API."
7+
weight: 5
8+
linktitle: "Studio Pro 10"
9+
---
10+
11+
Mendix offers the following APIs for Studio Pro 10:

content/en/docs/apidocs-mxsdk/apidocs/studio-pro/extensibility-api/_index.md renamed to content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Extensibility API"
3-
url: /apidocs-mxsdk/apidocs/extensibility-api/
3+
url: /apidocs-mxsdk/apidocs/extensibility-api-10/
44
description: "The Extensibility API allows you to extend Studio Pro by adding custom functionality."
55
weight: 57
66
no_list: false
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: "Extensibility API for C# Developers"
3+
linktitle: "C# Extensibility API"
4+
url: /apidocs-mxsdk/apidocs/csharp-extensibility-api-10/
5+
description: "The C# extensibility API allows your custom Studio Pro extensions developed in C# to interact with some internal services of Studio Pro."
6+
weight: 10
7+
no_list: false
8+
description_list: true
9+
aliases:
10+
- /apidocs-mxsdk/apidocs/extensibility-api/
11+
---
12+
13+
{{% alert color="warning" %}}
14+
This feature is in beta. For more information, see [Beta Releases](/releasenotes/beta-features/).
15+
{{% /alert %}}
16+
17+
{{% alert color="info" %}}
18+
For information on new releases of the Extensibility API, see [Extensibility: C# API Release Notes](/releasenotes/studio-pro/csharp-extensibility-api/).
19+
{{% /alert %}}
20+
21+
## Introduction
22+
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-10/).
24+
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.
26+
27+
## Prerequisites
28+
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.
32+
33+
## Getting Started
34+
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-10/get-started/).
36+
37+
You can also check out our examples and [API reference documentation](https://github.com/mendix/ExtensionAPI-Samples).
38+
39+
## How-tos
40+
41+
Here is a list of how-tos for you to begin with:
42+
43+
* [How to Create a Menu Extension Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/create-menu-extension/)
44+
* [How to Create a Dockable Pane Extension Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/create-dockable-pane-extension/)
45+
* [How to Create a Context Menu Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/create-context-menu/)
46+
* [How to Create a Web View Hosted Inside a Modal Dialog Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/create-modal-web-view/)
47+
* [How to Create Microflows for Calculations Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/create-microflows-for-calculations/)
48+
49+
## Advanced APIs
50+
51+
APIs for the Mendix platform's advanced users:
52+
53+
* [Use the Untyped Model Access API Using C#](/apidocs-mxsdk/apidocs/untyped-model-access-api-10/)
54+
55+
## Learn More
56+
57+
You can dive into the following topics in depth:
58+
59+
* [What are extension points](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/extension-points/)
60+
* [What are the Extensibility API services](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/services/)
61+
* [How to Interact with the Model API Using C#](/apidocs-mxsdk/apidocs/interact-with-model-api-10/)
62+
* [How to host web content via a web view wrapper](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/web-views/)
63+
* [How to Build a Todo Example Extension Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/build-todo-example-extension/)
64+
65+
## Documentation in This Category
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: "C# Extensibility API How-tos"
3+
linktitle: "How-tos"
4+
url: /apidocs-mxsdk/apidocs/csharp-extensibility-api-10/how-tos/
5+
weight: 3
6+
no_list: false
7+
description_list: true
8+
---
9+
10+
## Introduction
11+
12+
The following how-tos teach you how to use the Extensibility API for C# Developers in different use cases.
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
---
2+
title: "Add Menus and Submenus to Studio Pro Using C#"
3+
linktitle: "Structured Menus"
4+
url: /apidocs-mxsdk/apidocs/csharp-extensibility-api-10/add-menu/
5+
weight: 15
6+
---
7+
8+
## Introduction
9+
10+
This how-to describes how you can add a menu that contains submenus, some of which also contain submenus of their own. Before you start this how-to, it is recommended to [Create a Menu Extension Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/create-menu-extension/) first.
11+
12+
You can download the example in this how-to in [this GitHub repository](https://github.com/mendix/ExtensionAPI-Samples).
13+
14+
## Creating Menu Extension Class
15+
16+
1. Open the project that you previously created when you followed [Create a Menu Extension Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/create-menu-extension/).
17+
2. Add a new class to the project and name it `MyMenuExtension.cs`.
18+
3. Replace the code in the file with the following code:
19+
20+
```csharp
21+
using Mendix.StudioPro.ExtensionsAPI.UI.Menu;
22+
using Mendix.StudioPro.ExtensionsAPI.UI.Services;
23+
using System.ComponentModel.Composition;
24+
25+
namespace MyCompany.MyProject.MendixExtension;
26+
27+
[Export(typeof(MenuExtension))]
28+
public class MyMenuExtension : MenuExtension
29+
{
30+
readonly IMessageBoxService messageBoxService;
31+
32+
[ImportingConstructor]
33+
public MyMenuExtension(IMessageBoxService messageBoxService)
34+
{
35+
this.messageBoxService = messageBoxService;
36+
}
37+
38+
public override IEnumerable<MenuViewModel> GetMenus()
39+
{
40+
var ristretto = new MenuViewModel("Ristretto", () => messageBoxService.ShowInformation("Ristretto"));
41+
var regularExpresso = new MenuViewModel("Regular Espresso", () => messageBoxService.ShowInformation("Regular Espresso"));
42+
var espresso = new MenuViewModel("Espresso", [regularExpresso, ristretto]);
43+
var blackCoffee = new MenuViewModel("Black Coffee", () => messageBoxService.ShowInformation("Black Coffee"));
44+
var decaf = new MenuViewModel("Decaf", () => messageBoxService.ShowInformation("Decaf")) { Separator = MenuSeparator.After };
45+
var coffee = new MenuViewModel("Coffee", [blackCoffee, decaf, espresso]);
46+
47+
var tea = new MenuViewModel("Tea", () => messageBoxService.ShowInformation("Tea"));
48+
49+
var hot = new MenuViewModel("Hot", [coffee, tea]);
50+
51+
var soda = new MenuViewModel("Soda", () => messageBoxService.ShowInformation("Soda"));
52+
var cold = new MenuViewModel("Cold", [soda]);
53+
54+
var beverages = new MenuViewModel("Beverages", [hot, cold]);
55+
yield return beverages;
56+
}
57+
}
58+
```
59+
60+
The code above creates a single menu, `Beverages`, which contains the submenus `Hot` and `Cold`, both of which contain some submenus. Note that when you are creating this menu structure, you only return the main parent menu (in this example, the `Beverages` menu) from the `GetMenus` method. You should only return the topmost parents in your list, so only the ones that do not have a parent should be returned. In the example above, there is only one.
61+
62+
If an app contains one or more extensions, a top-level menu named `Extensions` will appear in the main menu bar of Studio Pro. Menus that are created from `MenuExtension` implementations will be grouped by their extension entry point name (in this example, `MyCompany`), and then placed under their own dedicated submenu under the main `Extensions` top-level menu. For example, the `MyMenuExtension` above will be placed as follows: **Extensions** > **MyCompany** > **MyMenuExtension**.
63+
64+
A menu can only be a parent (namely, a menu that contains submenus) or have an action. You cannot create a menu with an action which also contains submenus.
65+
66+
You can add a `MenuSeparator` to a menu, via the `Separator` property. Options are `After`, `Before` or `None`. The default value is `None`. You can also disable a menu by setting its `IsEnabled` property to `false`. Menus are enabled by default.

0 commit comments

Comments
 (0)