Resizing Nodes Issue

I created a NodeTemplate and I would like to know if there is a way to resize my node.

When I try to resize my node, the issu on this picture append… I am wondering if there is a way to resize my node content when I try to resize my node? :$

            <go:NodePanel  Sizing="Auto">
                <Path x:Name="Shape" go:NodePanel.Figure="RoundedRectangle" Fill="WhiteSmoke" Stroke="Black" />
                <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>
                <Grid Grid.Row="0">
                    <TextBlock HorizontalAlignment="Center"
                        Text="{Binding Path=Data.Title}" FontWeight="Bold" TextWrapping="Wrap" go:Part.TextEditable="True"
                        Foreground="{Binding Path=Data.Color, Converter={StaticResource theStringBrushConverter}}"/>
                </Grid>
                <grid:DataGrid Grid.Row="1" AutoGenerateColumns="False" CanUserResizeColumns="False"
                     Background="White" HorizontalAlignment="Stretch"
                     ItemsSource="{Binding Path=Data.Items}" HeadersVisibility="None" BorderBrush="White">

                    <grid:DataGrid.Columns>
                        <grid:DataGridTemplateColumn>
                            <grid:DataGridTemplateColumn.CellTemplate>
                                <DataTemplate>
                                    <go:NodePanel>
                                        <Path go:NodePanel.Figure="{Binding Path=Figure}"
                                            Width="10" Height="10"
                                            Fill="{Binding Path=Color}"
                                            Stroke="Black" StrokeThickness="1"/>
                                    </go:NodePanel>
                                </DataTemplate>
                            </grid:DataGridTemplateColumn.CellTemplate>
                        </grid:DataGridTemplateColumn>
                        <grid:DataGridTextColumn Binding="{Binding Path=Name}"/>
                        <grid:DataGridTextColumn Binding="{Binding Path=Value}"/>
                    </grid:DataGrid.Columns>
                </grid:DataGrid>
                </Grid>

                <ToolTipService.ToolTip>
                    <TextBlock Text="{Binding Path=Data.Key}"
                 Visibility="{Binding Path=Data.Key.Length,
                              Converter={StaticResource theCountVisibilityConverter}}" />
                </ToolTipService.ToolTip>
       </go:NodePanel>
   </go:SpotPanel>

I tried to change go:Part.ResizeElementName=“Shape” using <go:NodePanel x:Name=“Shape” Sizing=“Auto”> or but It doesn’t work…
Is it a way to resize my node and its content? :$

I found your resizingTool but I don’t what I could use to do that…

Thx in advance :)

You’re telling the ResizingTool that it should resize the Shape, but what you really want to resize is a Panel, although I’m not sure which one.

Take a look at the EntityRelationship sample.

Thx, I resized my stackpannel, it works but now the selection to resize is around my content and not around my shape…

            <go:NodePanel  Sizing="Auto">
                <Path go:NodePanel.Figure="RoundedRectangle" Fill="WhiteSmoke" Stroke="Black" />
                <StackPanel x:Name="nodepannel" Orientation="Vertical">
                    <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="0 0 0 10">
                        <Image x:Name ="ImageData" Source="/Images/zoom.bmp" Stretch="Fill" Width="20" Height="20"/>
                        <TextBlock HorizontalAlignment="Center"
                        Text="{Binding Path=Data.Title}" FontWeight="Bold" TextWrapping="Wrap" go:Part.TextEditable="True"
                        Foreground="{Binding Path=Data.Color, Converter={StaticResource theStringBrushConverter}}"/>
                    </StackPanel>

                    <StackPanel Margin="0 0 0 10">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <grid:DataGrid Grid.Row="0" AutoGenerateColumns="False" CanUserResizeColumns="False"
                     Background="White" HorizontalAlignment="Stretch"
                     ItemsSource="{Binding Path=Data.Items}" HeadersVisibility="None" BorderBrush="White">
                                <grid:DataGrid.Columns>
                                    <grid:DataGridTemplateColumn>
                                        <grid:DataGridTemplateColumn.CellTemplate>
                                            <DataTemplate>
                                                <go:NodePanel>
                                                    <Path go:NodePanel.Figure="{Binding Path=Figure}"
                                            Width="10" Height="10"
                                            Fill="{Binding Path=Color}"
                                            Stroke="Black" StrokeThickness="1"/>
                                                </go:NodePanel>
                                            </DataTemplate>
                                        </grid:DataGridTemplateColumn.CellTemplate>
                                    </grid:DataGridTemplateColumn>
                                    <grid:DataGridTextColumn Binding="{Binding Path=Name}"/>
                                    <grid:DataGridTextColumn Binding="{Binding Path=Value}"/>
                                </grid:DataGrid.Columns>
                            </grid:DataGrid>
                        </Grid>
                    </StackPanel>
                    <StackPanel x:Name="panel_buttonNode">
                        <Button x:Name="buttonNode" Content="AjoutBoutton" Click="buttonNode_Click" Margin="5 5 5 5"/>
                    </StackPanel>
                </StackPanel>
                <ToolTipService.ToolTip>
                    <TextBlock Text="{Binding Path=Data.Key}"
                 Visibility="{Binding Path=Data.Key.Length,
                              Converter={StaticResource theCountVisibilityConverter}}" />
                </ToolTipService.ToolTip>
       </go:NodePanel>

I tried to put inside my stackpannel but my shape doesn’t appear…

Is it a way to place the selection around my shape? :$

Have the whole node be resized – don’t specify the ResizeElementName. But you’ll need to make sure that all of the panels from the node down to the grid work the way you want. That means none of them can be a StackPanel!