Beispiel #1
0
        public TesterView(CGRect bounds) : base()
        {
            Frame = bounds;

            GraphicsPlatform.Register(NativeGraphicsService.Instance);

            tableSource = new TesterTableViewSource();

            tableSource.ScenarioSelected += (drawable) =>
            {
                graphicsView.Drawable = drawable;
                graphicsView.InvalidateDrawable();
            };

            tableView = new UITableView
            {
                AllowsSelection = true,
                Source          = tableSource
            };

            AddSubview(tableView);

            graphicsView = new NativeGraphicsView
            {
                Drawable = ScenarioList.Scenarios[0]
            };

            AddSubview(graphicsView);

            tableView.SelectRow(NSIndexPath.FromRowSection(0, 0), false, UITableViewScrollPosition.None);
        }
Beispiel #2
0
        public TesterView() : base()
        {
            GraphicsPlatform.Register(NativeGraphicsService.Instance);

            tableSource = new TesterTableViewSource();
            tableSource.ScenarioSelected += (drawable) => {
                graphicsView.Drawable = drawable;
                graphicsView.InvalidateDrawable();
            };

            tableView = new NSTableView();
            tableView.AddColumn(new NSTableColumn()
            {
                Width = 300,
            });
            tableView.Source = tableSource;
            //tableView.BackgroundColor = NSColor.White;

            AddSubview(tableView);

            graphicsView = new NativeGraphicsView();
            AddSubview(graphicsView);

            Layout();

            tableView.SelectRow(0, false);
        }
Beispiel #3
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            GraphicsPlatform.Register(NativeGraphicsService.Instance);

            _mainView = new MainView(this);
            // Defining the LinearLayout layout parameters to fill the parent.
            LinearLayout.LayoutParams llp = new LinearLayout.LayoutParams(
                LinearLayout.LayoutParams.MatchParent,
                LinearLayout.LayoutParams.MatchParent);

            SetContentView(_mainView, llp);
        }