How can I change my Edge Width??

May 29, 2014 at 10:09 PM
My .xaml looks like
<Grid>
        <Grid.Resources>
        </Grid.Resources>
        <graphSharp:GraphLayout x:Name="graphLayout" 
                                Graph="{Binding ElementName=root, Path=GraphToVisualize}"
                                LayoutAlgorithmType="FR"
                                OverlapRemovalAlgorithmType="FSA"
                                HighlightAlgorithmType="Simple"
                                />
    </Grid>
and the code behind is
public partial class MainWindow : Window {
        private IBidirectionalGraph<object, IEdge<object>> graphToVisualize;

        public IBidirectionalGraph<object, IEdge<object>> GraphToVisualize {
            get { return graphToVisualize; }
        }

        public MainWindow() {
            CreateGraph();

            InitializeComponent();
        }

        private void CreateGraph() {
            var g = new BidirectionalGraph<object, IEdge<object>>();

            string[] verticies = new string[5];

            for (int i = 0; i < 5; i++) {
                verticies[i] = i.ToString();
                g.AddVertex(verticies[i]);
            }

            g.AddEdge(new Edge<object>(verticies[0], verticies[1]));
            g.AddEdge(new Edge<object>(verticies[2], verticies[3]));
            g.AddEdge(new Edge<object>(verticies[0], verticies[4]));

            graphToVisualize = g;
        }
    }
This produces huge arrows between my vertices. Any help would be greatly appreciated.

Thanks!!!
May 30, 2014 at 6:18 AM
Edited May 30, 2014 at 6:18 AM
Hi, i think you should look into XAML template for EdgeControl. There you can change edge thickness and all visual stuff.
May 30, 2014 at 1:34 PM
Where can I find that?
Thanks Panthernet
May 30, 2014 at 1:59 PM
https://graphsharp.codeplex.com/SourceControl/latest#Source/Graph#.Controls/Themes/Generic.xaml

I don't know what exactly you don't like in the visual representation but if you think that vertices are situated too close to each other you should also look at overlap removal algorithm parameters to set minimum intervals.

Honestly, i haven't touched Graph# for a while as i'm developing its "successor" - GraphX for .NET.
May 30, 2014 at 2:53 PM
Ohh I see, I am looking through the GraphX solution now. Looks amazing Thanks!