void UpdateOrientation() { if (orientation == Orientation.Horizontal) { splitter.ResizeDirection = swc.GridResizeDirection.Columns; splitter.HorizontalAlignment = sw.HorizontalAlignment.Left; splitter.VerticalAlignment = sw.VerticalAlignment.Stretch; splitter.SetValue(swc.Grid.RowSpanProperty, 3); pane1.SetValue(swc.Grid.RowSpanProperty, 3); pane2.SetValue(swc.Grid.RowSpanProperty, 3); splitter.SetValue(swc.Grid.ColumnSpanProperty, 1); pane1.SetValue(swc.Grid.ColumnSpanProperty, 1); pane2.SetValue(swc.Grid.ColumnSpanProperty, 1); swc.Grid.SetColumn(splitter, 1); swc.Grid.SetRow(splitter, 0); swc.Grid.SetColumn(pane2, 2); swc.Grid.SetRow(pane2, 0); splitter.Width = splitterWidth; splitter.Height = double.NaN; } else { splitter.ResizeDirection = swc.GridResizeDirection.Rows; splitter.HorizontalAlignment = sw.HorizontalAlignment.Stretch; splitter.VerticalAlignment = sw.VerticalAlignment.Top; pane2.VerticalAlignment = sw.VerticalAlignment.Stretch; splitter.SetValue(swc.Grid.RowSpanProperty, 1); pane1.SetValue(swc.Grid.RowSpanProperty, 1); pane2.SetValue(swc.Grid.RowSpanProperty, 1); splitter.SetValue(swc.Grid.ColumnSpanProperty, 3); pane1.SetValue(swc.Grid.ColumnSpanProperty, 3); pane2.SetValue(swc.Grid.ColumnSpanProperty, 3); swc.Grid.SetColumn(splitter, 0); swc.Grid.SetRow(splitter, 1); swc.Grid.SetColumn(pane2, 0); swc.Grid.SetRow(pane2, 2); splitter.Width = double.NaN; splitter.Height = splitterWidth; } UpdateColumnSizing(position.HasValue || !double.IsNaN(relative)); }
void UpdateOrientation() { if (orientation == SplitterOrientation.Horizontal) { splitter.ResizeDirection = swc.GridResizeDirection.Columns; splitter.HorizontalAlignment = sw.HorizontalAlignment.Left; splitter.VerticalAlignment = sw.VerticalAlignment.Stretch; splitter.SetValue(swc.Grid.RowSpanProperty, 3); pane1.SetValue(swc.Grid.RowSpanProperty, 3); pane2.SetValue(swc.Grid.RowSpanProperty, 3); splitter.SetValue(swc.Grid.ColumnSpanProperty, 1); pane1.SetValue(swc.Grid.ColumnSpanProperty, 1); pane2.SetValue(swc.Grid.ColumnSpanProperty, 1); swc.Grid.SetColumn(splitter, 1); swc.Grid.SetRow(splitter, 0); swc.Grid.SetColumn(pane2, 2); swc.Grid.SetRow(pane2, 0); splitter.Width = 5; splitter.Height = double.NaN; } else { splitter.ResizeDirection = swc.GridResizeDirection.Rows; splitter.HorizontalAlignment = sw.HorizontalAlignment.Stretch; splitter.VerticalAlignment = sw.VerticalAlignment.Top; pane2.VerticalAlignment = sw.VerticalAlignment.Stretch; splitter.SetValue(swc.Grid.RowSpanProperty, 1); pane1.SetValue(swc.Grid.RowSpanProperty, 1); pane2.SetValue(swc.Grid.RowSpanProperty, 1); splitter.SetValue(swc.Grid.ColumnSpanProperty, 3); pane1.SetValue(swc.Grid.ColumnSpanProperty, 3); pane2.SetValue(swc.Grid.ColumnSpanProperty, 3); swc.Grid.SetColumn(splitter, 0); swc.Grid.SetRow(splitter, 1); swc.Grid.SetColumn(pane2, 0); swc.Grid.SetRow(pane2, 2); splitter.Width = double.NaN; splitter.Height = 5; } }