示例#1
0
        public override void LoadView()
        {
            this.View = new UIView(UIScreen.MainScreen.ApplicationFrame)
            {
                BackgroundColor  = Theme.BackgroundColor,
                AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight
            };

            this.PeriodicTable = new PeriodicTable(new RectangleF(0, 44, View.Frame.Width, View.Frame.Height), Element.All);
            this.PeriodicTable.AutoresizingMask = View.AutoresizingMask;
            Add(this.PeriodicTable);

            this.PeriodicTable.CellSelected += (Element item, RectangleF cellFrame) =>
            {
                Console.WriteLine("cell selected event in view controller {0}", item.Symbol);
                ShowDetails(item, cellFrame);
                //var transform = CGAffineTransform..MakeScale(scale,scale);
            };

            detailsView = new ElementDetailView(View.Bounds, this)
            {
                AutoresizingMask = View.AutoresizingMask,
                Hidden           = true,
                Alpha            = 0
            };
            Add(detailsView);
        }
        public override void LoadView()
        {
            this.View = new UIView(UIScreen.MainScreen.ApplicationFrame)
            {
                BackgroundColor = Theme.BackgroundColor,
                AutoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight
            };

            this.PeriodicTable = new PeriodicTable(new RectangleF(0, 44, View.Frame.Width, View.Frame.Height), Element.All);
            this.PeriodicTable.AutoresizingMask = View.AutoresizingMask;
            Add(this.PeriodicTable);

            this.PeriodicTable.CellSelected += (Element item, RectangleF cellFrame) =>
            {
                Console.WriteLine("cell selected event in view controller {0}", item.Symbol);
                ShowDetails(item, cellFrame);
                //var transform = CGAffineTransform..MakeScale(scale,scale);
            };

            detailsView = new ElementDetailView(View.Bounds, this)
            {
                AutoresizingMask = View.AutoresizingMask,
                Hidden = true,
                Alpha = 0
            };
            Add(detailsView);
        }