# View Definition Editor

**View Definition Editor** lets you define “screen-level Views” by combining Scenes created in SceneComposer with existing [**<span style="color: rgb(230, 126, 35);">Views</span>**](https://doc316en.candera.eu/books/view-editor/page/view), and make those definitions available to the **<span style="color: rgb(230, 126, 35);">[View Tree](https://doc316en.candera.eu/books/view-editor/page/view-tree)</span>**, the **State Machine**, and the <span style="color: rgb(230, 126, 35);">[**Action Chain Editor**](https://doc316en.candera.eu/books/view-editor/page/action-chain-editor)</span>.

Only **Views** are displayed as nodes in the tree of the **View Definition Editor** panel. Therefore, if you want to use a **Scene**, you must always include it as a component of one of the **Views**. For details, see <span style="color: rgb(230, 126, 35);">[**View composition**](#bkmrk-view-composition)</span> later in this document. With this structure, the state machine can consistently treat “which screen (View) to activate” at the View level, while still incorporating Scene-based content into the screen composition.

### View Definition Editor UI 

#### Panel layout

Double-click any **View** in **Solution Explorer** to open the **View Definition Editor** panel.

<div drawio-diagram="8825"><img src="https://doc316en.candera.eu/uploads/images/drawio/2025-12/drawing-4-1764895545.png" alt=""/></div>

<table border="1" id="bkmrk-ui-item-description-" style="width: 800px; height: 198.92px; border-collapse: collapse;"><thead><tr style="height: 29.7017px;"><th style="width: 276.009px; background-color: rgb(35, 111, 161);">**<span style="color: rgb(255, 255, 255);">UI item</span>**</th><th style="width: 523.082px; background-color: rgb(35, 111, 161);">**<span style="color: rgb(255, 255, 255);">Description</span>**</th></tr></thead><tbody><tr style="height: 46.5057px;"><td style="width: 276.009px; height: 46.5057px;">**View Composition pane** (orange frame in the figure above)

</td><td style="width: 523.082px; height: 46.5057px;">Lists which **Scenes/Views** the selected **View** is composed of. Add or remove Scenes and existing Views by **drag and drop**.

</td></tr><tr style="height: 46.5057px;"><td style="width: 276.009px; height: 46.5057px;">**Preview area** (red frame in the figure above)

</td><td style="width: 523.082px; height: 46.5057px;">Displays preview images of the **Scenes/Views** associated with the View in the right pane, where you can also adjust their layout positions. Useful for improving visual identification when referencing this View from the **State Machine** or **View Tree**.

</td></tr></tbody></table>

<article class="text-token-text-primary w-full focus:outline-none [--shadow-height:45px] has-data-writing-block:pointer-events-none has-data-writing-block:-mt-(--shadow-height) has-data-writing-block:pt-(--shadow-height) [&:has([data-writing-block])>*]:pointer-events-auto scroll-mt-[calc(var(--header-height)+min(200px,max(70px,20svh)))]" data-scroll-anchor="true" data-testid="conversation-turn-260" data-turn="assistant" data-turn-id="ff8c5c17-5101-4c8d-b97a-17a581ab08ff" dir="auto" id="bkmrk-basic-operations-thi" tabindex="-1">### Basic operations

This section outlines common procedures for defining and editing Views with the **View Definition Editor**.

<p class="callout info">For instructions on creating a **View**, see the <span style="color: rgb(230, 126, 35);">[View feature overview page](https://doc316en.candera.eu/books/view-editor/page/view)</span>.</p>

#### View composition

</article>In the **View Definition Editor** panel, you can use the tree structure to edit or delete child Views under the currently opened View. You can also review the entire tree rooted at that View on the tree, including the hierarchical relationships of its child Views and their descendant Views.

<p class="callout info">The composition editing described here applies to <span style="color: rgb(230, 126, 35);">[Views that were created as **new Views**](https://doc316en.candera.eu/link/1318#bkmrk-create-a-view-%28new-i)</span>. <span style="color: rgb(230, 126, 35);">[Views that were automatically generated from a Scene](https://doc316en.candera.eu/link/1318#bkmrk-create-a-view-%28from-)</span> are treated as simple Views that display the corresponding Scene, and you cannot edit the tree structure in the View Definition Editor or attach child Views or additional Scenes under them.</p>

1. Double-click the View in Solution Explorer whose composition you want to edit.  
    
    - The View Definition Editor panel opens and displays the composition of the selected View.
2. In the View Composition pane, edit the elements included in the View. 
    - If the target View does not yet have a Scene as a child element, you can add a Scene or an existing View by dragging and dropping it from Solution Explorer.
    - If the target View already has a *Scene* as a child element, you cannot add any additional Scenes or Views (a View that contains a Scene as a child is always treated as a leaf node).
    - To remove unnecessary elements (Scenes/Views), select them and choose **Delete** from the context menu.

##### Behavior when dragging and dropping a Scene

Only **Views** are shown as nodes in the tree of the View Definition Editor panel. If you want to work with a **Scene**, you add it as internal content of an existing View.

- When you drag and drop a Scene from Solution Explorer into the **Composition** pane of the View currently open in the View Definition Editor, the **Create View** dialog appears if there is no existing View that already has that Scene as its child.
- If you accept the creation in the dialog, a new View that contains the Scene as its child is automatically generated and added to the tree as a child View of the drop target View.

With this mechanism, the View Definition Editor tree can consistently treat the unit of screen transitions and visibility control as **Views**, while still allowing you to build Scene-based content within those Views.

##### Grandchild View

In the View Definition Editor panel, a single operation can add Views only up to **the child View directly under the currently open View** (one hierarchy level down). To create a structure with three or more hierarchy levels, such as **Parent View &gt; Child View &gt; Grandchild View**, you must use only Views that meet the following requirements as the starting point:

- The View you want to use as the parent level must be a <span style="color: rgb(230, 126, 35);">[**newly created View**](https://doc316en.candera.eu/link/1318#bkmrk-create-a-view-%28new-i)</span>.
- The View you want to use as the parent level must **not** already have a **Scene** as its child element.
- <span style="color: rgb(230, 126, 35);">[Views that were automatically generated from a](https://doc316en.candera.eu/link/1318#bkmrk-create-a-view-%28from-)</span><span style="color: rgb(230, 126, 35);">[ Scene](https://doc316en.candera.eu/link/1318#bkmrk-create-a-view-%28from-)</span>, or Views that already have a **Scene** as a child, **cannot** be used as the starting point for building a grandchild hierarchy (these Views are always treated as **leaf nodes**).

Using a View that meets these requirements as the starting point, create a three-level structure (**Parent View &gt; Child View &gt; Grandchild View**) as follows:

1. Open the View you want to use as the parent level, and add a child View under it (**Parent View &gt; Child View**).
2. Double-click the View you added as the child View in step 1 to open it, and then add another View under it as its child (**Child View &gt; Grandchild View**).

After performing these steps, reopen the original parent View. You can then confirm in the tree that a three-level hierarchy (**Parent View &gt; Child View &gt; Grandchild View**) is displayed.