/// <summary>
        /// Updates the device table cell to the given device.
        /// </summary>
        /// <param name="device">Device.</param>
        public void UpdateTo(IION ion, DeviceRecord record, double cellWidth)
        {
            this.ion               = ion;
            this.record            = record;
            this.BackgroundColor   = UIColor.White;
            this.Layer.BorderWidth = 1f;

            var cellHeight = 48;

            viewBackground = new UIView(new CGRect(0, 0, cellWidth, cellHeight));
            viewBackground.BackgroundColor = UIColor.White;

            buttonConnect = new UIButton(new CGRect(cellWidth - cellHeight, 0, cellHeight, cellHeight));
            buttonConnect.SetBackgroundImage(UIImage.FromBundle("ButtonGold").AsNinePatch(), UIControlState.Normal);
            buttonConnect.SetBackgroundImage(UIImage.FromBundle("ButtonBlack").AsNinePatch(), UIControlState.Selected);

            imageDeviceIcon = new UIImageView(new CGRect(0, 0, cellHeight, cellHeight));

            labelDeviceType = new UILabel(new CGRect(cellHeight, 0, cellWidth - cellHeight, .5 * cellHeight));
            labelDeviceName = new UILabel(new CGRect(cellHeight, .5 * cellHeight, cellWidth - cellHeight, .5 * cellHeight));

            viewBackground.AddSubview(buttonConnect);
            viewBackground.AddSubview(imageDeviceIcon);
            viewBackground.AddSubview(labelDeviceName);
            viewBackground.AddSubview(labelDeviceType);
            this.AddSubview(viewBackground);

            UpdateLabels();
            UpdateActivityViews();
        }
 // Overridden from IReleasable
 public void Release()
 {
     record = null;
 }