set shape and color for vertex, set length and thickness for edge

Apr 8, 2012 at 7:07 PM

Hi and thanks for great work!

Here is my questions: How can I set shape and color for a vertex? How about length and thickness/color of an edge?

looking for your answers, thanks  a lot

Apr 8, 2012 at 7:32 PM

I saw this:

http://graphsharp.codeplex.com/discussions/79824

but don't know how to use, any explanation and solution is welcome :)

Apr 15, 2012 at 2:44 PM

How to set the color and shape of a vertex , at the window.xaml file you'll find these lines , make some changes and re build it , about the edges color it about highliting algorithm still working on that ...

<Style TargetType="{x:Type graphsharp:VertexControl}">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="{x:Type graphsharp:VertexControl}">
                            <Border BorderBrush="DarkGray"
                                    Background="White"
                                    BorderThickness="1.25"
                                    CornerRadius="8,8,8,8"
                                    Padding="{TemplateBinding Padding}">
                                <StackPanel Orientation="Vertical">
                                <!--    Vertex handlers -->
                                <ContentPresenter Content="{TemplateBinding Vertex}"
                                            ContentTemplate="{StaticResource demoTemplate}"
                                            MouseUp="Vertex_MouseUp"
                                            MouseEnter="Vertex_MouseEnter"
                                            MouseDown="Vertex_MouseDown"
                                            MouseLeftButtonDown="Vertex_MouseLeftButtonDown"/>
                                </StackPanel>

                                <Border.Effect>
                                <DropShadowEffect BlurRadius="0.2" Color="LightCoral"
                                    Opacity="0.5"/>
                            </Border.Effect>
                            </Border>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>