# diagram-nodes

> Diagram displays common node shapes and their connections in a sample workflow layout.

**Framework:** maui  **Component:** Diagram  **Variant:** nodes

## Get this item

**If you are an agent, fetch the JSON.** Source is inlined, so one request is enough and no tooling is required:

```
GET https://ai.syncfusion.com/r/maui/diagram-nodes.json
```

**Install Package(s)**

```bash
dotnet add package Syncfusion.Maui.Diagram
```

**Notes**

- Syncfusion release: 2026 Volume 3 (v35.1.37)
- The Syncfusion package is licensed. The composition in this file is source you own and edit. See https://ai.syncfusion.com/licensing.md

## Source files

### src/components/diagram-nodes/Diagram.xaml

```xaml
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:diagram="clr-namespace:Syncfusion.Maui.Diagram;assembly=Syncfusion.Maui.Diagram"
             xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
             x:Class="MAUI.Controls.Diagram.Nodes.NodesView">

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="300"/>
        </Grid.ColumnDefinitions>
        <Grid x:Name="grid" Grid.Column="0">
            <!-- Diagram Control -->
            <diagram:SfDiagram x:Name="Diagram" Nodes="{Binding Nodes}"
                               Grid.Row="0"
                               BackgroundColor="#FAFAFA"
                               HorizontalOptions="Fill"
                               VerticalOptions="Fill"
                               Created="OnCreated">
            </diagram:SfDiagram>
        </Grid>

        <ContentView Grid.Column="1">
            <ScrollView Padding="0, 0, 5, 0">
                <StackLayout Orientation="Vertical">
                    <!-- Basic Shapes Category -->
                    <Label Text="Basic Shapes"
                           Margin="0,15,0,8"
                           FontSize="15"
                           FontAttributes="Bold"/>

                    <Grid x:Name="basicShapeGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.5*"/>
                            <ColumnDefinition Width="0.5*"/>
                        </Grid.ColumnDefinitions>
                        <Label Text="Shape"
                               LineBreakMode="WordWrap"
                               FontSize="14"
                               VerticalOptions="Center"
                               HorizontalOptions="Start"/>
                        <editors:SfComboBox ItemsSource="{Binding BasicShapes}"
                                            SelectedIndex="{Binding SelectedBasicShapeIndex, Mode=TwoWay}"
                                            FontSize="12"
                                            Grid.Column="1"
                                            Margin="5,0,0,0"
                                            VerticalOptions="Center"
                                            HorizontalOptions="End"
                                            IsClearButtonVisible="False" />
                    </Grid>

                    <!-- Flow Shapes Category -->
                    <Label Text="Flow Shapes"
                           Margin="0,20,0,8"
                           FontSize="15"
                           FontAttributes="Bold"/>

                    <Grid x:Name="flowShapeGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.5*"/>
                            <ColumnDefinition Width="0.5*"/>
                        </Grid.ColumnDefinitions>
                        <Label Text="Shape"
                               LineBreakMode="WordWrap"
                               FontSize="14"
                               VerticalOptions="Center"
                               HorizontalOptions="Start"/>
                        <editors:SfComboBox ItemsSource="{Binding FlowShapes}"
                                            SelectedIndex="{Binding SelectedFlowShapeIndex, Mode=TwoWay}"
                                            FontSize="12"
                                            Grid.Column="1"
                                            Margin="5,0,0,0"
                                            VerticalOptions="Center"
                                            HorizontalOptions="End"
                                            IsClearButtonVisible="False" />
                    </Grid>

                    <!-- Styling Options Category -->
                    <Label Text="Styling"
                           Margin="0,20,0,8"
                           FontSize="15"
                           FontAttributes="Bold"/>

                    <!-- Fill Color -->
                    <Grid x:Name="fillColorGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.5*"/>
                            <ColumnDefinition Width="0.5*"/>
                        </Grid.ColumnDefinitions>
                        <Label Text="Fill Color"
                               LineBreakMode="WordWrap"
                               FontSize="14"
                               VerticalOptions="Center"
                               HorizontalOptions="Start"/>
                        <editors:SfComboBox ItemsSource="{Binding FillColors}"
                                            SelectedIndex="{Binding SelectedFillColorIndex, Mode=TwoWay}"
                                            FontSize="12"
                                            Grid.Column="1"
                                            Margin="5,0,0,0"
                                            VerticalOptions="Center"
                                            HorizontalOptions="End"
                                            IsClearButtonVisible="False" />
                    </Grid>

                    <!-- Text Color -->
                    <Grid x:Name="textColorGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.5*"/>
                            <ColumnDefinition Width="0.5*"/>
                        </Grid.ColumnDefinitions>
                        <Label Text="Text Color"
                               Margin="0,15,0,0"
                               LineBreakMode="WordWrap"
                               FontSize="14"
                               VerticalOptions="Center"
                               HorizontalOptions="Start"/>
                        <editors:SfComboBox ItemsSource="{Binding TextColors}"
                                            SelectedIndex="{Binding SelectedTextColorIndex, Mode=TwoWay}"
                                            FontSize="12"
                                            Grid.Column="1"
                                            Margin="5,15,0,0"
                                            VerticalOptions="Center"
                                            HorizontalOptions="End"
                                            IsClearButtonVisible="False" />
                    </Grid>

                    <!-- Stroke Color -->
                    <Grid x:Name="strokeColorGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.5*"/>
                            <ColumnDefinition Width="0.5*"/>
                        </Grid.ColumnDefinitions>
                        <Label Text="Stroke Color"
                               Margin="0,15,0,0"
                               LineBreakMode="WordWrap"
                               FontSize="14"
                               VerticalOptions="Center"
                               HorizontalOptions="Start"/>
                        <editors:SfComboBox ItemsSource="{Binding StrokeColors}"
                                            SelectedIndex="{Binding SelectedStrokeColorIndex, Mode=TwoWay}"
                                            FontSize="12"
                                            Grid.Column="1"
                                            Margin="5,15,0,0"
                                            VerticalOptions="Center"
                                            HorizontalOptions="End"
                                            IsClearButtonVisible="False" />
                    </Grid>

                    <!-- Stroke Dash Style -->
                    <Grid x:Name="strokeDashGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.5*"/>
                            <ColumnDefinition Width="0.5*"/>
                        </Grid.ColumnDefinitions>
                        <Label Text="Dash Style"
                               Margin="0,15,0,0"
                               LineBreakMode="WordWrap"
                               FontSize="14"
                               VerticalOptions="Center"
                               HorizontalOptions="Start"/>
                        <editors:SfComboBox ItemsSource="{Binding DashStyles}"
                                            SelectedIndex="{Binding SelectedDashStyleIndex, Mode=TwoWay}"
                                            FontSize="12"
                                            Grid.Column="1"
                                            Margin="5,15,0,0"
                                            VerticalOptions="Center"
                                            HorizontalOptions="End"
                                            IsClearButtonVisible="False" />
                    </Grid>

                    <!-- Stroke Width -->
                    <Grid x:Name="strokeWidthGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.5*"/>
                            <ColumnDefinition Width="0.5*"/>
                        </Grid.ColumnDefinitions>
                        <Label Text="Stroke Width"
                               Margin="0,15,0,0"
                               LineBreakMode="WordWrap"
                               FontSize="14"
                               VerticalOptions="Center"
                               HorizontalOptions="Start"/>
                        <editors:SfNumericEntry Value="{Binding StrokeWidth}"
                                                FontSize="12"
                                                Grid.Column="1"
                                                Margin="5,15,0,0"
                                                VerticalOptions="Center"
                                                HorizontalOptions="End"
                                                Minimum="1"
                                                Maximum="10" />
                    </Grid>

                    <!-- Size Options Category -->
                    <Label Text="Size"
                           Margin="0,20,0,8"
                           FontSize="15"
                           FontAttributes="Bold"/>

                    <!-- Node Width -->
                    <Grid x:Name="nodeWidthGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.5*"/>
                            <ColumnDefinition Width="0.5*"/>
                        </Grid.ColumnDefinitions>
                        <Label Text="Node Width"
                               LineBreakMode="WordWrap"
                               FontSize="14"
                               VerticalOptions="Center"
                               HorizontalOptions="Start"/>
                        <editors:SfNumericEntry Value="{Binding NodeWidth}"
                                                FontSize="12"
                                                Grid.Column="1"
                                                Margin="5,0,0,0"
                                                VerticalOptions="Center"
                                                HorizontalOptions="End"
                                                Minimum="50"
                                                Maximum="300" />
                    </Grid>

                    <!-- Node Height -->
                    <Grid x:Name="nodeHeightGrid">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.5*"/>
                            <ColumnDefinition Width="0.5*"/>
                        </Grid.ColumnDefinitions>
                        <Label Text="Node Height"
                               Margin="0,15,0,0"
                               LineBreakMode="WordWrap"
                               FontSize="14"
                               VerticalOptions="Center"
                               HorizontalOptions="Start"/>
                        <editors:SfNumericEntry Value="{Binding NodeHeight}"
                                                FontSize="12"
                                                Grid.Column="1"
                                                Margin="5,15,0,0"
                                                VerticalOptions="Center"
                                                HorizontalOptions="End"
                                                Minimum="50"
                                                Maximum="300" />
                    </Grid>

                </StackLayout>
            </ScrollView>
        </ContentView>
    </Grid>

</ContentPage>

```

### src/components/diagram-nodes/Diagram.xaml.cs

```cs
using MAUI.Controls.Diagram.NodesViewModel;

namespace MAUI.Controls.Diagram.Nodes;

public partial class NodesView : ContentPage
{
    public NodesView()
	{
        BindingContext = new NodeViewModel();
        InitializeComponent();
    }

    public void OnCreated(object? sender, EventArgs e)
    {
        _ = Diagram.FitToPage();
    }
}

```
