Esempio n. 1
0
        public MainTabbedPage()
        {
            this.On <Xamarin.Forms.PlatformConfiguration.Android>().SetToolbarPlacement(ToolbarPlacement.Bottom);
            BarBackgroundColor = barColor;
            BarTextColor       = Color.White;
            UnselectedTabColor = Color.White;
            SelectedTabColor   = Color.White;
            this.On <Xamarin.Forms.PlatformConfiguration.Android>().DisableSwipePaging();  //disables swiping between tabbed pages

            theDocListPage    = new DocListPage();
            theModelListPage  = new ModelListPage();
            theModelEntryPage = new ModelEntryPage();
            theOutputPage     = new OutputPage();
            theChartPage      = new ChartPage();

            theDocListPageNavigation = new NavigationPage(theDocListPage)
            {
                Title = "Tutorial", IconImageSource = "icons8usermanual100.png", BarBackgroundColor = barColor, BarTextColor = Color.White
            };
            theModelListPageNavigation = new NavigationPage(theModelListPage)
            {
                Title = "Files", IconImageSource = "icons8openedfolder96.png", BarBackgroundColor = barColor, BarTextColor = Color.White
            };
            theModelEntryPageNavigation = new NavigationPage(theModelEntryPage)
            {
                Title = "Edit", IconImageSource = "icons8mindmap96.png", BarBackgroundColor = barColor, BarTextColor = Color.White
            };
            theOutputPageNavigation = new NavigationPage(theOutputPage)
            {
                Title = "Output", IconImageSource = "icons8truefalse100.png", BarBackgroundColor = barColor, BarTextColor = Color.White
            };
            theChartPageNavigation = new NavigationPage(theChartPage)
            {
                Title = "Chart", IconImageSource = "icons8combochart48.png", BarBackgroundColor = barColor, BarTextColor = Color.White
            };                                                                                                                                                                                     // DO NOT use "icons8combochart96.png", it will not scale

            // To change tab order, just shuffle these Add calls around.
            // with more than 5 tabs the app will just crash on load
            Children.Add(theDocListPageNavigation);
            Children.Add(theModelListPageNavigation);
            Children.Add(theModelEntryPageNavigation);
            Children.Add(theOutputPageNavigation);
            Children.Add(theChartPageNavigation);
        }
Esempio n. 2
0
 public System.Action action;  // this may be invoked from work thread
 public OutputAction(OutputPage page, string name, OutputKind kind, ExportAs export)
 {
     this.name   = name;
     this.kind   = kind;
     this.action = async() => { page.SwitchAndExecute(kind, export); };
 }