Esempio n. 1
0
        protected override void CreateControls(IWpfTextViewHost host, string source)
        {
            int width = WESettings.GetInt(SettingsKey);
            width = width == -1 ? 400 : width;

            _browser = new WebBrowser();
            _browser.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;

            Grid grid = new Grid();
            grid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(0, GridUnitType.Star) });
            grid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(5, GridUnitType.Pixel) });
            grid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(width) });
            grid.RowDefinitions.Add(new RowDefinition());

            grid.Children.Add(_browser);
            this.Children.Add(grid);

            Grid.SetColumn(_browser, 2);
            Grid.SetRow(_browser, 0);

            GridSplitter splitter = new GridSplitter();
            splitter.Width = 5;
            splitter.ResizeDirection = GridResizeDirection.Columns;
            splitter.VerticalAlignment = System.Windows.VerticalAlignment.Stretch;
            splitter.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
            splitter.DragCompleted += splitter_DragCompleted;

            grid.Children.Add(splitter);
            Grid.SetColumn(splitter, 1);
            Grid.SetRow(splitter, 0);
        }
        /// <summary>
        /// ShowActualWidthToolTip shows actual width of the left and right column near the GridSplitter column, so one can split two columns precisely
        /// </summary>
        /// <param name="gs"></param>
        /// <param name="tt"></param>
        // TODO: MainWindow.ShowActualWidthToolTip seems to be to tricky for reusability, maybe one find a more scaleable solution
        private void ShowActualWidthToolTip(GridSplitter gs, ToolTip tt)
        {
            // If the GridSplitter isn't positioned correctly in a seperate column between two other columns, drop functionality
            Grid parentGrid = gs.Parent as Grid;
            double? leftColumnActualWidth = null;
            double? rightColumnActualWidth = null;
            try 
            {
                leftColumnActualWidth = parentGrid.ColumnDefinitions[(Grid.GetColumn(gs) - 1)].ActualWidth;
                rightColumnActualWidth = parentGrid.ColumnDefinitions[Grid.GetColumn(gs) + 1].ActualWidth;
 
            }
            catch (ArgumentOutOfRangeException ex)
            {
                MessageBox.Show("Something went wrong in your GridSplitter layout. Splitter must been set in a column between the two columns who method tries to evaluate actual width. \n\n" + ex.Message, "Error", MessageBoxButton.OK);
            }

            tt.Content = String.Format("\u21E4 Width left {0} | {1} Width right \u21E5", leftColumnActualWidth, rightColumnActualWidth);
            tt.PlacementTarget = this;
            tt.Placement = PlacementMode.Relative;
            tt.HorizontalOffset = (Mouse.GetPosition(this).X - (tt.ActualWidth / 2));
            tt.VerticalOffset = (Mouse.GetPosition(this).Y + 10);
            tt.IsOpen = true;
            return;
        }
Esempio n. 3
0
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);


            RowDefinitions.Add(new RowDefinition());
            RowDefinitions.Add(new RowDefinition());

            ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(200) });
            ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(5) });
            ColumnDefinitions.Add(new ColumnDefinition());

            Children.Add(NavigationFrame);
            Children.Add(SelectionFrame);
            Grid.SetRow(SelectionFrame, 2);
            Children.Add(ViewFrame);
            var gridSplitter = new GridSplitter { Width = 5, HorizontalAlignment = HorizontalAlignment.Stretch };
            Children.Add(gridSplitter);
            
            
            Grid.SetColumn(gridSplitter, 1);
            Grid.SetColumn(ViewFrame, 2);
            Grid.SetRowSpan(ViewFrame, 3);
            Update();
        }
Esempio n. 4
0
        protected virtual void CreateMarginControls()
        {
            int width;
            using (var key = EditorExtensionsPackage.Instance.UserRegistryRoot)
            {
                var raw = key.GetValue("WE_" + _settingsKey);
                width = raw is int ? (int)raw : -1;
            }
            width = width == -1 ? 400 : width;


            Grid grid = new Grid();
            grid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(0, GridUnitType.Star) });
            grid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(5, GridUnitType.Pixel) });
            grid.ColumnDefinitions.Add(new ColumnDefinition() { Width = new GridLength(width, GridUnitType.Pixel) });
            grid.RowDefinitions.Add(new RowDefinition());

            _previewControl = CreatePreviewControl();
            grid.Children.Add(_previewControl);
            Children.Add(grid);

            Grid.SetColumn(_previewControl, 2);
            Grid.SetRow(_previewControl, 0);

            GridSplitter splitter = new GridSplitter();
            splitter.Width = 5;
            splitter.ResizeDirection = GridResizeDirection.Columns;
            splitter.VerticalAlignment = VerticalAlignment.Stretch;
            splitter.HorizontalAlignment = HorizontalAlignment.Stretch;
            splitter.DragCompleted += splitter_DragCompleted;

            grid.Children.Add(splitter);
            Grid.SetColumn(splitter, 1);
            Grid.SetRow(splitter, 0);
        }
