diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-27 00:21:48 +0100 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2017-01-27 00:21:48 +0100 |
| commit | 8a25a19ee73e8b7c0c9726bbb2ce4ec918f4e905 (patch) | |
| tree | 8098ec3d8137c0dcc569db78fbdb4d6921187e28 /src/GraphicObjects/Popper.cs | |
| parent | a519d07929a490ac9bfade86355865744787f311 (diff) | |
icon menuitem, PopWidth and PopHeight, commands
Diffstat (limited to 'src/GraphicObjects/Popper.cs')
| -rw-r--r-- | src/GraphicObjects/Popper.cs | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/src/GraphicObjects/Popper.cs b/src/GraphicObjects/Popper.cs index 84088355..8c79ce24 100644 --- a/src/GraphicObjects/Popper.cs +++ b/src/GraphicObjects/Popper.cs @@ -38,6 +38,7 @@ namespace Crow string caption; Alignment popDirection; GraphicObject _content; + Measure popWidth, popHeight; public event EventHandler Pop; public event EventHandler Unpop; @@ -53,6 +54,26 @@ namespace Crow NotifyValueChanged ("Caption", caption); } } + [XmlAttributeAttribute()][DefaultValue("Fit")] + public virtual Measure PopWidth { + get { return popWidth; } + set { + if (popWidth == value) + return; + popWidth = value; + NotifyValueChanged ("PopWidth", popWidth); + } + } + [XmlAttributeAttribute()][DefaultValue("Fit")] + public virtual Measure PopHeight { + get { return popHeight; } + set { + if (popHeight == value) + return; + popHeight = value; + NotifyValueChanged ("PopHeight", popHeight); + } + } [XmlAttributeAttribute()][DefaultValue(false)] public bool IsPopped { @@ -164,18 +185,6 @@ namespace Crow } #region GraphicObject overrides - public override void OnLayoutChanges (LayoutingType layoutType) - { - base.OnLayoutChanges (layoutType); - - if (_content == null) - return; - - if (layoutType == LayoutingType.Width) - _content.MinimumSize = new Size (this.Slot.Width, _content.MinimumSize.Height); - } - - public override void onMouseClick (object sender, MouseButtonEventArgs e) { if (_canPop) |