コード例 #1
0
        public override View Run()
        {
            var view = new View
            {
                Layout = new LinearLayout
                {
                    LinearAlignment   = LinearLayout.Alignment.Center,
                    LinearOrientation = LinearLayout.Orientation.Vertical,
                }
            };

            var on = new Button()
            {
                Text = "On"
            };

            view.Add(on);

            var off = new Button()
            {
                Text = "Off"
            };

            view.Add(off);

            on.Clicked  += (s, e) => PerformanceMonitor.Attach();
            off.Clicked += (s, e) => PerformanceMonitor.Detach();

            return(view);
        }