Esempio n. 5
0
 public void Update(GridSplitter gs, Grid grid)
 {
     Rows.Clear();
     Cols.Clear();
     Rows.AddRange(grid.RowDefinitions.Select(d => (DtoGridLength)d.Height));
     Cols.AddRange(grid.ColumnDefinitions.Select(d => (DtoGridLength)d.Width));
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.uctrl_Loader = ((ClusteringEnsembleSuite.Controls.Loader)(target));
                return;

            case 2:
                this.uctrl_Attributes = ((ClusteringEnsembleSuite.Controls.Visualizers.AttributesVisualizer)(target));
                return;

            case 3:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 4:
                this.uctrl_Elements = ((ClusteringEnsembleSuite.Controls.Visualizers.ElementsVisualizer)(target));
                return;

            case 5:
                this.gridSplitter2 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 6:
                this.gb = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 7:
                this.ctrl_graphic = ((ClusteringEnsembleSuite.Controls.Visualizers.AttributesGraphicsVisualizer)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.myNavigationPaneControl = ((OutlookUI_HOL.MyNavigationPaneControl)(target));
                return;

            case 2:
                this.myNavigationGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.myNavigationBorder1 = ((System.Windows.Controls.Border)(target));
                return;

            case 4:
                this.myNavigationBorder2 = ((System.Windows.Controls.Border)(target));
                return;

            case 5:
                this.myNavigationBorder3 = ((System.Windows.Controls.Border)(target));
                return;

            case 6:
                this.myNavigationSplitter = ((System.Windows.Controls.GridSplitter)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 8
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 2:

            #line 21 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.TreeView)(target)).SelectedItemChanged += new System.Windows.RoutedPropertyChangedEventHandler <object>(this.treeCultures_SelectedItemChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.itemGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.groupSamples = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 5:
                this.groupRegion = ((System.Windows.Controls.GroupBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 9
0
		public override void OnApplyTemplate() {
			base.OnApplyTemplate();

			PART_LeftSplitter = GetTemplateChild("PART_LeftSplitter") as GridSplitter;
			PART_RightSplitter = GetTemplateChild("PART_RightSplitter") as GridSplitter;
			PART_TopSplitter = GetTemplateChild("PART_TopSplitter") as GridSplitter;
			PART_BottomSplitter = GetTemplateChild("PART_BottomSplitter") as GridSplitter;

			PART_LeftSection = GetTemplateChild("PART_LeftSection") as ColumnDefinition;
			PART_RightSection = GetTemplateChild("PART_RightSection") as ColumnDefinition;
			PART_TopSection = GetTemplateChild("PART_TopSection") as RowDefinition;
			PART_BottomSection = GetTemplateChild("PART_BottomSection") as RowDefinition;

			PART_LeftCollapsedBar = GetTemplateChild("PART_LeftCollapsedBar") as ContentPresenter;
			PART_RightCollapsedBar = GetTemplateChild("PART_RightCollapsedBar") as ContentPresenter;
			PART_TopHeader = GetTemplateChild("PART_TopHeader") as ContentPresenter;
			PART_BottomHeader = GetTemplateChild("PART_BottomHeader") as ContentPresenter;

			PART_LeftSplitter.DragStarted += PART_LeftSplitter_DragStarted;
			PART_RightSplitter.DragStarted += PART_RightSplitter_DragStarted;
			PART_TopSplitter.DragStarted += PART_TopSplitter_DragStarted;
			PART_BottomSplitter.DragStarted += PART_BottomSplitter_DragStarted;
			
			PART_LeftSplitter.DragCompleted += PART_LeftSplitter_DragCompleted;
			PART_RightSplitter.DragCompleted += PART_RightSplitter_DragCompleted;
			PART_TopSplitter.DragCompleted += PART_TopSplitter_DragCompleted;
			PART_BottomSplitter.DragCompleted += PART_BottomSplitter_DragCompleted;


			PART_LeftSplitter.MouseDoubleClick += GridSplitter_MouseDoubleClick;
			PART_RightSplitter.MouseDoubleClick += GridSplitter_MouseDoubleClick;
			PART_TopSplitter.MouseDoubleClick += GridSplitter_MouseDoubleClick;
			PART_BottomSplitter.MouseDoubleClick += GridSplitter_MouseDoubleClick;
		}
        void CollapseColumn(GridSplitter splitter, ColumnDefinition def, string content)
        {
            // Ignore collapse if popup is opened
            if (PopupManager.ActivePopup != null)
                return;

            int collapsed = 0;

            // Count the number of collapsed items (exclusing collapseView and rockScroll)
            for (int i = 0; i < OverviewContainerRootGrid.ColumnDefinitions.Count -2; i++)
            {
                if (OverviewContainerRootGrid.ColumnDefinitions[i].Width.Value == 0)
                    collapsed++;
            }

            // Only allowed to collapse when there are at least two columns which have Width > 0
            if (collapsed >= OverviewContainerRootGrid.ColumnDefinitions.Count - 3)
                return;

            GridColumnSizeHelper.SetPreviousGridLength(def, def.Width);

            //Start Collapse Column Animation, only when the column Width != 0
            if (def.Width != new GridLength(0))
            {
                Storyboard CollapseColumnGrid = (Storyboard)FindResource("CollapseColumn");
                Storyboard.SetTarget(CollapseColumnGrid, def);

                GridLengthAnimation gla = CollapseColumnGrid.Children[0] as GridLengthAnimation;
                gla.From = def.Width;
                gla.To = new GridLength(0);

                CollapseColumnGrid.Begin(this);
            }

            if (splitter != null)
                splitter.IsEnabled = false;

            collapseView.AddCollapsedView(def, content, delegate
            {
                //Start Expand Column Animation, only when the column Width = 0
                if (def.Width == new GridLength(0))
                {
                    def.Width = GridColumnSizeHelper.GetPreviousGridLength(def);
                    GridLength previousWidth = def.Width;
                    def.Width = new GridLength(0);

                    Storyboard ExpandColumnGrid = (Storyboard)FindResource("CollapseColumn");
                    Storyboard.SetTarget(ExpandColumnGrid, def);

                    GridLengthAnimation gla = ExpandColumnGrid.Children[0] as GridLengthAnimation;
                    gla.From = new GridLength(0);
                    gla.To = previousWidth;

                    ExpandColumnGrid.Begin(this);
                }

                if (splitter != null)
                    splitter.IsEnabled = true;
            });
        }
Esempio n. 11
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((OutlookUI_HOL.Window1)(target));
                return;

            case 2:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.myMainGridFirstColumn = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 4:
                this.myMainGridFirstColumnSplitter = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 5:
                this.StackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 6:
                this.myFoldersExpandersControl = ((OutlookUI_HOL.MyFoldersExpandersControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 12
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.toolBar1 = ((System.Windows.Controls.ToolBar)(target));
                return;

            case 2:

            #line 11 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 3:

            #line 12 "..\..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click_1);

            #line default
            #line hidden
                return;

            case 4:
                this.Slider1 = ((System.Windows.Controls.Slider)(target));

            #line 13 "..\..\..\MainWindow.xaml"
                this.Slider1.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.Slider1_ValueChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 6:
                this.listBox1 = ((System.Windows.Controls.ListBox)(target));

            #line 21 "..\..\..\MainWindow.xaml"
                this.listBox1.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.listBox1_SelectionChanged);

            #line default
            #line hidden
                return;

            case 7:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 8:
                this.richTextBox1 = ((System.Windows.Controls.RichTextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 13
0
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);
            initialized = true;
            ColumnDefinitions.Add(new ColumnDefinition ());
            ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(5) });
            ColumnDefinitions.Add(new ColumnDefinition());

            Children.Add(instances);
            instances.SelectionChanged += Instances_SelectionChanged;

            var splitter = new GridSplitter { Width = 5, HorizontalAlignment = HorizontalAlignment.Stretch };
            Children.Add(splitter);
            Grid.SetColumn(splitter, 1);
            Grid.SetRowSpan(splitter, 2);

            properties = new Properties { DataContext = null };
            var scrollViewer = new ScrollViewer {
                HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled,
                VerticalScrollBarVisibility = ScrollBarVisibility.Auto,
                Content = properties
            };
            Children.Add(scrollViewer);
            Grid.SetColumn(scrollViewer, 2);
            Update();
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._samplesTreeView = ((System.Windows.Controls.TreeView)(target));
                return;

            case 2:
                this._grid2 = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this._htmlPanel = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 4:
                this.Pannel = ((System.Windows.Controls.Grid)(target));
                return;

            case 5:
                this._splitter = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 6:
                this._webBrowser = ((System.Windows.Controls.WebBrowser)(target));
                return;

            case 7:
                this._htmlEditor = ((System.Windows.Controls.RichTextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 15
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.textBlock1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 2:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 3:
                this.gridSplitter2 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 4:
                this.button1 = ((System.Windows.Controls.Button)(target));
                return;

            case 5:
                this.button2 = ((System.Windows.Controls.Button)(target));
                return;

            case 6:
                this.button3 = ((System.Windows.Controls.Button)(target));
                return;

            case 7:
                this.button4 = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 16
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._panel = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 2:
                this._label = ((System.Windows.Controls.Border)(target));
                return;

            case 3:
                this._gridContainer = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 4:
                this._grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 5:
                this._vLine = ((System.Windows.Shapes.Line)(target));
                return;

            case 6:
                this._splitter = ((System.Windows.Controls.GridSplitter)(target));
                return;
            }
            this._contentLoaded = true;
        }
        public SplitNine()
        {
            Title = "Split Nine";

            Grid grid = new Grid();
            Content = grid;

            // Set row and column definitions.
            for (int i = 0; i < 3; i++)
            {
                grid.ColumnDefinitions.Add(new ColumnDefinition());
                grid.RowDefinitions.Add(new RowDefinition());
            }

            // Create 9 buttons.
            for (int x = 0; x < 3; x++)
                for (int y = 0; y < 3; y++)
                {
                    Button btn = new Button();
                    btn.Content = "Row " + y + " and Column " + x;
                    grid.Children.Add(btn);
                    Grid.SetRow(btn, y);
                    Grid.SetColumn(btn, x);
                }

            // Create splitter.
            GridSplitter split = new GridSplitter();
            split.Width = 6;
            grid.Children.Add(split);
            Grid.SetRow(split, 1);
            Grid.SetColumn(split, 1);
        }
Esempio n. 18
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/SilverlightDemo;component/MainPage.xaml", System.UriKind.Relative));
     this.accordionStyle        = ((System.Windows.Style)(this.FindName("accordionStyle")));
     this.tabContentBorderBrush = ((System.Windows.Media.LinearGradientBrush)(this.FindName("tabContentBorderBrush")));
     this.LayoutRoot            = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.sideBar            = ((System.Windows.Controls.Border)(this.FindName("sideBar")));
     this.ListScroller       = ((System.Windows.Controls.ScrollViewer)(this.FindName("ListScroller")));
     this.ListOfSamples      = ((System.Windows.Controls.StackPanel)(this.FindName("ListOfSamples")));
     this.expand             = ((System.Windows.Controls.Accordion)(this.FindName("expand")));
     this.gridSplitter       = ((System.Windows.Controls.GridSplitter)(this.FindName("gridSplitter")));
     this.tabPanel           = ((System.Windows.Controls.TabControl)(this.FindName("tabPanel")));
     this.tabSample          = ((System.Windows.Controls.TabItem)(this.FindName("tabSample")));
     this.mapFrameBorder     = ((System.Windows.Controls.Border)(this.FindName("mapFrameBorder")));
     this.ContentFrame       = ((System.Windows.Controls.Frame)(this.FindName("ContentFrame")));
     this.tabXaml            = ((System.Windows.Controls.TabItem)(this.FindName("tabXaml")));
     this.tabXamlScrollView  = ((System.Windows.Controls.ScrollViewer)(this.FindName("tabXamlScrollView")));
     this.txtXaml            = ((JeffWilcox.SyntaxHighlighting.SyntaxHighlightingTextBlock)(this.FindName("txtXaml")));
     this.tabSrc             = ((System.Windows.Controls.TabItem)(this.FindName("tabSrc")));
     this.tabSrcScrollView   = ((System.Windows.Controls.ScrollViewer)(this.FindName("tabSrcScrollView")));
     this.txtSrc             = ((JeffWilcox.SyntaxHighlighting.SyntaxHighlightingTextBlock)(this.FindName("txtSrc")));
     this.tabSrcVB           = ((System.Windows.Controls.TabItem)(this.FindName("tabSrcVB")));
     this.tabSrcScrollViewVB = ((System.Windows.Controls.ScrollViewer)(this.FindName("tabSrcScrollViewVB")));
     this.txtSrcExplain      = ((System.Windows.Controls.TextBox)(this.FindName("txtSrcExplain")));
     this.SampleCaption      = ((System.Windows.Controls.TextBlock)(this.FindName("SampleCaption")));
 }
Esempio n. 19
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.TopLine = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 2:
                this.Sections = ((System.Windows.Controls.WrapPanel)(target));
                return;

            case 3:
                this.LeftPart = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 4:
                this.slide = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 5:
                this.Right = ((System.Windows.Controls.ColumnDefinition)(target));
                return;

            case 6:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 7:
                this.ListDir = ((System.Windows.Controls.ListBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 20
0
        public SplitNine()
        {
            Title = "Split Nine";

            Grid grid = new Grid();
            grid.ShowGridLines = true;
            Content = grid;

            for (int i = 0; i < 3; i++)
            {
                grid.ColumnDefinitions.Add(new ColumnDefinition());
                grid.RowDefinitions.Add(new RowDefinition());
            }

            for (int x = 0; x < 3; x++)
            {
                for (int y = 0; y < 3; y++)
                {
                    Button btn = new Button();
                    btn.Content = "Row " + y + " and Column " + x;
                    grid.Children.Add(btn);
                    Grid.SetRow(btn, y);
                    Grid.SetColumn(btn, x);
                }
            }

            GridSplitter split = new GridSplitter();
            split.Width = 6;
            grid.Children.Add(split);
            Grid.SetRow(split, 1);
            Grid.SetColumn(split, 1);
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.label = ((System.Windows.Controls.Label)(target));
                return;

            case 2:
                this.label_Copy = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.label_Copy1 = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.button = ((System.Windows.Controls.Button)(target));
                return;

            case 5:
                this.textBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.textBox_Copy = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.textBox_Copy1 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 8:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.gridSplitter = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 10:
                this.button1 = ((System.Windows.Controls.Button)(target));
                return;

            case 11:
                this.button1_Copy = ((System.Windows.Controls.Button)(target));

            #line 24 "..\..\Accounts - Copy.xaml"
                this.button1_Copy.Click += new System.Windows.RoutedEventHandler(this.button1_Copy_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.button1_Copy1 = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }
        /// <summary>
        /// Creates an instance of the GridDefinitionBindingHack class.
        /// </summary>
        private GridDefinitionBindingHelper(GridSplitter s, BindableObject o, BindableProperty p, BindableProperty p2)
        {
            // preconditions

            Argument.IsNotNull("s", s);
            Argument.IsNotNull("o", o);
            Argument.IsNotNull("p", p);

            // implementation

            this.splitter = s;
            this.bindableObject = o;
            this.sizeProperty = p;
            this.visibleProperty = p2;

            // update the property if the column width/row height changes.
            s.MouseLeftButtonUp += delegate(object sender, MouseButtonEventArgs e)
            {
                this.AdjustPropertyValue();
            };

            // update the column width/row height if the property value changes.
            o.PropertyChanged += delegate(object sender, PropertyChangedEventArgs e)
            {
                if (e.PropertyName == this.sizeProperty.Name ||
                    (this.visibleProperty != null && e.PropertyName == this.visibleProperty.Name))
                {
                    this.AdjustDefinationValue();
                }
            };
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.trendChart = ((System.Windows.Forms.DataVisualization.Charting.Chart)(target));

            #line 19 "..\..\..\Chart\TredentDotChart.xaml"
                this.trendChart.MouseMove += new System.Windows.Forms.MouseEventHandler(this.trendChart_MouseMove);

            #line default
            #line hidden
                return;

            case 2:
                this.splitter = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 3:
                this.listFiles = ((Ai.Hong.Controls.CheckboxNameColorList)(target));
                return;

            case 4:
                this.txtDateTime = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 5:
                this.txtValue = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 24
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
     return;
     case 2:
     this.Toolbar = ((System.Windows.Controls.DockPanel)(target));
     return;
     case 3:
     this.showTvBtn = ((SugzTools.Controls.SgzButton)(target));
     return;
     case 4:
     this.AddFileBtn = ((SugzTools.Controls.SgzButton)(target));
     return;
     case 5:
     this.AddFolderBtn = ((SugzTools.Controls.SgzButton)(target));
     return;
     case 6:
     this.TvsPanel = ((System.Windows.Controls.DockPanel)(target));
     
     #line 79 "..\..\MView.xaml"
     this.TvsPanel.SizeChanged += new System.Windows.SizeChangedEventHandler(this.Treeview_SizeChanged);
     
     #line default
     #line hidden
     return;
     case 7:
     this.filesBtn = ((System.Windows.Controls.Primitives.ToggleButton)(target));
     return;
     case 8:
     this.maxFoldersBtn = ((System.Windows.Controls.Primitives.ToggleButton)(target));
     return;
     case 9:
     
     #line 100 "..\..\MView.xaml"
     ((System.Windows.Controls.TreeView)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.TreeView_MouseUp);
     
     #line default
     #line hidden
     return;
     case 10:
     this.foldersBtn = ((System.Windows.Controls.Primitives.ToggleButton)(target));
     return;
     case 11:
     
     #line 108 "..\..\MView.xaml"
     ((System.Windows.Controls.TreeView)(target)).MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.TreeView_MouseUp);
     
     #line default
     #line hidden
     return;
     case 12:
     this.gridSplitter = ((System.Windows.Controls.GridSplitter)(target));
     return;
     }
     this._contentLoaded = true;
 }
 private void AddSplitters()
 {
     for (int j = 1; j < root.RowDefinitions.Count; ++j) {
         GridSplitter gs = new GridSplitter();
         root.Children.Add(gs);
         gs.SetResourceReference(GridSplitter.StyleProperty, "ChatSplitter");
         Grid.SetRow(gs, j);
     }
 }
Esempio n. 26
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.gridSplitter = ((System.Windows.Controls.GridSplitter)(target));
     return;
     }
     this._contentLoaded = true;
 }
Esempio n. 27
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 4 "..\..\..\LootAnalyzerWindow.xaml"
                ((Ultima.Spy.Application.LootAnalyzerWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 3:

            #line 174 "..\..\..\LootAnalyzerWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.RefreshMobiles_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.Mobiles = ((System.Windows.Controls.ListBox)(target));
                return;

            case 5:
                this.NotificationSplitter = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 6:
                this.Results = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.UncategorizedItems = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 8:
                this.Loading = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 9:
                this.LoadingText = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 10:

            #line 223 "..\..\..\LootAnalyzerWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.AnalyzeMobiles_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 28
0
        public SplitTheClient()
        {
            Title = "Split the Client";

            Grid grid1 = new Grid();
            grid1.ColumnDefinitions.Add(new ColumnDefinition());
            grid1.ColumnDefinitions.Add(new ColumnDefinition());
            grid1.ColumnDefinitions.Add(new ColumnDefinition());
            grid1.ColumnDefinitions[1].Width = GridLength.Auto;
            Content = grid1;

            Button btn = new Button();
            btn.Content = "Button No.1";
            grid1.Children.Add(btn);
            Grid.SetRow(btn, 0);
            Grid.SetColumn(btn, 0);

            GridSplitter split = new GridSplitter();
            split.ShowsPreview = true;
            split.HorizontalAlignment = HorizontalAlignment.Center;
            split.VerticalAlignment = VerticalAlignment.Stretch;
            split.Width = 6;
            grid1.Children.Add(split);
            Grid.SetRow(split, 0);
            Grid.SetColumn(split, 1);

            Grid grid2 = new Grid();
            grid2.RowDefinitions.Add(new RowDefinition());
            grid2.RowDefinitions.Add(new RowDefinition());
            grid2.RowDefinitions.Add(new RowDefinition());
            grid2.RowDefinitions[1].Height = GridLength.Auto;
            grid1.Children.Add(grid2);
            Grid.SetRow(grid2, 0);
            Grid.SetColumn(grid2, 2);

            btn = new Button();
            btn.Content = "Button No.2";
            grid2.Children.Add(btn);
            Grid.SetRow(btn, 0);
            Grid.SetColumn(btn, 0);

            split = new GridSplitter();
            split.ShowsPreview = true;
            split.HorizontalAlignment = HorizontalAlignment.Stretch;
            split.VerticalAlignment = VerticalAlignment.Center;
            split.Height = 6;
            grid2.Children.Add(split);
            Grid.SetRow(split, 1);
            Grid.SetColumn(split, 0);

            btn = new Button();
            btn.Content = "Button No.3";
            grid2.Children.Add(btn);
            Grid.SetRow(btn, 2);
            Grid.SetColumn(btn, 0);
        }
Esempio n. 29
0
		private static void Fix(Grid grid, GridSplitter splitter)
		{
			var isColumn = splitter.HorizontalAlignment != HorizontalAlignment.Stretch;
			if (!isColumn && splitter.VerticalAlignment == VerticalAlignment.Stretch)
				isColumn = splitter.ActualWidth < splitter.ActualHeight;
			if (isColumn)
				FixColumn(grid, splitter);
			else
				FixRow(grid, splitter);
		}
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
         return;
     }
     this._contentLoaded = true;
 }
Esempio n. 31
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MyStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 2:
                this.txtFilePath = ((System.Windows.Controls.TextBox)(target));

            #line 34 "..\..\MainWindow.xaml"
                this.txtFilePath.KeyUp += new System.Windows.Input.KeyEventHandler(this.txtFilePath_KeyUp);

            #line default
            #line hidden
                return;

            case 3:
                this.comboBox1 = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 4:
                this.btnSearch1 = ((System.Windows.Controls.Button)(target));

            #line 54 "..\..\MainWindow.xaml"
                this.btnSearch1.Click += new System.Windows.RoutedEventHandler(this.StartSearch);

            #line default
            #line hidden
                return;

            case 5:
                this.gridSplitter = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 6:
                this.label = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 8:

            #line 115 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.ListView)(target)).MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.ListView_MouseDoubleClick);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 32
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MainWindow1 = ((WebKidzPlus.MainWindow)(target));
                return;

            case 2:
                this.HeaderMenu = ((System.Windows.Controls.Menu)(target));
                return;

            case 3:
                this.Menu_File = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 4:
                this.Menu_File_NewPoject = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 5:
                this.Menu_File_OpenPoject = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 6:
                this.Menu_File_CloseTab = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 7:
                this.Menu_File_ImportPoject = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 8:
                this.Menu_File_ClosePoject = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 9:
                this.Menu_File_About = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 10:
                this.ProjectList = ((System.Windows.Controls.TreeView)(target));
                return;

            case 11:
                this.tabControl = ((System.Windows.Controls.TabControl)(target));
                return;

            case 12:
                this.GridSpliterControl1 = ((System.Windows.Controls.GridSplitter)(target));
                return;
            }
            this._contentLoaded = true;
        }
        public SplitNine()
        {
            Title = "Split Nine";

            Grid grid = new Grid();
            Content = grid;

            // �׸��� 3��3 ����� �����.
            for (int i = 0; i < 3; i++)
            {
                grid.ColumnDefinitions.Add(new ColumnDefinition()); // �� �߰�
                grid.RowDefinitions.Add(new RowDefinition());       //�� �߰�
            }

            // 9���� ��ư�� �����.
            for (int x = 0; x < 3; x++)
                for (int y = 0; y < 3; y++)
                {
                    Button btn = new Button();
                    btn.Content = "Row " + y + " and Column " + x;
                    //btn.Margin = new Thickness(10);  // ���� �߰�
                    grid.Children.Add(btn);
                    Grid.SetRow(btn, y);  //���� �߰�
                    Grid.SetColumn(btn, x); // ���� �߰�.
                }

            ////��踦 �����.
            //for (int i = 0; i < 3; i++)
            //{
            //    for (int j = 0; j < 3; j++)
            //    {
            //        GridSplitter split = new GridSplitter();
            //        split.Width = 20;
            //        grid.Children.Add(split);
            //        Grid.SetRow(split, i);
            //        Grid.SetColumn(split, j);
            //    }
            //}

            GridSplitter split = new GridSplitter();

            //split.HorizontalAlignment = HorizontalAlignment.Center; //��������

            //split.HorizontalAlignment = HorizontalAlignment.Stretch;  //���� ������
            //split.VerticalAlignment = VerticalAlignment.Top;
            //split.Height = 30;

            //split.ResizeDirection = GridResizeDirection.Columns;  // �����̰� �����ϰ� �ϱ�

            grid.Children.Add(split);
            Grid.SetRow(split, 0);
            Grid.SetColumn(split, 1);
            Grid.SetRowSpan(split, 3);
        }
Esempio n. 34
0
		private static void FixRow(Grid grid, GridSplitter splitter)
		{
			var index = Grid.GetRow(splitter);
			if (index > 0 && index < grid.RowDefinitions.Count)
			{
				var space = grid.RowDefinitions[index - 1].ActualHeight + grid.RowDefinitions[index].ActualHeight + grid.RowDefinitions[index + 1].ActualHeight;
				if (grid.RowDefinitions[index - 1].Height.IsStar && grid.RowDefinitions[index + 1].Height.IsAbsolute)
					grid.RowDefinitions[index + 1].MaxHeight = space - grid.RowDefinitions[index - 1].MinHeight - grid.RowDefinitions[index].ActualHeight - 1;
				else if (grid.RowDefinitions[index - 1].Height.IsAbsolute && grid.RowDefinitions[index + 1].Height.IsStar)
					grid.RowDefinitions[index - 1].MaxHeight = space - grid.RowDefinitions[index + 1].MinHeight - grid.RowDefinitions[index].ActualHeight - 1;
			}
		}
Esempio n. 35
0
        /// <summary>
        /// Bind the the dimensions of the preview control to the associated grid splitter
        /// </summary> 
        /// <param name="gridSplitter">GridSplitter instance to target</param> 
        public void Bind(GridSplitter gridSplitter)
        { 
            Debug.Assert(gridSplitter != null);
            Debug.Assert(gridSplitter.Parent != null);
 
            this.Style = gridSplitter.PreviewStyle;
            this.Height = gridSplitter.ActualHeight;
            this.Width = gridSplitter.ActualWidth; 
            Matrix locationMatrix = ((MatrixTransform)gridSplitter.TransformToVisual((UIElement)gridSplitter.Parent)).Matrix; 
            SetValue(Canvas.LeftProperty, locationMatrix.OffsetX);
            SetValue(Canvas.TopProperty, locationMatrix.OffsetY); 
        }
Esempio n. 36
0
        private void RenderTriples()
        {
            if (this._grid == null) return;
            if (this._grid.RowDefinitions.Count > 1)
            {
                this._grid.RowDefinitions.RemoveRange(1, this._grid.RowDefinitions.Count - 1);
                this._grid.Children.RemoveRange(5, this._grid.Children.Count - 5);
            }

            int row = 1;
            foreach (Triple t in this._g.Triples)
            {
                RowDefinition def = new RowDefinition();
                def.Height = GridLength.Auto;
                this._grid.RowDefinitions.Add(def);

                Control s = this.RenderNode(t.Subject);
                this._grid.Children.Add(s);
                Grid.SetColumn(s, 0);
                Grid.SetRow(s, row);

                Control p = this.RenderNode(t.Predicate);
                this._grid.Children.Add(p);
                Grid.SetColumn(p, 2);
                Grid.SetRow(p, row);

                Control o = this.RenderNode(t.Object);
                this._grid.Children.Add(o);
                Grid.SetColumn(o, 4);
                Grid.SetRow(o, row);
                row++;

                this._grid.RowDefinitions.Add(new RowDefinition());
                GridSplitter rowSplitter = new GridSplitter();
                rowSplitter.HorizontalAlignment = HorizontalAlignment.Stretch;
                rowSplitter.Height = 1;
                rowSplitter.ResizeDirection = GridResizeDirection.Rows;
                rowSplitter.ResizeBehavior = GridResizeBehavior.PreviousAndNext;
                rowSplitter.Background = Brushes.Black;
                rowSplitter.Foreground = Brushes.Black;
                Grid.SetColumn(rowSplitter, 0);
                Grid.SetRow(rowSplitter, row);
                Grid.SetColumnSpan(rowSplitter, 5);
                this._grid.Children.Add(rowSplitter);
                row++;
            }

            Grid.SetRowSpan(this.split1, row + 1);
            Grid.SetRowSpan(this.split2, row + 1);

            this._grid.InvalidateVisual();
            ((ScrollViewer)this.FindName("scroll")).InvalidateScrollInfo();
        }
Esempio n. 37
0
		private static void FixColumn(Grid grid, GridSplitter splitter)
		{
			var index = Grid.GetColumn(splitter);
			if (index > 0 && index < grid.ColumnDefinitions.Count)
			{
				var space = grid.ColumnDefinitions[index - 1].ActualWidth + grid.ColumnDefinitions[index].ActualWidth + grid.ColumnDefinitions[index + 1].ActualWidth;
				if (grid.ColumnDefinitions[index - 1].Width.IsStar && grid.ColumnDefinitions[index + 1].Width.IsAbsolute)
					grid.ColumnDefinitions[index + 1].MaxWidth = space - grid.ColumnDefinitions[index - 1].MinWidth - grid.ColumnDefinitions[index].ActualWidth - 1;
				else if (grid.ColumnDefinitions[index - 1].Width.IsAbsolute && grid.ColumnDefinitions[index + 1].Width.IsStar)
					grid.ColumnDefinitions[index - 1].MaxWidth = space - grid.ColumnDefinitions[index + 1].MinWidth - grid.ColumnDefinitions[index].ActualWidth - 1;
			}
		}
Esempio n. 38
0
        public SplitterHandler()
        {
            Control = new EtoGrid {
                Handler = this
            };

            xcolumn = new swc.ColumnDefinition();
            Control.ColumnDefinitions.Add(xcolumn);
            Control.ColumnDefinitions.Add(new swc.ColumnDefinition()
            {
                Width = sw.GridLength.Auto
            });
            Control.ColumnDefinitions.Add(new swc.ColumnDefinition());

            ycolumn = new swc.RowDefinition();
            Control.RowDefinitions.Add(ycolumn);
            Control.RowDefinitions.Add(new swc.RowDefinition {
                Height = sw.GridLength.Auto
            });
            Control.RowDefinitions.Add(new swc.RowDefinition());

            splitter = new swc.GridSplitter
            {
                //Background = sw.SystemColors.ControlLightLightBrush,
                ResizeBehavior = swc.GridResizeBehavior.PreviousAndNext
            };
            pane1 = new swc.DockPanel {
                LastChildFill = true
            };
            pane2 = new swc.DockPanel {
                LastChildFill = true
            };


            Control.Children.Add(pane1);
            Control.Children.Add(splitter);
            Control.Children.Add(pane2);

            style = new sw.Style();
            style.Setters.Add(new sw.Setter(sw.FrameworkElement.VerticalAlignmentProperty, sw.VerticalAlignment.Stretch));
            style.Setters.Add(new sw.Setter(sw.FrameworkElement.HorizontalAlignmentProperty, sw.HorizontalAlignment.Stretch));

            UpdateOrientation();
            Control.Loaded      += Control_Loaded;
            Control.SizeChanged += (sender, e) => ResetMinMax();

            panel1VisibilityNotifier = new PropertyChangeNotifier(sw.UIElement.VisibilityProperty);
            panel1VisibilityNotifier.ValueChanged += HandlePanel1IsVisibleChanged;

            panel2VisibilityNotifier = new PropertyChangeNotifier(sw.UIElement.VisibilityProperty);
            panel2VisibilityNotifier.ValueChanged += HandlePanel2IsVisibleChanged;
        }
Esempio n. 39
0
        public ChartControl AddChart(Brush Background)
        {
            #region Add a grid splitter between multiple charts

            if (this.RowDefinitions.Count > 0)
            {

                var NewSplitterRow = new RowDefinition() {
                                         Height  = new GridLength(3, GridUnitType.Pixel)
                                     };

                this.Rows.Add((Byte) this.RowDefinitions.Count, NewSplitterRow);
                this.RowDefinitions.Add(NewSplitterRow);

                var NewSplitter = new GridSplitter() {
                                     Background           = Brushes.White,
                                     HorizontalAlignment  = System.Windows.HorizontalAlignment.Stretch,
                                     VerticalAlignment    = System.Windows.VerticalAlignment.Stretch
                                  };

                this.Children.Add(NewSplitter);
                Grid.SetRow(NewSplitter, this.Children.Count - 1);

            }

            #endregion

            #region Add a new chart control

            var NewChartRow = new RowDefinition() {
                                  Height = new GridLength(1, GridUnitType.Star)
                              };

            this.Rows.Add((Byte) this.RowDefinitions.Count, NewChartRow);
            this.RowDefinitions.Add(NewChartRow);

            var NewChart = new ChartControl() {
                               HorizontalAlignment  = System.Windows.HorizontalAlignment.Stretch,
                               VerticalAlignment    = System.Windows.VerticalAlignment.Stretch,
                               Background           = Background,
                               Width                = Double.NaN,
                               Height               = Double.NaN
                           };

            this.Children.Add(NewChart);
            this.Charts.Add((Byte) this.Charts.Count, NewChart);
            Grid.SetRow(NewChart, this.Children.Count - 1);

            return NewChart;

            #endregion
        }
Esempio n. 40
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.rssViewModel = ((MVCChecker.ViewModels.MVCFileViewModel)(target));
                return;

            case 2:
                this._TextBoxPath = ((System.Windows.Controls.TextBox)(target));

            #line 32 "..\..\MainWindow.xaml"
                this._TextBoxPath.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this._TextBoxPath_TextChanged);

            #line default
            #line hidden
                return;

            case 3:
                this.xamDataTree = ((Infragistics.Controls.Menus.XamDataTree)(target));

            #line 35 "..\..\MainWindow.xaml"
                this.xamDataTree.SelectedNodesCollectionChanged += new System.EventHandler <Infragistics.Controls.Menus.NodeSelectionEventArgs>(this.xamDataTree_SelectedNodesCollectionChanged);

            #line default
            #line hidden
                return;

            case 4:
                this._ListViewFile = ((System.Windows.Controls.ListBox)(target));

            #line 44 "..\..\MainWindow.xaml"
                this._ListViewFile.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this._ListViewFile_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 5:
                this._TextEditor = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 7:
                this.gridSplitter2 = ((System.Windows.Controls.GridSplitter)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 41
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.algorithm_introduction = ((MMAWPF.Algorithm)(target));

            #line 6 "..\..\..\Algorithm.xaml"
                this.algorithm_introduction.Closing += new System.ComponentModel.CancelEventHandler(this.algorithm_introduction_Closing);

            #line default
            #line hidden

            #line 6 "..\..\..\Algorithm.xaml"
                this.algorithm_introduction.Closed += new System.EventHandler(this.algorithm_introduction_Closed);

            #line default
            #line hidden
                return;

            case 2:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.treeView = ((System.Windows.Controls.TreeView)(target));

            #line 18 "..\..\..\Algorithm.xaml"
                this.treeView.MouseDoubleClick += new System.Windows.Input.MouseButtonEventHandler(this.treeView_MouseDoubleClick);

            #line default
            #line hidden
                return;

            case 4:
                this.algorithm = ((System.Windows.Controls.TreeViewItem)(target));
                return;

            case 5:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 6:
                this.contentTextBox = ((System.Windows.Forms.RichTextBox)(target));
                return;

            case 7:
                this.label = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 42
0
        private void addControl(int i, FrameworkElement child)
        {
            double breakHeight = 4;

            if (i == 0)
            {
                breakHeight = 0;
            }
            _grid.RowDefinitions.Add(new RowDefinition()
            {
                Height = new GridLength(breakHeight)
            });

            GridLength length;
            double     height = child.Height;

            if (double.IsNaN(height))
            {
                //length = GridLength.Auto;
                length = new GridLength(300);
            }
            else
            {
                length = new GridLength(height);
            }
            //length = GridLength.Auto;
            _grid.RowDefinitions.Add(new RowDefinition()
            {
                Height = length
            });


            System.Windows.Controls.GridSplitter gridSplitter =
                new System.Windows.Controls.GridSplitter()
            {
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment   = VerticalAlignment.Stretch,
                ResizeDirection     = GridResizeDirection.Rows,
                Background          = Brushes.LightGray,
                Tag = child
            };

            _grid.Children.Add(gridSplitter);
            Grid.SetRow(gridSplitter, i);
            Grid.SetColumn(gridSplitter, 0);
            Grid.SetColumnSpan(gridSplitter, 2);

            _grid.Children.Add(child);
            Grid.SetRow(child, i + 1);
            Grid.SetColumn(child, 1);
        }
Esempio n. 43
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.border1 = ((System.Windows.Controls.Border)(target));
                return;

            case 2:
                this.button1 = ((System.Windows.Controls.Button)(target));

            #line 24 "..\..\Window1.xaml"
                this.button1.Click += new System.Windows.RoutedEventHandler(this.button1_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.button2 = ((System.Windows.Controls.Button)(target));

            #line 27 "..\..\Window1.xaml"
                this.button2.Click += new System.Windows.RoutedEventHandler(this.button2_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 5:
                this.Text1 = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 7:
                this.Flow2 = ((System.Windows.Documents.FlowDocument)(target));
                return;

            case 8:
                this.Para2 = ((System.Windows.Documents.Paragraph)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Confirmation_Screen = ((Fast_Track_Flights.MainWindow)(target));
                return;

            case 2:
                this.Confirmation_Screen1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.Fast_Track_Flights = ((System.Windows.Controls.Label)(target));
                return;

            case 4:
                this.Flight_Selection = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 5:
                this.thankYouMessage = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.gridSplitter_Copy = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 7:
                this.mainMenu = ((System.Windows.Controls.Button)(target));
                return;

            case 8:
                this.departText = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.returnText = ((System.Windows.Controls.Label)(target));
                return;

            case 10:
                this.departureFlightGrid = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 11:
                this.returnFlightGrid = ((System.Windows.Controls.DataGrid)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 45
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.algorithm_introduction = ((MMAWPF.Algorithm)(target));

            #line 4 "..\..\Algorithm.xaml"
                this.algorithm_introduction.Closing += new System.ComponentModel.CancelEventHandler(this.algorithm_introduction_Closing);

            #line default
            #line hidden

            #line 4 "..\..\Algorithm.xaml"
                this.algorithm_introduction.Closed += new System.EventHandler(this.algorithm_introduction_Closed);

            #line default
            #line hidden
                return;

            case 2:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.treeView1 = ((System.Windows.Controls.TreeView)(target));
                return;

            case 4:
                this.algorithm = ((System.Windows.Controls.TreeViewItem)(target));
                return;

            case 5:
                this.documentViewer1 = ((System.Windows.Controls.DocumentViewer)(target));
                return;

            case 6:
                this.documentViewer2 = ((System.Windows.Controls.DocumentViewer)(target));
                return;

            case 7:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 8:
                this.gridSplitter2 = ((System.Windows.Controls.GridSplitter)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 46
0
        protected override void OnInitialized(EventArgs e)
        {
            base.OnInitialized(e);

            //_header = new Button { Background = Brushes.LightGray, HorizontalAlignment =HorizontalAlignment.Stretch , BorderBrush = Brushes.Transparent, HorizontalContentAlignment = HorizontalAlignment.Left};
            //_header.Click += _header_Click;
            _treeView = new TreeView();
            _treeView.SelectedItemChanged += _treeView_SelectedItemChanged;
            _properties = new Controls.Properties();

            ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(200) });
            ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(5) });
            ColumnDefinitions.Add(new ColumnDefinition());

            Children.Add(_treeView);

            var splitter = new GridSplitter { HorizontalAlignment = HorizontalAlignment.Stretch, Width = 5 };
            Children.Add(splitter);
            Grid.SetColumn(splitter, 1);

            Children.Add(_properties);
            Grid.SetColumn(_properties, 2);
            /*
            RowDefinitions.Add(new RowDefinition { Height = GridLength.Auto });
            Children.Add(_header);

            RowDefinitions.Add(new RowDefinition());
            var horizontalSplitterGrid = new System.Windows.Controls.Grid();
            horizontalSplitterGrid.ColumnDefinitions.Add(new ColumnDefinition());
            horizontalSplitterGrid.ColumnDefinitions.Add(new ColumnDefinition());
            Children.Add(horizontalSplitterGrid);
            Grid.SetRow(horizontalSplitterGrid, 1);
            _childrenGrid = new ChildrenGrid();
            horizontalSplitterGrid.Children.Add(_childrenGrid);
            Grid.SetColumn(_childrenGrid, 1);

            var verticalSplitterGrid = new System.Windows.Controls.Grid();
            verticalSplitterGrid.RowDefinitions.Add(new RowDefinition());
            verticalSplitterGrid.RowDefinitions.Add(new RowDefinition());
            
            verticalSplitterGrid.Children.Add(_treeView);
            
            verticalSplitterGrid.Children.Add(_valuesGrid);
            Grid.SetRow(_valuesGrid, 1);

            horizontalSplitterGrid.Children.Add(verticalSplitterGrid);
            */
            Update();
        }
Esempio n. 47
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((EightTracksWpfPlayer.Views.MainWindow)(target));
                return;

            case 4:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 5:
                this.txtUserEntry2 = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:
                this.mixesList = ((System.Windows.Controls.ListBox)(target));
                return;

            case 7:

            #line 513 "..\..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Documents.Hyperlink)(target)).RequestNavigate += new System.Windows.Navigation.RequestNavigateEventHandler(this.RequestNavigateHandler);

            #line default
            #line hidden
                return;

            case 8:

            #line 589 "..\..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Documents.Hyperlink)(target)).Click += new System.Windows.RoutedEventHandler(this.ShowAboutWindow);

            #line default
            #line hidden
                return;

            case 9:

            #line 595 "..\..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Documents.Hyperlink)(target)).RequestNavigate += new System.Windows.Navigation.RequestNavigateEventHandler(this.RequestNavigateHandler);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 48
0
		public void SizeAffectsResizeBehaviorResizeDirection ()
		{
			GridSplitter grid_splitter = new GridSplitter ();
			grid_splitter.Width = 100;
			grid_splitter.Height = 100;
			grid_splitter.HorizontalAlignment = HorizontalAlignment.Stretch;
			Window w = new Window ();
			w.Content = grid_splitter;
			w.Show ();
			Assert.AreEqual (grid_splitter.ResizeBehavior, GridResizeBehavior.BasedOnAlignment, "1");
			Assert.AreEqual (grid_splitter.ResizeDirection, GridResizeDirection.Auto, "2");
			grid_splitter.Height = 200;
			Assert.AreEqual (grid_splitter.ResizeBehavior, GridResizeBehavior.BasedOnAlignment, "3");
			Assert.AreEqual (grid_splitter.ResizeDirection, GridResizeDirection.Auto, "4");
		}
Esempio n. 49
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.dockPanel = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 2:
                this.quickviewer = ((System.Windows.Controls.Primitives.UniformGrid)(target));
                return;

            case 3:
                this.namespaceComboBox = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 4:
                this.classComboBox = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 5:
                this.memberComboBox = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 6:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 7:
                this.ex_textEditor = ((ICSharpCode.AvalonEdit.TextEditor)(target));
                return;

            case 8:
                this.splitter = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 9:
                this.textEditor = ((ICSharpCode.AvalonEdit.TextEditor)(target));

            #line 354 "..\..\EditorWindow.xaml"
                this.textEditor.SizeChanged += new System.Windows.SizeChangedEventHandler(this.textEditor_SizeChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/roxUpZen;component/MultiExplorerControl.xaml", System.UriKind.Relative));
     this.LayoutRoot    = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.grid1         = ((System.Windows.Controls.Grid)(this.FindName("grid1")));
     this.label1        = ((System.Windows.Controls.Label)(this.FindName("label1")));
     this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(this.FindName("gridSplitter1")));
     this.label2        = ((System.Windows.Controls.Label)(this.FindName("label2")));
     this.listBox1      = ((System.Windows.Controls.ListBox)(this.FindName("listBox1")));
     this.stackPanel3   = ((System.Windows.Controls.StackPanel)(this.FindName("stackPanel3")));
 }
Esempio n. 51
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 5 "..\..\..\..\Windows\ChatWindow.xaml"
                ((KailleraNET.ChatWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.grid1 = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.richTextBox1 = ((System.Windows.Controls.RichTextBox)(target));

            #line 15 "..\..\..\..\Windows\ChatWindow.xaml"
                this.richTextBox1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.richTextBox1_TextChanged);

            #line default
            #line hidden
                return;

            case 4:
                this.textBox1 = ((System.Windows.Controls.TextBox)(target));

            #line 16 "..\..\..\..\Windows\ChatWindow.xaml"
                this.textBox1.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.textBox1_TextChanged_1);

            #line default
            #line hidden
                return;

            case 5:
                this.listBox1 = ((System.Windows.Controls.ListBox)(target));
                return;

            case 6:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 52
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.OuterMainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.InnerMainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.ToolBoxGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 4:
                this.ToolBoxGridSplitter = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 5:
                this.ContentGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 6:
                this.ContentRegion = ((System.Windows.Controls.ContentControl)(target));
                return;

            case 7:
                this.ConentBottomGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 8:
                this.MessageInboxGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 9:
                this.TreeViewGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 10:
                this.ToolBoxGridSplitter_Copy = ((System.Windows.Controls.GridSplitter)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.tb_SelectEnsembleAlg = ((System.Windows.Controls.TextBlock)(target));

            #line 32 "..\..\..\..\Controls\TabsControls\TabEnsemble.xaml"
                this.tb_SelectEnsembleAlg.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.tb_SelectEnsembleAlg_MouseDown);

            #line default
            #line hidden
                return;

            case 2:
                this.bt_Run = ((System.Windows.Controls.Button)(target));

            #line 37 "..\..\..\..\Controls\TabsControls\TabEnsemble.xaml"
                this.bt_Run.Click += new System.Windows.RoutedEventHandler(this.bt_Run_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.uctrl_ListClusterAlgVisualizerClustering = ((ClusteringEnsembleSuite.Controls.Visualizers.ListClusterAlgVIsualizer)(target));
                return;

            case 4:
                this.gridSplitter1 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 5:
                this.uctrl_ListClusterAlgVisualizerEnsemble = ((ClusteringEnsembleSuite.Controls.Visualizers.ListClusterAlgVIsualizer)(target));
                return;

            case 6:
                this.gridSplitter2 = ((System.Windows.Controls.GridSplitter)(target));
                return;

            case 7:
                this.tb_output = ((System.Windows.Controls.TextBox)(target));
                return;
            }
            this._contentLoaded = true;
        }
        /// <summary>
        /// Creates an instance of the GridDefinitionBindingHack class.
        /// </summary>
        public GridDefinitionBindingHelper(ColumnDefinition c, ColumnDefinition cs, GridSplitter s, BindableObject o, BindableProperty p, BindableProperty p2)
            : this(s, o, p, p2)
        {
            // preconditions

            Argument.IsNotNull("c", c);
            Argument.IsNotNull("cs", cs);

            // implementation

            this.contentColDef = c;
            this.splitColDef = cs;

            this.cachedDefMin = c.MinWidth;

            this.AdjustDefinationValue();
        }
        /// <summary>
        /// Creates an instance of the GridDefinitionBindingHack class.
        /// </summary>
        public GridDefinitionBindingHelper(RowDefinition r, RowDefinition rs, GridSplitter s, BindableObject o, BindableProperty p, BindableProperty p2)
            : this(s, o, p, p2)
        {
            // preconditions

            Argument.IsNotNull("r", r);
            Argument.IsNotNull("rs", rs);

            // implementation

            this.contentRowDef = r;
            this.splitRowDef = rs;

            this.cachedDefMin = r.MinHeight;

            this.AdjustDefinationValue();
        }
        public ExploreDependencyProperties()
        {
            Title = "Explore Dependency Properties";

            // Create Grid as content of window.
            Grid grid = new Grid();
            Content = grid;

            // Three column definitions for Grid.
            ColumnDefinition col = new ColumnDefinition();
            col.Width = new GridLength(1, GridUnitType.Star);
            grid.ColumnDefinitions.Add(new ColumnDefinition());

            col = new ColumnDefinition();
            col.Width = GridLength.Auto;
            grid.ColumnDefinitions.Add(col);

            col = new ColumnDefinition();
            col.Width = new GridLength(3, GridUnitType.Star);
            grid.ColumnDefinitions.Add(col);

            // ClassHierarchyTreeView goes on left side.
            ClassHierarchyTreeView treevue =
                            new ClassHierarchyTreeView(typeof(DependencyObject));
            grid.Children.Add(treevue);
            Grid.SetColumn(treevue, 0);

            // GridSplitter goes in the center cell.
            GridSplitter split = new GridSplitter();
            split.HorizontalAlignment = HorizontalAlignment.Center;
            split.VerticalAlignment = VerticalAlignment.Stretch;
            split.Width = 6;
            grid.Children.Add(split);
            Grid.SetColumn(split, 1);

            // DependencyPropertyListView goes on right side.
            DependencyPropertyListView lstvue = new DependencyPropertyListView();
            grid.Children.Add(lstvue);
            Grid.SetColumn(lstvue, 2);

            // Set a binding between TreeView and ListView.
            lstvue.SetBinding(DependencyPropertyListView.TypeProperty,
                              "SelectedItem.Type");
            lstvue.DataContext = treevue;
        }
