File size: 1,772 Bytes
b1b3bae |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
using Eto.Drawing;
using Eto.Forms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DWSIM.ExtensionMethods.Eto
{
public class Border : Panel
{
private readonly Panel containingPanel;
private readonly Panel borderPanel;
public Border()
{
this.containingPanel = new Panel();
this.borderPanel = new Panel();
this.borderPanel.Content = this.containingPanel;
base.Content = this.borderPanel;
this.borderPanel.BackgroundColor = SystemColors.ControlText;
this.containingPanel.BackgroundColor = SystemColors.Control;
}
public new Color BackgroundColor
{
get
{
return this.containingPanel.BackgroundColor;
}
set
{
this.containingPanel.BackgroundColor = value;
}
}
public Color BorderColor
{
get
{
return this.borderPanel.BackgroundColor;
}
set
{
this.borderPanel.BackgroundColor = value;
}
}
public int BorderThickness
{
get
{
return this.borderPanel.Padding.Left;
}
set
{
this.borderPanel.Padding = new Padding(value);
}
}
public new Control Content
{
get
{
return this.containingPanel.Content;
}
set
{
this.containingPanel.Content = value;
}
}
}
}
|