Example #1
0
			public MarkReadSection(string text, NotificationsView parent, bool button)
				: base(new System.Drawing.RectangleF(0, 0, 320, 28f))
			{
				_parent = parent;
				TextLabel.Text = text;

				if (button)
				{
					_button = new UIButton(UIButtonType.RoundedRect);
					_button.SetImage(Theme.CurrentTheme.CheckButton, UIControlState.Normal);
					//_button.Frame = new System.Drawing.RectangleF(320f - 42f, 1f, 26f, 26f);
					_button.TintColor = UIColor.FromRGB(50, 50, 50);
					_button.TouchUpInside += (sender, e) => ((NotificationsViewModel)_parent.ViewModel).ReadRepositoriesCommand.Execute(text);
					Add(_button);
				}
			}
Example #2
0
            public MarkReadSection(string text, NotificationsView parent, bool button)
                : base(new CoreGraphics.CGRect(0, 0, 320, 28f))
            {
                var weakVm = new WeakReference <NotificationsViewModel>(parent.ViewModel as NotificationsViewModel);

                TextLabel.Text = text;

                if (button)
                {
                    _button = new UIButton(UIButtonType.RoundedRect);
                    _button.SetImage(Images.Buttons.CheckButton, UIControlState.Normal);
                    //_button.Frame = new System.Drawing.RectangleF(320f - 42f, 1f, 26f, 26f);
                    _button.TintColor      = UIColor.FromRGB(50, 50, 50);
                    _button.TouchUpInside += (sender, e) => weakVm.Get()?.ReadRepositoriesCommand.Execute(text);
                    Add(_button);
                }
            }
Example #3
0
            public MarkReadSection(string text, NotificationsView parent, bool button)
                : base(new System.Drawing.RectangleF(0, 0, 320, 28f))
            {
                _parent        = parent;
                TextLabel.Text = text;
                TextLabel.Font = TextLabel.Font.WithSize(TextLabel.Font.PointSize * Theme.CurrentTheme.FontSizeRatio);

                if (button)
                {
                    _button = new UIButton(UIButtonType.RoundedRect);
                    _button.SetImage(Theme.CurrentTheme.CheckButton, UIControlState.Normal);
                    //_button.Frame = new System.Drawing.RectangleF(320f - 42f, 1f, 26f, 26f);
                    _button.TintColor      = UIColor.FromRGB(50, 50, 50);
                    _button.TouchUpInside += (sender, e) => ((NotificationsViewModel)_parent.ViewModel).ReadRepositoriesCommand.Execute(text);
                    Add(_button);
                }
            }
Example #4
0
            public MarkReadSection(string text, NotificationsView parent, bool button)
                : base(new CoreGraphics.CGRect(0, 0, 320, 28f))
            {
                var weakVm = new WeakReference<NotificationsViewModel>(parent.ViewModel as NotificationsViewModel);
                TextLabel.Text = text;

                if (button)
                {
                    _button = new UIButton(UIButtonType.RoundedRect);
                    _button.SetImage(Images.Buttons.CheckButton, UIControlState.Normal);
                    //_button.Frame = new System.Drawing.RectangleF(320f - 42f, 1f, 26f, 26f);
                    _button.TintColor = UIColor.FromRGB(50, 50, 50);
                    _button.TouchUpInside += (sender, e) => weakVm.Get()?.ReadRepositoriesCommand.Execute(text);
                    Add(_button);
                }
            }