public void Init() { var r = m_connection_type == rMindNodeConnectionType.Container ? 10 : 3; var colors = rMind.ColorContainer.rMindColors.GetInstance(); m_hit_area = new Rectangle { Fill = new SolidColorBrush(Colors.Transparent) }; m_template.Children.Add(m_hit_area); m_area = new Rectangle { Width = 20, Height = 20, RadiusX = r, RadiusY = r, StrokeThickness = 2, IsHitTestVisible = false }; UpdateAccentColor(); Margin = new Windows.UI.Xaml.Thickness(2, 6, 2, 6); m_template.Children.Add(m_area); SubscribeInput(); }
protected virtual void SetNodeOrientation(rMindNodeOriantation orientation) { m_node_orientation = orientation; Windows.UI.Xaml.Thickness thickness; switch (orientation) { case rMindNodeOriantation.Left: thickness = new Windows.UI.Xaml.Thickness(2, 6, 2, 6); break; case rMindNodeOriantation.Right: thickness = new Windows.UI.Xaml.Thickness(2, 6, 2, 6); break; case rMindNodeOriantation.Top: thickness = new Windows.UI.Xaml.Thickness(6, 2, 6, 2); break; case rMindNodeOriantation.Bottom: thickness = new Windows.UI.Xaml.Thickness(6, 2, 6, 2); break; default: thickness = new Windows.UI.Xaml.Thickness(2, 6, 2, 6); break; } Margin = thickness; }
private void SetBorder() { Control.BackgroundColor = new SolidColorBrush(Windows.UI.Colors.Transparent); var t = new Windows.UI.Xaml.Thickness(5); Control.BorderThickness = t; // 5; Control.BorderBrush = new SolidColorBrush(Windows.UI.Colors.Black); }
private void updateWidgetPadding() { var thickness = new Windows.UI.Xaml.Thickness(); thickness.Left = (double)widgetPaddingLeft; thickness.Top = (double)widgetPaddingTop; thickness.Right = (double)widgetPaddingRight; thickness.Bottom = (double)widgetPaddingBottom; this.Padding = thickness; }
private void NoBorder() { Windows.UI.Xaml.Thickness noThickness = new Windows.UI.Xaml.Thickness(0); textBox.BorderThickness = noThickness; //textBox.Padding = noThickness; //textBox.Margin = noThickness; //textBox.Background = null; }
protected override void OnAttached() { var textBox = Control as TextBox; if (textBox != null) { _old = textBox.BorderThickness; textBox.BorderThickness = new Thickness(0); } }
public SubGridUC(int columns, int rows, int subGridColumn, int subGridRow) : base(rows, columns)// Swop columns and rows values { margin = new Windows.UI.Xaml.Thickness(1); background.Color = Windows.UI.Colors.Gray; for (int row = 0; row < this.rows; row++) for (int column = 0; column < this.columns; column++) childElements[row][column] = new CellUC(columns, rows, subGridColumn, subGridRow, column, row); AddChildren(); }
public GridUC(int columns, int rows) : base(columns, rows) { margin = new Windows.UI.Xaml.Thickness(2); background.Color = Windows.UI.Colors.Black; for (int row = 0; row < rows; row++) for (int column = 0; column < columns; column++) childElements[row][column] = new SubGridUC(columns, rows, column, row); AddChildren(true); }
protected override void OnAttached() { var textBox = Control as TextBox; if (textBox == null) { return; } _old = textBox.BorderThickness; textBox.BorderThickness = new Windows.UI.Xaml.Thickness(0); }
protected override void OnElementChanged(ElementChangedEventArgs <ShapeView> e) { base.OnElementChanged(e); if (e.OldElement != null || Element == null) { return; } var converter = new ColorConverter(); var color = (SolidColorBrush)converter.Convert(Element.Color, null, null, null); var strockColor = (SolidColorBrush)converter.Convert(Element.StrokeColor, null, null, null); var margin = new Thickness(Element.Padding.Left, Element.Padding.Top, Element.Padding.Right, Element.Padding.Bottom); switch (Element.ShapeType) { case ShapeType.Box: _rectangle = new Rectangle { Fill = color, Stroke = strockColor, StrokeThickness = Element.StrokeWidth, Margin = margin, RadiusX = Element.CornerRadius, RadiusY = Element.CornerRadius, }; SetNativeControl(_rectangle); break; case ShapeType.Circle: _ellipse = new Ellipse { Fill = color, Stroke = strockColor, StrokeThickness = Element.StrokeWidth, Margin = margin }; SetNativeControl(_ellipse); break; case ShapeType.CircleIndicator: // TODO WinPhone circle indicator break; } }
public CellUC(int columns, int rows, int subGridColumn, int subGridRow, int cellColumn, int cellRow) : base(columns, rows) { isSet = false; byte colourValue = (byte)((10 + (subGridColumn + subGridRow) % 2 + (cellColumn + cellRow) % 2 * 3) << 4); // Add 1 and 3 to base index and multiply by 16 margin = new Windows.UI.Xaml.Thickness(0.5); background.Color = Color.FromArgb(255, colourValue, colourValue, colourValue); for (int row = 0; row < rows; row++) for (int column = 0; column < columns; column++) childElements[row][column] = new TextBlock { Text = (row * columns + column + 1).ToString(), FontSize = 20, Foreground = new Windows.UI.Xaml.Media.SolidColorBrush(Colors.Black), HorizontalAlignment = Windows.UI.Xaml.HorizontalAlignment.Center, VerticalAlignment = Windows.UI.Xaml.VerticalAlignment.Center }; AddChildren(); }
public static bool IsDefault(this Windows.UI.Xaml.Thickness cr) { return(cr == DefaultThickness); }
public bool Equals(Windows.UI.Xaml.Thickness thickness) { throw null; }
public static bool IsZero(this Windows.UI.Xaml.Thickness thick) { return(default(bool)); }
public static bool IsValid(this Windows.UI.Xaml.Thickness thick, bool allowNegative, bool allowNaN, bool allowPositiveInfinity, bool allowNegativeInfinity) { return(default(bool)); }
public static Windows.Foundation.Rect Inflate(this Windows.Foundation.Rect rect, Windows.UI.Xaml.Thickness thick) { return(default(Windows.Foundation.Rect)); }
public static Windows.Foundation.Size CollapseThickness(this Windows.UI.Xaml.Thickness thick) { return(default(Windows.Foundation.Size)); }