Ejemplo n.º 1
0
        private static void OnPropertyChangedCallBack(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            OrgDiagram diagram = d as OrgDiagram;

            ChartViewModel chartvm = e.NewValue as ChartViewModel;

            diagram.UpdateCollection();
            chartvm.Previous = new DelegateCommand <object>(diagram.OnPrevious, args => { return(true); });
            chartvm.Next     = new DelegateCommand <object>(diagram.OnNext, args => { return(true); });
            chartvm.Search   = new DelegateCommand <object>(diagram.OnSearch, args => { return(true); });
        }
Ejemplo n.º 2
0
        public MainPage()
        {
            this.InitializeComponent();
            ChartViewModel cvm = new ChartViewModel();

            this.DataContext = cvm;
            OrgDiagram org = new OrgDiagram();

            org.ChartViewModel = this.DataContext as ChartViewModel;
            orgFrame.Content   = org;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () =>
            {
                OrgDiagram org     = new OrgDiagram();
                org.ChartViewModel = this.DataContext as ChartViewModel;
                orgFrame.Content   = org;
            }
                                           );

            //progress.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
        }