public MainPage()
        {
            InitializeComponent();

            HtmlPage.RegisterScriptableObject("MainPage", this);

            graph = new Vis.Graph();
            this.LayoutRoot.Children.Add(graph);
            this.Dispatcher.BeginInvoke(
                () =>
                {
                    graph.SetBounds(this.ActualWidth, this.ActualHeight);
                }
            );
        }
        public MainPage(IDictionary<string, string> initParams)
        {
            InitializeComponent();

            HtmlPage.RegisterScriptableObject("MainPage", this);

            graph = new Vis.Graph();
            this.LayoutRoot.Children.Add(graph);
            this.Dispatcher.BeginInvoke(
                () =>
                {
                    graph.SetBounds(this.ActualWidth, this.ActualHeight);
                }
            );

            string json;
            if (initParams.TryGetValue("json", out json))
            {
                LoadJson(json);
            }
        }