Skip to content

Commit 239b307

Browse files
authored
Merge pull request #10367 from mendix/qt-csapi
Review Mx10 C# docs
2 parents 80e3b81 + b89eae5 commit 239b307

22 files changed

Lines changed: 504 additions & 371 deletions

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

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ linktitle: "C# Extensibility API"
44
url: /apidocs-mxsdk/apidocs/csharp-extensibility-api-10/
55
description: "The C# extensibility API allows your custom Studio Pro extensions developed in C# to interact with some internal services of Studio Pro."
66
weight: 10
7-
no_list: false
8-
description_list: true
97
aliases:
108
- /apidocs-mxsdk/apidocs/extensibility-api/
119
---
@@ -20,21 +18,25 @@ For information on new releases of the Extensibility API, see [Extensibility: C#
2018

2119
## Introduction
2220

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/).
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-10/)).
2422

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.
2624

2725
## Prerequisites
2826

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+
* Some C# development experience
32+
33+
Extensions are developed using [C#](https://docs.microsoft.com/en-us/dotnet/) and compiled into a `.dll` assembly file.
3234

3335
## Getting Started
3436

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/).
37+
For detailed information on how to get started with extensions, see [Get Started with the Extensibility API](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/get-started/).
3638

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).
3840

3941
## How-tos
4042

@@ -48,18 +50,14 @@ Here is a list of how-tos for you to begin with:
4850

4951
## Advanced APIs
5052

51-
APIs for the Mendix platform's advanced users:
53+
Below are APIs for advanced users:
5254

5355
* [Use the Untyped Model Access API Using C#](/apidocs-mxsdk/apidocs/untyped-model-access-api-10/)
5456

55-
## Learn More
56-
57-
You can dive into the following topics in depth:
57+
## Reference Guides
5858

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/)
59+
Review the following reference guides to explore additional Extensibility API topics:
6460

65-
## Documentation in This Category
61+
* [Extension Points](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/extension-points/)
62+
* [Extensibility Services](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/services/)
63+
* [Extensibility Web Views](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/web-views/)

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/csharp/extensibility-api-howtos/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ description_list: true
99

1010
## Introduction
1111

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.

content/en/docs/apidocs-mxsdk/apidocs/studio-pro-10/extensibility-api/csharp/extensibility-api-howtos/add-menu.md

Lines changed: 43 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@ weight: 15
77

88
## Introduction
99

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.
10+
This how-to describes how to add a menu that contains sub-menus, some of which also contain sub-menus of their own.
1111

1212
You can download the example in this how-to in [this GitHub repository](https://github.com/mendix/ExtensionAPI-Samples).
1313

14+
## Prerequisites
15+
16+
This how-to uses the results of [Create a Menu Extension Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/create-menu-extension/). Complete that how-to before starting this one.
17+
1418
## Creating Menu Extension Class
1519

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:
20+
1. Open the project you created when following [Create a Menu Extension Using C#](/apidocs-mxsdk/apidocs/csharp-extensibility-api-10/create-menu-extension/).
21+
2. Add a new class to the project and name it *MyMenuExtension.cs*.
22+
3. Replace the code in the file with the following:
1923

2024
```csharp
2125
using Mendix.StudioPro.ExtensionsAPI.UI.Menu;
@@ -57,10 +61,41 @@ You can download the example in this how-to in [this GitHub repository](https://
5761
}
5862
```
5963

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.
64+
### Menu Structure Overview
65+
66+
The code above creates a single menu, `Beverages`. This menu contains the following:
67+
68+
* `Beverages` contain two sub-menus: `Hot` and `Cold`
69+
* `Hot` contains `Coffee` and `Tea`
70+
* `Coffee` contains `Black Coffee`, `Decaf`, and `Espresso`
71+
* `Espresso` contains `Regular Espresso` and `Ristretto`
72+
* `Cold` contains `Soda`
73+
74+
Only the top-most parent menu (`Beverages`) is returned from the `GetMenus` method. You should only return menus that do not have a parent.
75+
76+
### Menu Placement
77+
78+
If an app contains one or more extensions, a top-level menu named `Extensions` will appear in the main menu bar of Studio Pro.
79+
80+
Menus that are created from `MenuExtension` implementations are grouped by their extension entry point name (in this example, `MyCompany`), and are placed under a dedicated sub-menu. For example, `MyMenuExtension` will be placed as follows: **Extensions** > **MyCompany** > **MyMenuExtension**.
81+
82+
### Menu Properties
83+
84+
A menu can either:
85+
86+
* Be a parent (a menu that contains sub-menus), or
87+
* Have an action
88+
89+
You cannot create a menu that both contains sub-menus and has an action.
90+
91+
#### Separators
92+
93+
You can add a `MenuSeparator` to a menu using the `Separator` property. The options include:
6194

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**.
95+
* `After`
96+
* `Before`
97+
* `None` (default).
6398

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.
99+
#### Enabling and Disabling Menus
65100

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.
101+
Menus are enabled by default. To disable a menu, set its `IsEnabled` property to `false`.

0 commit comments

Comments
 (0)