Esempio n. 57
0
        public static GridSplitter AddVerticalSplitter(this Grid grid)
        {
            if (grid.ColumnDefinitions.Count != 3)
                throw new ArgumentException("A vertical splitter can only be added to a grid with three column definitions.");
            if (!grid.ColumnDefinitions[1].Width.IsAbsolute)
                throw new ArgumentException("Splitter column must be set to an absolute width");

            var splitter = new GridSplitter
            {
                Width = grid.ColumnDefinitions[1].Width.Value,
                ResizeDirection = GridResizeDirection.Columns,
                ResizeBehavior = GridResizeBehavior.PreviousAndNext,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment = VerticalAlignment.Stretch
            };
            grid.Add(splitter, 0, 1);
            return splitter;
        }
        public RecurseDirectoriesIncrementally()
        {
            Title = "Recurse Directories Incrementally";

            // Create Grid as content of window.
            Grid grid = new Grid();
            Content = grid;

            // Define ColumnDefinition objects.
            ColumnDefinition coldef = new ColumnDefinition();
            coldef.Width = new GridLength(50, GridUnitType.Star);
            grid.ColumnDefinitions.Add(coldef);

            coldef = new ColumnDefinition();
            coldef.Width = GridLength.Auto;
            grid.ColumnDefinitions.Add(coldef);

            coldef = new ColumnDefinition();
            coldef.Width = new GridLength(50, GridUnitType.Star);
            grid.ColumnDefinitions.Add(coldef);

            // Put DirectoryTreeView at left.
            DirectoryTreeView tree = new DirectoryTreeView();
            tree.SelectedItemChanged += TreeViewOnSelectedItemChanged;
            grid.Children.Add(tree);
            Grid.SetColumn(tree, 0);

            // Put GridSplitter in center.
            GridSplitter split = new GridSplitter();
            split.Width = 6;
            split.ResizeBehavior = GridResizeBehavior.PreviousAndNext;
            grid.Children.Add(split);
            Grid.SetColumn(split, 1);

            // Put scrolled StackPanel at right.
            ScrollViewer scroll = new ScrollViewer();
            grid.Children.Add(scroll);
            Grid.SetColumn(scroll, 2);

            stack = new StackPanel();
            scroll.Content = stack;
        }
