aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/GraphicObjects/ComboBox.cs
blob: 8888696db78ffb7309576bf51db081f84c666f02 (plain)
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
using System;
using System.Xml.Serialization;

namespace Crow
{
	[DefaultStyle("#Crow.Styles.ComboBox.style")]
	[DefaultTemplate("#Crow.Templates.ComboBox.goml")]
	public class ComboBox : ListBox
    {		
		#region CTOR
		public ComboBox() : base(){	}	
		#endregion

		Size minimumPopupSize = "10;10";
		[XmlIgnore]public Size MinimumPopupSize{
			get { return minimumPopupSize; }
			set {
				minimumPopupSize = value;
				NotifyValueChanged ("MinimumPopupSize", minimumPopupSize);
			}
		}

		public override void OnLayoutChanges (LayoutingType layoutType)
		{
			base.OnLayoutChanges (layoutType);

			if (layoutType == LayoutingType.Width)
				MinimumPopupSize = new Size (this.Slot.Width, minimumPopupSize.Height);			
		}
	}
}