public PictureContainer(Picture picture, CellsPanel parentViewport) : base(picture, parentViewport) { _pictureView = new PictureView(picture, base.ParentViewport); _pictureView.HorizontalAlignment = HorizontalAlignment.Stretch; _pictureView.VerticalAlignment = VerticalAlignment.Stretch; base.Content = _pictureView; }
public SpreadCharBaseContainer(SpreadChartBase spreadChart, Control c1Chart, CellsPanel parentViewport) : base(spreadChart, parentViewport) { _chartBaseView = CreateView(spreadChart, c1Chart); _chartBaseView.ParentViewport = base.ParentViewport; _chartBaseView.HorizontalAlignment = HorizontalAlignment.Stretch; _chartBaseView.VerticalAlignment = VerticalAlignment.Stretch; base.Content = _chartBaseView; }
public RowsLayer(CellsPanel p_owner) { _owner = p_owner; _rows = new Dictionary <int, RowItem>(); _recycledRows = new List <RowItem>(); HorizontalAlignment = HorizontalAlignment.Left; VerticalAlignment = VerticalAlignment.Top; Background = BrushRes.WhiteBrush; }
public RowItem(CellsPanel p_panel) { OwnPanel = p_panel; Row = -1; Cells = new Dictionary <int, CellItem>(); _recycledCells = new List <CellItem>(); HorizontalAlignment = HorizontalAlignment.Left; VerticalAlignment = VerticalAlignment.Top; }
public PictureView(Picture picture, CellsPanel parentViewport) { _picture = picture; ParentViewport = parentViewport; _backgroundRect = new Rectangle(); Children.Add(_backgroundRect); _image = new Image(); Children.Add(_image); SyncPictureView(); }
public SelectionLayer(CellsPanel viewport) { _owner = viewport; _activeSelectionRectangles = new List <Rectangle>(); _activeSelectionLayouts = new List <Rect>(); // 当前焦点区域的背景,由4个矩形组成,一般使用2个 var back = _owner.Excel.ActiveSheet.SelectionBackground; for (int i = 0; i < 4; i++) { Rectangle rectangle = new Rectangle(); rectangle.Fill = back; _activeSelectionRectangles.Add(rectangle); Children.Add(rectangle); } FocusIndicator = new SelectionFrame(_owner); Children.Add(FocusIndicator); }
public EditingLayer(CellsPanel parent) { _ownPanel = parent; EditorStatus = EditorStatus.Ready; Editor = new TextBox { BorderThickness = new Thickness(0.0), #if IOS Padding = new Thickness(4, -1, 0, 0), #else Padding = new Thickness(4, 5, 4, 4), #endif TextWrapping = TextWrapping.Wrap, Background = BrushRes.WhiteBrush, IsHitTestVisible = false, Opacity = 0d, }; Editor.TextChanged += EditorTextChanged; Children.Add(Editor); }
public SelectionFrame(CellsPanel owingViewport) { OwingViewport = owingViewport; _brush = new SolidColorBrush(owingViewport.Excel.ActiveSheet.SelectionBorderColor); _leftRectangle = new Rectangle(); _leftRectangle.Fill = _brush; _leftRectangle.Stroke = null; _leftRectangle.StrokeThickness = 0.0; _leftRectangle.Width = 3.0; Children.Add(_leftRectangle); _topRectangle = new Rectangle(); _topRectangle.Fill = _brush; _topRectangle.Stroke = null; _topRectangle.StrokeThickness = 0.0; _topRectangle.Height = 3.0; Children.Add(_topRectangle); _rightRectangle = new Rectangle(); _rightRectangle.Fill = _brush; _rightRectangle.Stroke = null; _rightRectangle.StrokeThickness = 0.0; _rightRectangle.Width = 3.0; Children.Add(_rightRectangle); _bottomRectangle = new Rectangle(); _bottomRectangle.Fill = _brush; _bottomRectangle.Stroke = null; _bottomRectangle.StrokeThickness = 0.0; _bottomRectangle.Height = 3.0; Children.Add(_bottomRectangle); // 右下矩形标志 _fillIndicator = new Rectangle(); _fillIndicator.Fill = _brush; Children.Add(_fillIndicator); _fillIndicatorPosition = FillIndicatorPosition.BottomRight; }
public BorderLayer(CellsPanel viewport) { _owner = viewport; }
public CellOverflowLayoutBuildEngine(CellsPanel viewport) { Viewport = viewport; _cachedLeftColumn = viewport.Excel.GetViewportLeftColumn(viewport.ColumnViewportIndex); _cachedRightColumn = viewport.Excel.GetViewportRightColumn(viewport.ColumnViewportIndex); }
public FloatingObjectContainer(Dt.Cells.Data.FloatingObject floatingObject, CellsPanel parentViewport) { _floatingObject = floatingObject; base.Visibility = floatingObject.Visible ? Visibility.Visible : Visibility.Collapsed; ParentViewport = parentViewport; Loaded += FloatingObjectContainer_Loaded; _outBorder = new Border(); _outBorder.BorderBrush = BorderBrush; _outBorder.Background = BorderGapBrush; _outBorder.BorderThickness = new Thickness(2.0); _outBorder.CornerRadius = new Windows.UI.Xaml.CornerRadius(5.0); base.Children.Add(_outBorder); _glyphGrid = new Grid(); base.Children.Add(_glyphGrid); RowDefinition definition = new RowDefinition(); definition.Height = new Windows.UI.Xaml.GridLength(7.0); _glyphGrid.RowDefinitions.Add(definition); _glyphGrid.RowDefinitions.Add(new RowDefinition()); RowDefinition definition2 = new RowDefinition(); definition2.Height = new Windows.UI.Xaml.GridLength(7.0); _glyphGrid.RowDefinitions.Add(definition2); ColumnDefinition definition3 = new ColumnDefinition(); definition3.Width = new Windows.UI.Xaml.GridLength(7.0); _glyphGrid.ColumnDefinitions.Add(definition3); _glyphGrid.ColumnDefinitions.Add(new ColumnDefinition()); ColumnDefinition definition4 = new ColumnDefinition(); definition4.Width = new Windows.UI.Xaml.GridLength(7.0); _glyphGrid.ColumnDefinitions.Add(definition4); _leftRect = new Rectangle(); _leftRect.Margin = new Thickness(-1.0, 0.0, 1.0, 0.0); _leftRect.Fill = BorderGapBrush; _glyphGrid.Children.Add(_leftRect); Grid.SetColumn(_leftRect, 0); Grid.SetRowSpan(_leftRect, 3); _topRect = new Rectangle(); _topRect.Margin = new Thickness(0.0, -1.0, 0.0, 1.0); _topRect.Fill = BorderGapBrush; _glyphGrid.Children.Add(_topRect); Grid.SetRow(_topRect, 0); Grid.SetColumnSpan(_topRect, 3); _rightRect = new Rectangle(); _rightRect.Margin = new Thickness(1.0, 0.0, -1.0, 0.0); _rightRect.Fill = BorderGapBrush; _glyphGrid.Children.Add(_rightRect); Grid.SetColumn(_rightRect, 2); Grid.SetRowSpan(_rightRect, 3); _bottomRect = new Rectangle(); _bottomRect.Margin = new Thickness(0.0, 1.0, 0.0, -1.0); _bottomRect.Fill = BorderGapBrush; _glyphGrid.Children.Add(_bottomRect); Grid.SetRow(_bottomRect, 2); Grid.SetColumnSpan(_bottomRect, 3); _topLeftRect = new Image(); _topLeftRect.Width = 7.0; _topLeftRect.Height = 7.0; _glyphGrid.Children.Add(_topLeftRect); Grid.SetRow(_topLeftRect, 0); Grid.SetColumn(_topLeftRect, 0); _topCentertRect = new Image(); _topCentertRect.Width = 15.0; _topCentertRect.Height = 3.0; _topCentertRect.VerticalAlignment = VerticalAlignment.Top; _glyphGrid.Children.Add(_topCentertRect); Grid.SetRow(_topCentertRect, 0); Grid.SetColumn(_topCentertRect, 1); _topRightRect = new Image(); _topRightRect.Width = 7.0; _topRightRect.Height = 7.0; _glyphGrid.Children.Add(_topRightRect); Grid.SetRow(_topRightRect, 0); Grid.SetColumn(_topRightRect, 2); _middleLeftRect = new Image(); _middleLeftRect.Width = 3.0; _middleLeftRect.Height = 15.0; _middleLeftRect.HorizontalAlignment = HorizontalAlignment.Left; _glyphGrid.Children.Add(_middleLeftRect); Grid.SetRow(_middleLeftRect, 1); Grid.SetColumn(_middleLeftRect, 0); _middleRightRect = new Image(); _middleRightRect.Width = 3.0; _middleRightRect.Height = 15.0; _middleRightRect.HorizontalAlignment = HorizontalAlignment.Right; _glyphGrid.Children.Add(_middleRightRect); Grid.SetRow(_middleRightRect, 1); Grid.SetColumn(_middleRightRect, 2); _bottomLeftRect = new Image(); _bottomLeftRect.Width = 7.0; _bottomLeftRect.Height = 7.0; _glyphGrid.Children.Add(_bottomLeftRect); Grid.SetRow(_bottomLeftRect, 2); Grid.SetColumn(_bottomLeftRect, 0); _bottomCenterRect = new Image(); _bottomCenterRect.Width = 15.0; _bottomCenterRect.Height = 3.0; _bottomCenterRect.VerticalAlignment = VerticalAlignment.Bottom; _glyphGrid.Children.Add(_bottomCenterRect); Grid.SetRow(_bottomCenterRect, 2); Grid.SetColumn(_bottomCenterRect, 1); _bottomRightRect = new Image(); _bottomRightRect.Width = 7.0; _bottomRightRect.Height = 7.0; _glyphGrid.Children.Add(_bottomRightRect); Grid.SetRow(_bottomRightRect, 2); Grid.SetColumn(_bottomRightRect, 2); LoadImages(); _innerBorder = new Border(); _innerBorder.BorderBrush = BorderBrush; _innerBorder.BorderThickness = new Thickness(2.0); _innerBorder.CornerRadius = new Windows.UI.Xaml.CornerRadius(10.0); Children.Add(_innerBorder); _contentPanel = new Border(); _contentPanel.Background = new SolidColorBrush(Colors.Transparent); Children.Add(_contentPanel); _defaultContent = new Border(); _contentPanel.Child = _defaultContent; UpdateElements(false); }
public SpreadChartContainer(SpreadChart spreadChart, Chart c1Chart, CellsPanel parentViewport) : base(spreadChart, c1Chart, parentViewport) { }
public FloatingObjectMovingLayer(CellsPanel parentViewport) { ParentViewport = parentViewport; }