Esempio n. 59
0
		private void ItemsSourceReInitialize ()
			{
			TargetGrid.Children.Clear ();
			if (ItemsSource == null)
				return;
			object [] Items = ItemsSource.ToArray ();
			for (int Index = 0; Index < Items.Length; Index++)
				{
				object Item = Items[Index];
				ContentPresenter contentPresenter = new ContentPresenter
					{
					Content = Item
					};
				if (Index != Items.Length - 1)
					{
					GridSplitter gridSplitter = new GridSplitter
						{
						Height = 5,
						VerticalAlignment = VerticalAlignment.Bottom,
						HorizontalAlignment = HorizontalAlignment.Stretch,
						Background = new SolidColorBrush(Colors.DarkGray),
						ResizeDirection = GridResizeDirection.Rows
						};
					Grid.SetRow(gridSplitter, Index);
					contentPresenter.Margin = new Thickness(0,0,0,5);
					TargetGrid.Children.Add(gridSplitter);
					}

				Grid.SetRow (contentPresenter, Index);
				TargetGrid.Children.Add (contentPresenter);
				}
			TargetGrid.RowDefinitions.Clear ();
			while (TargetGrid.RowDefinitions.Count< Items.Length)
				{
				bool LastItem = TargetGrid.RowDefinitions.Count==Items.Length-1;
				TargetGrid.RowDefinitions.Add (new RowDefinition ()
					{
					Height = new GridLength(LastItem ? 1 : 0, LastItem ? GridUnitType.Star : GridUnitType.Auto)
					});
				}
			}
Esempio n. 60
0
        /// <summary>
        /// Bind the dimensions of the preview control to the associated grid splitter
        /// </summary>
        /// <param name="gridSplitter">GridSplitter instance to target</param>
        public void Bind(GridSplitter gridSplitter)
        {
            Debug.Assert(gridSplitter != null);
            Debug.Assert(gridSplitter.Parent != null);

            this.Style = gridSplitter.PreviewStyle;
            this.Height = gridSplitter.ActualHeight;
            this.Width = gridSplitter.ActualWidth;

            if (gridSplitter._resizeData != null)
            {
                _currentGridResizeDirection = gridSplitter._resizeData.ResizeDirection;
            }

            Matrix locationMatrix = ((MatrixTransform)gridSplitter.TransformToVisual((UIElement)gridSplitter.Parent)).Matrix;
            _gridSplitterOrigin.X = locationMatrix.OffsetX;
            _gridSplitterOrigin.Y = locationMatrix.OffsetY;

            SetValue(Canvas.LeftProperty, _gridSplitterOrigin.X);
            SetValue(Canvas.TopProperty, _gridSplitterOrigin.Y);
        }