示例#1
0
 public Page3(OptionsPanelGradienContentView actionContainerView) : base(actionContainerView)
 {
     combo = new ComboBox()
     {
         Allocation = new Rectangle(10, 10, 100, 20)
     };
     combo.AddItem("Line");
     combo.AddItem("Circle");
     combo.SelectionIndexChanged += (s, e) => SelectItem(combo.SelectedIndex);
 }
示例#2
0
        public Page2(OptionsPanelGradienContentView actionContainerView) : base(actionContainerView)
        {
            combo = new ComboBox()
            {
                Allocation = new Rectangle(10, 10, 100, 20)
            };

            combo.AddItem(Start);
            combo.AddItem(Arrow);
            combo.AddItem(Symbol);
            combo.AddItem(Machine);
            combo.SelectionIndexChanged += (s, e) => {
                ShowSvg(combo.SelectedItem);
            };
        }
示例#3
0
        static void Main(string[] args)
        {
            NSApplication.Init();
            NSApplication.SharedApplication.ActivationPolicy = NSApplicationActivationPolicy.Regular;

            mainWindow = new Window(new Rectangle(0, 0, 567, 675))
            {
                Title     = "Test Window",
                Resizable = false,
            };
            //mainWindow.Content.BackgroundColor = Color.Black;

            //mainWindow.Content.BackgroundColor = Color.Transparent;
            mainWindow.Center();
            mainWindow.MovableByWindowBackground = mainWindow.Content.MovableByWindowBackground = true;
            //mainWindow.Borderless = true;
            //mainWindow.IsOpaque = false;
            //mainWindow.BackgroundColor = Color.Transparent;

            mainWindow.IsFullSizeContentView = true;

            buttonContentStackView = new StackView()
            {
                Orientation = LayoutOrientation.Horizontal,
                Allocation  = new Rectangle(0, 0, mainWindow.Size.Width, 20),
                MovableByWindowBackground = true
            };
            mainWindow.Content.AddChild(buttonContentStackView);


            actionContainerView = new OptionsPanelGradienContentView()
            {
                Allocation = new Rectangle(10, 25, mainWindow.Size.Width - 20, mainWindow.Size.Height - 35),
                MovableByWindowBackground = true
            };

            mainWindow.Content.AddChild(actionContainerView);

            page1 = new Page1(actionContainerView);
            page2 = new Page2(actionContainerView);
            //page3 = new Page3(actionContainerView);

            var button = new Button()
            {
                Text = "Transformation"
            };

            buttonContentStackView.AddChild(button);
            button.Clicked += (s, e) => SelectPage(page1);

            var button2 = new Button()
            {
                Text = "Svg"
            };

            buttonContentStackView.AddChild(button2);
            button2.Clicked += (s, e) => SelectPage(page2);

            var button3 = new Button()
            {
                Text = "Shapes"
            };

            buttonContentStackView.AddChild(button3);
            //button3.Clicked += (s, e) => SelectPage(page3);

            //scrollView.SetContentSize(800, 1000);

            mainWindow.Resize += (s, e) => Refresh();

            SelectPage(page2);

            mainWindow.Show();

            NSApplication.SharedApplication.ActivateIgnoringOtherApps(true);
            NSApplication.SharedApplication.Run();
        }
示例#4
0
 public Page1(OptionsPanelGradienContentView actionContainerView) : base(actionContainerView)
 {
     rectangleExampleView = new RectangleExampleView();
 }
示例#5
0
 public PageView(OptionsPanelGradienContentView actionContainerView)
 {
     this.actionContainerView = actionContainerView;
 }