예제 #1
0
        public RootPage()
        {
            InitializeComponent();

            ViewModel      = new RootPageViewModel();
            BindingContext = ViewModel;

            _old = ViewModel.Markdown;

            ((Button)ClickMe).Clicked += OnClicked;
        }
예제 #2
0
        public RootPage()
        {
            NavigationPage.SetHasNavigationBar(this, false);

            detailPages = new List <Page>();
            instance    = this;

            InitializeComponent();
            BindingContext = new RootPageViewModel();

            detailPages.Add(Detail);

            masterPage.ListView.ItemSelected += ListView_ItemSelected;
        }
예제 #3
0
        public RootPage(IEventAggregator eventAggregator)
        {
            InitializeComponent();
            //SetValue(NavigationPage.HasNavigationBarProperty, false);
            _vm = BindingContext as RootPageViewModel;

            RootAssessment1.HtmlText = AppTextResource.RootAssessment1;
            RootAssessment2.HtmlText = AppTextResource.RootAssessment2;
            RootAssessment3.HtmlText = AppTextResource.RootAssessment3;
            RootMonitor1.HtmlText    = AppTextResource.RootMonitor1;
            RootMonitor2.HtmlText    = AppTextResource.RootMonitor2;
            RootMonitor3.HtmlText    = AppTextResource.RootMonitor3;
            RootMonitor4.HtmlText    = AppTextResource.RootMonitor4;

            eventAggregator.GetEvent <RootPageRefreshEvent>().Subscribe(UpdateSelectedFarm);
        }
예제 #4
0
        private string GetRenderedIndexBody(DocumentViewModel viewModel)
        {
            var tocBuilder   = new TableOfContentsBuilder(viewModel, ViewModelsByParent, ViewModelsById);
            var toc          = tocBuilder.Build();
            var uxNamespaces = _uxNamespaces.Select(e =>
            {
                var entries = _uxClassesByNamespace.ContainsKey(e.Uri.Href) ? _uxClassesByNamespace[e.Uri.IdUri] : new List <DataTypeViewModel>();
                var result  = entries.OrderBy(x => x.UxProperties.UxName)
                              .Select(x => new UxNamespaceEntryViewModel(x.Uri.Href, x.UxProperties.UxName))
                              .ToList();
                return(new UxNamespaceViewModel(e.Uri.Href, e.Titles.FullTitle, result));
            }).OrderBy(e => e.Title).ToList();

            var page = new RootPageViewModel(viewModel, toc, uxNamespaces);

            return(JsonConvert.SerializeObject(page, _jsonSerializerSettings));
        }
 protected override void OnAppearing()
 {
     base.OnAppearing();
     _viewModel     = new RootPageViewModel();
     BindingContext = _viewModel;
 }
예제 #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RootPage"/> class
 /// </summary>
 public RootPage()
 {
     InitializeComponent();
     _viewModel     = new RootPageViewModel(Navigation);
     BindingContext = _viewModel;
 }