Exemplo n.º 1
0
        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);
                }
            );
        }
Exemplo n.º 2
0
        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);
            }
        }