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))); }
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); } }
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); } }
public static Vector AsVector(this BorderPlacement self) { return(new Vector( self.Offset(BorderPlacement.Left), self.Offset(BorderPlacement.Top))); }
public static int Offset(this BorderPlacement self, BorderPlacement border) => self.HasBorder(border) ? 1 : 0;
public static bool HasBorder(this BorderPlacement self, BorderPlacement border) => (self & border) == border;
/// <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)