public override EvasObject CreateContent(EvasObject parent)
        {
            var box = new ColoredBox(parent);

            box.Show();
            box.PackEnd(GetTitleLabel(parent));

            var check = new MCheckBox(parent)
            {
                IsChecked  = true,
                WeightY    = 1,
                WeightX    = 1,
                AlignmentY = 0.5,
                AlignmentX = 0.5
            };

            box.PackEnd(check);
            check.Show();

            var check2 = new MCheckBox(parent)
            {
                IsEnabled  = true,
                Color      = Color.FromHex("#E30425"),
                WeightY    = 1,
                WeightX    = 1,
                AlignmentY = 0.5,
                AlignmentX = 0.5
            };

            box.PackEnd(check2);
            check2.Show();

            var check3 = new MCheckBox(parent)
            {
                IsChecked  = true,
                IsEnabled  = false,
                WeightY    = 1,
                WeightX    = 1,
                AlignmentY = 0.5,
                AlignmentX = 0.5
            };

            box.PackEnd(check3);
            check3.Show();

            return(box);
        }
Exemple #2
0
        public override void Run(Window window)
        {
            MConformant conformant = new MConformant(window);

            conformant.Show();
            Box box = new ColoredBox(window);

            conformant.SetContent(box);
            box.Show();

            #region ThemeButton
            Box hbox = new Box(window)
            {
                IsHorizontal = true,
                WeightX      = 1,
                WeightY      = 0.1,
                AlignmentX   = -1,
                AlignmentY   = -1,
            };
            hbox.Show();
            box.PackEnd(hbox);

            var defaultColor = new MButton(window)
            {
                Text         = "default",
                MinimumWidth = 200,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            var light = new MButton(window)
            {
                Text         = "light",
                MinimumWidth = 200,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            var dark = new MButton(window)
            {
                Text         = "Dark",
                MinimumWidth = 200,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            defaultColor.Show();
            light.Show();
            dark.Show();
            hbox.PackEnd(defaultColor);
            hbox.PackEnd(light);
            hbox.PackEnd(dark);

            defaultColor.Clicked += (s, e) => MColors.Current = MColors.Default;
            light.Clicked        += (s, e) => MColors.Current = MColors.Light;
            dark.Clicked         += (s, e) => MColors.Current = MColors.Dark;
            #endregion

            #region ModalSheets
            MModalSheets modalSheets = new MModalSheets(conformant, MModalSheetsDirection.Side);
            modalSheets.Show();

            Label label1 = new Label(window)
            {
                Text       = "<span font_size=35 color=#a8a8a8>Labels</span>",
                AlignmentX = 0,
            };
            label1.Show();
            var check1 = new MCheckBox(window)
            {
                Text         = "Events",
                MinimumWidth = 400,
            };
            check1.Show();
            var check2 = new MCheckBox(window)
            {
                Text         = "Personal",
                IsChecked    = true,
                MinimumWidth = 400,
            };
            check2.Show();
            var check3 = new MCheckBox(window)
            {
                Text         = "Project",
                IsChecked    = true,
                MinimumWidth = 400,
            };
            check3.Show();
            var check4 = new MCheckBox(window)
            {
                Text         = "Reminders",
                MinimumWidth = 400,
            };
            check4.Show();
            var check5 = new MCheckBox(window)
            {
                Text         = "Work",
                MinimumWidth = 400,
            };
            check5.Show();

            var contents = new Box(conformant)
            {
                IsHorizontal    = true,
                AlignmentX      = -1,
                AlignmentY      = -1,
                WeightX         = 1,
                WeightY         = 1,
                BackgroundColor = Color.White,
            };
            contents.Show();
            contents.SetPadding(45, 45);

            var contents1 = new Box(conformant)
            {
                IsHorizontal = true,
            };
            contents1.Show();
            contents1.SetPadding(45, 45);
            contents.PackEnd(contents1);

            var contents2 = new Box(conformant)
            {
                IsHorizontal = false,
                AlignmentX   = 0,
                AlignmentY   = 0,
                WeightX      = 1,
                WeightY      = 0,
            };
            contents2.Show();
            contents2.SetPadding(45, 45);
            contents.PackEnd(contents2);

            var contents3 = new Box(conformant)
            {
                IsHorizontal = false,
            };
            contents3.Show();
            contents3.SetPadding(45, 45);
            contents2.PackEnd(contents3);

            contents2.PackEnd(label1);
            contents2.PackEnd(check1);
            contents2.PackEnd(check2);
            contents2.PackEnd(check3);
            contents2.PackEnd(check4);
            contents2.PackEnd(check5);

            modalSheets.SetContent(contents);
            #endregion

            #region Buttons
            Box btbox = new Box(window)
            {
                WeightX    = 1,
                WeightY    = 0.3,
                AlignmentX = -1,
                AlignmentY = -1,
            };
            btbox.Show();
            box.PackEnd(btbox);

            MButton button1 = new MButton(window)
            {
                Text         = "Open MModalSideSheets",
                MinimumWidth = 600,
                AlignmentY   = 0,
                WeightY      = 0.3,
            };
            button1.Show();
            button1.Clicked += (s, e) =>
            {
                modalSheets.IsOpen = true;
            };

            btbox.PackEnd(button1);
            #endregion
        }
        public override EvasObject CreateContent(EvasObject parent)
        {
            if (_conformant == null)
            {
                return(null);
            }

            Box box = new ColoredBox(parent);

            box.Show();

            #region ModalSheets
            MModalSheets modalSheets = new MModalSheets(_conformant, MModalSheetsDirection.Side);
            modalSheets.Show();

            Label label1 = new Label(parent)
            {
                Text       = "<span font_size=35 color=#a8a8a8>Labels</span>",
                AlignmentX = 0,
            };
            label1.Show();
            var check1 = new MCheckBox(parent)
            {
                Text         = "Events",
                MinimumWidth = 400,
            };
            check1.Show();
            var check2 = new MCheckBox(parent)
            {
                Text         = "Personal",
                IsChecked    = true,
                MinimumWidth = 400,
            };
            check2.Show();
            var check3 = new MCheckBox(parent)
            {
                Text         = "Project",
                IsChecked    = true,
                MinimumWidth = 400,
            };
            check3.Show();
            var check4 = new MCheckBox(parent)
            {
                Text         = "Reminders",
                MinimumWidth = 400,
            };
            check4.Show();
            var check5 = new MCheckBox(parent)
            {
                Text         = "Work",
                MinimumWidth = 400,
            };
            check5.Show();

            var contents = new Box(_conformant)
            {
                IsHorizontal    = true,
                AlignmentX      = -1,
                AlignmentY      = -1,
                WeightX         = 1,
                WeightY         = 1,
                BackgroundColor = Color.White,
            };
            contents.Show();
            contents.SetPadding(45, 45);

            var contents1 = new Box(_conformant)
            {
                IsHorizontal = true,
            };
            contents1.Show();
            contents1.SetPadding(45, 45);
            contents.PackEnd(contents1);

            var contents2 = new Box(_conformant)
            {
                IsHorizontal = false,
                AlignmentX   = 0,
                AlignmentY   = 0,
                WeightX      = 1,
                WeightY      = 0,
            };
            contents2.Show();
            contents2.SetPadding(45, 45);
            contents.PackEnd(contents2);

            var contents3 = new Box(_conformant)
            {
                IsHorizontal = false,
            };
            contents3.Show();
            contents3.SetPadding(45, 45);
            contents2.PackEnd(contents3);

            contents2.PackEnd(label1);
            contents2.PackEnd(check1);
            contents2.PackEnd(check2);
            contents2.PackEnd(check3);
            contents2.PackEnd(check4);
            contents2.PackEnd(check5);

            modalSheets.SetContent(contents);
            #endregion

            #region Buttons
            Box btbox = new Box(parent)
            {
                WeightX    = 1,
                WeightY    = 0.3,
                AlignmentX = -1,
                AlignmentY = -1,
            };
            btbox.Show();
            box.PackEnd(btbox);

            MButton button1 = new MButton(parent)
            {
                Text         = "Open MModalSideSheets",
                MinimumWidth = 600,
                AlignmentY   = 0,
                WeightY      = 0.3,
            };
            button1.Show();
            button1.Clicked += (s, e) =>
            {
                modalSheets.IsOpen = true;
            };

            btbox.PackEnd(button1);
            #endregion

            return(box);
        }
Exemple #4
0
        public override void Run(Window window)
        {
            Conformant conformant = new Conformant(window);

            conformant.Show();
            Box box = new ColoredBox(window);

            conformant.SetContent(box);
            box.Show();

            #region ThemeButton
            Box hbox = new Box(window)
            {
                IsHorizontal = true,
                WeightX      = 1,
                WeightY      = 0.2,
                AlignmentX   = -1,
                AlignmentY   = -1,
            };
            hbox.Show();
            box.PackEnd(hbox);

            var defaultColor = new MButton(window)
            {
                Text         = "default",
                MinimumWidth = 200,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            var light = new MButton(window)
            {
                Text         = "light",
                MinimumWidth = 200,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            var dark = new MButton(window)
            {
                Text         = "Dark",
                MinimumWidth = 200,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            defaultColor.Show();
            light.Show();
            dark.Show();
            hbox.PackEnd(defaultColor);
            hbox.PackEnd(light);
            hbox.PackEnd(dark);

            defaultColor.Clicked += (s, e) => MColors.Current = MColors.Default;
            light.Clicked        += (s, e) => MColors.Current = MColors.Light;
            dark.Clicked         += (s, e) => MColors.Current = MColors.Dark;
            #endregion


            var check = new MCheckBox(window)
            {
                Text         = "CheckBox",
                MinimumWidth = 400,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            box.PackEnd(check);
            check.Show();

            var check2 = new MCheckBox(window)
            {
                IsEnabled    = false,
                IsChecked    = true,
                Text         = "Disabled, Checked",
                MinimumWidth = 400,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            box.PackEnd(check2);
            check2.Show();

            var check3 = new MCheckBox(window)
            {
                IsEnabled    = false,
                IsChecked    = false,
                Text         = "Disabled",
                MinimumWidth = 400,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            box.PackEnd(check3);
            check3.Show();

            var check4 = new MCheckBox(window)
            {
                IsEnabled    = true,
                Text         = "Custom Color",
                Color        = Color.FromHex("#E30425"),
                MinimumWidth = 400,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            box.PackEnd(check4);
            check4.Show();

            var check5 = new MCheckBox(window)
            {
                IsEnabled    = false,
                IsChecked    = true,
                Text         = "Custom Color",
                Color        = Color.FromHex("#E30425"),
                MinimumWidth = 400,
                WeightY      = 1,
                AlignmentY   = 0.5
            };
            box.PackEnd(check5);
            check5.Show();
        }