Esempio n. 1
0
 public BrowserWindow()
 {
     rootTree = RootTree.LoadTree(@"/Library/Frameworks/Mono.framework/Versions/Current/lib/monodoc");
     MonoDocWebRequest.RegisterWithRootTree(rootTree);
     treeView = new DocTreeView(rootTree);
     treeView.SelectionChanged += treeView_SelectionChanged;
     scrollView = new ScrollView() { Scrollers = Axis.Both };
     scrollView.DocumentView = treeView;
     webView = new WebView();
     //			splitView = new SplitView()
     //			{
     //				Margin = new Thickness(0, 0, 0, Window.SmallBottomBarHeight),
     //				Width = double.NaN,
     //				Height = double.NaN,
     //				Orientation = Orientation.Horizontal,
     //				DividerStyle = DividerStyle.Thin,
     //			};
     //			splitView.Children.Add(scrollView);
     //			splitView.Children.Add(webView);
     //			Content.Children.Add(splitView);
     scrollView.HorizontalAlignment = HorizontalAlignment.Left;
     scrollView.Width = 250;
     scrollView.Margin = new Thickness(4, 4, 4, Window.SmallBottomBarHeight + 4);
     webView.HorizontalAlignment = HorizontalAlignment.Right;
     webView.Margin = new Thickness(258, 4, 4, Window.SmallBottomBarHeight + 4);
     Content.Children.Add(scrollView);
     Content.Children.Add(webView);
     CreateToolbarTemplate();
     Toolbar = new Toolbar() { Customizable = true, TemplateName = "Main" };
     BottomBarHeight = Window.SmallBottomBarHeight;
     Title = "Mono Documentation Browser";
 }
Esempio n. 2
0
 public MainWindow()
 {
     CreateToolbarTemplate();
     Style |= WindowStyle.UnifiedTitleAndToolbar;
     Toolbar = new Toolbar() { TemplateName = "Main", Customizable = true };
     button1 = new Button() { Title = "Click me \u263A", Width = 100, Margin = new Thickness(0, 0, 200, 0), HorizontalAlignment = HorizontalAlignment.Right, VerticalAlignment = VerticalAlignment.Bottom };
     button1.Action += HandleButton1Action;
     button2 = new Button() { Title = "\u26A0 Don't click me \u2620", Width = 200, Margin = new Thickness(0, 0, 0, 0), HorizontalAlignment = HorizontalAlignment.Right, VerticalAlignment = VerticalAlignment.Bottom };
     button2.Action += HandleButton2Action;
     checkBox = new Button() { Title = "Closable", ButtonType = ButtonType.Switch, Width = 100, Height = 24, Margin = new Thickness(120, 0, 0, 100), HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Bottom };
     paintedView = new DrawableView() { Height = 100, Margin = new Thickness(0, 0, 0, 160), VerticalAlignment = VerticalAlignment.Bottom };
     paintedView.Draw += HandlePaintedViewDraw;
     webView = new WebView() { Margin = new Thickness(0, 0, 0, 260), VerticalAlignment = VerticalAlignment.Top };
     #if DOCUMENT
     //			checkBox.Checked = true;
     #endif
     Title = "Hello From C#";
     Content.Children.AddRange
     (
         button1,
         button2,
         checkBox,
         new ColorWell() { Width = 100, Height = 100, Margin = new Thickness(10, 0, 0, 32), HorizontalAlignment = HorizontalAlignment.Left, VerticalAlignment = VerticalAlignment.Bottom },
         new ColorWell() { Width = 100, Height = 100, Margin = new Thickness(0, 0, 10, 32), HorizontalAlignment = HorizontalAlignment.Right, VerticalAlignment = VerticalAlignment.Bottom },
         new SearchField() { Width = double.NaN, Height = 22, Margin = new Thickness(120, 0, 120, 32), HorizontalAlignment = HorizontalAlignment.Stretch, VerticalAlignment = VerticalAlignment.Bottom },
         new TextField() { Height = 22, Margin = new Thickness(120, 0, 120, 64), HorizontalAlignment = HorizontalAlignment.Stretch, VerticalAlignment = VerticalAlignment.Bottom },
         new ComboBox() { Height = 22, Margin = new Thickness(10, 0, 10, 132), HorizontalAlignment = HorizontalAlignment.Stretch, VerticalAlignment = VerticalAlignment.Bottom },
         paintedView,
         webView
     );
 }
Esempio n. 3
0
 public PreferencesPanel()
 {
     Title = "Preferences";
     Style = WindowStyle.Titled | WindowStyle.Closable;
     CreateToolbarTemplate();
     Toolbar = new Toolbar() { TemplateName = "Preferences", Customizable = false };
     Content.Children.Add(new PropertyGrid() { SelectedObject = new PropertyObject() });
 }