示例#1
0
        internal RadioButton(
            RadioButtonPicker radioButtonGroup,
            RadioButtonItem radioButtonItem)
        {
            if (null == radioButtonGroup)
            {
                throw new ArgumentNullException(nameof(radioButtonGroup));
            }

            if (null == radioButtonItem)
            {
                throw new ArgumentNullException(nameof(radioButtonItem));
            }

            this._textFormat = new TextFormat()
            {
                FontSize            = 10.0f,
                HorizontalAlignment = LayoutAlignment.Center,
                VerticalAlignment   = LayoutAlignment.End,
            };

            this.Size  = new Size(72, 60);
            this.Scale = IsUncheckedScale;

            this.RadioButtonPicker = radioButtonGroup;
            this.RadioButtonItem   = radioButtonItem;

            this.GestureRecognizer = new TapGestureRecognizer(this);

            radioButtonItem.PropertyChanged += MenuItem_PropertyChanged; // TODO: Matching detach event handler
        }
示例#2
0
        internal RadioButtonItemCollection(
            RadioButtonPicker radioButtonGroup)
        {
            if (null == radioButtonGroup)
            {
                throw new ArgumentNullException(nameof(radioButtonGroup));
            }

            this._radioButtonGroup = radioButtonGroup;
            this._items            = new List <RadioButtonItem>();
        }