diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-06-02 10:44:23 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-06-02 10:44:23 +0200 |
| commit | b56c22ad826a49b7ea0013c1ca78cf64169fc326 (patch) | |
| tree | 588a3bc9ae0ed826012096a072b138a94ded4e61 /src/GraphicObjects/Button.cs | |
| parent | 999f18b6daf7db54879a85f0f8b5c7b22f740ce7 (diff) | |
TemplatedControls, Picture objects for pixmap and svg raw data sharing
among controls
Diffstat (limited to 'src/GraphicObjects/Button.cs')
| -rwxr-xr-x | src/GraphicObjects/Button.cs | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/GraphicObjects/Button.cs b/src/GraphicObjects/Button.cs index e4987fda..fcbdecd8 100755 --- a/src/GraphicObjects/Button.cs +++ b/src/GraphicObjects/Button.cs @@ -18,10 +18,10 @@ namespace go #region CTOR
public Button() : base()
{
- MouseEnter += delegate { Background = Color.Lion;};
- MouseLeave += delegate { Background = Color.Gray;};
- MouseButtonDown += delegate { Background = Color.Red;};
- MouseButtonUp += delegate { Background = Color.Gray;};
+ //MouseEnter += delegate { Background = Color.RedDevil;};
+ //MouseLeave += delegate { Background = Color.Transparent;};
+ MouseButtonDown += delegate { BackImgSub = "pressed"; registerForGraphicUpdate();};
+ MouseButtonUp += delegate { BackImgSub = "normal";registerForGraphicUpdate();};
}
#endregion
@@ -36,7 +36,7 @@ namespace go get { return base.Height; }
set { base.Height = value; }
}
- [XmlAttributeAttribute()][DefaultValue("Gray")]
+ [XmlAttributeAttribute()][DefaultValue("Transparent")]
public override Color Background {
get { return base.Background; }
set { base.Background = value; }
@@ -46,8 +46,17 @@ namespace go {
get { return base.Focusable; }
set { base.Focusable = value; }
- }
-
+ }
+ [XmlAttributeAttribute()][DefaultValue("#go.Images.Icons.buttest4.svg")]
+ public override Picture BackgroundImage {
+ get {
+ return base.BackgroundImage;
+ }
+ set {
+ base.BackgroundImage = value;
+ BackImgSub = "normal";
+ }
+ }
#endregion
[XmlAttributeAttribute][DefaultValue("Button")]
|