コード例 #1
0
 public static Offset AsOffset(this BorderPlacement self)
 {
     return(new Offset(
                self.Offset(BorderPlacement.Left),
                self.Offset(BorderPlacement.Top),
                self.Offset(BorderPlacement.Right),
                self.Offset(BorderPlacement.Bottom)));
 }
コード例 #2
0
 private void DrawBorder(FrameworkElement item)
 {
     if (editor != null && editor.Visibility != Visibility.Visible)
     {
         if (adornerPanel.Children.Contains(_border))
         {
             adornerPanel.Children.Remove(_border);
         }
         _border = new Border {
             BorderBrush = Brushes.Gray, BorderThickness = new Thickness(1.4), ToolTip = "Edit this Text", SnapsToDevicePixels = true
         };
         var shadow = new DropShadowEffect {
             Color = Colors.LightGray, ShadowDepth = 3
         };
         _border.Effect = shadow;
         var bp = new BorderPlacement(item);
         AdornerPanel.SetPlacement(_border, bp);
         adornerPanel.Children.Add(_border);
     }
 }
コード例 #3
0
		private void DrawBorder(FrameworkElement item)
		{
			if (editor != null && editor.Visibility != Visibility.Visible) {
				if (adornerPanel.Children.Contains(_border))
					adornerPanel.Children.Remove(_border);
				_border = new Border {BorderBrush = Brushes.Gray, BorderThickness = new Thickness(1.4), ToolTip = "Edit this Text", SnapsToDevicePixels = true};
				var shadow = new DropShadowEffect {Color = Colors.LightGray, ShadowDepth = 3};
				_border.Effect = shadow;
				var bp = new BorderPlacement(item);
				AdornerPanel.SetPlacement(_border, bp);
				adornerPanel.Children.Add(_border);
			}
		}
コード例 #4
0
 public static Vector AsVector(this BorderPlacement self)
 {
     return(new Vector(
                self.Offset(BorderPlacement.Left),
                self.Offset(BorderPlacement.Top)));
 }
コード例 #5
0
 public static int Offset(this BorderPlacement self, BorderPlacement border) => self.HasBorder(border) ? 1 : 0;
コード例 #6
0
 public static bool HasBorder(this BorderPlacement self, BorderPlacement border) => (self & border) == border;
コード例 #7
0
 /// <summary>
 /// Adds a border to the stylesheet.
 /// </summary>
 /// <param name="placement">The border's cell placement.</param>
 /// <param name="style">The border's style.</param>
 /// <param name="color">The border's color.</param>
 /// <returns>The stylesheet position index associated with the element.</returns>
 public uint AddBorder(BorderPlacement placement, OpenXml.BorderStyleValues style, in Color color)