</HorizontalStack>
</Border>
</Template>
- <Border Background="DimGray" BorderWidth="1" Margin="1" MinimumSize="100;100" MaximumSize="200;400" Height="-1" Width="-1">
+ <Border Background="DimGray" BorderWidth="1" Margin="1"
+ MinimumSize="{../../MinimumPopupSize}" MaximumSize="0;400"
+ Height="400" Width="{../WidthPolicy}">
<Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
- Height="200" Width="-1"
+ Height="{../HeightPolicy}" Width="{../WidthPolicy}"
ValueChanged="../../../_scroller_ValueChanged">
<VerticalStack LayoutChanged="../../../../_list_LayoutChanged"
- Height="-1" Width="-1" Name="List" Margin="0" VerticalAlignment="Top"/>
+ Height="-1" Width="{../../WidthPolicy}" Name="List" Margin="0" VerticalAlignment="Top"/>
</Scroller>
</Border>
</Popper>
<?xml version="1.0"?>
<VerticalStack>
- <ComboBox Width="120" Data="{TestList}" SelectedIndex="0"
+ <ComboBox Width="220" Data="{TestList}" SelectedIndex="0"
ItemTemplate="#Tests.Interfaces.colorItem.crow"/>
</VerticalStack>
\ No newline at end of file
using System;
+using System.Xml.Serialization;
namespace Crow
{
#region CTOR
public ComboBox() : base(){ }
#endregion
+
+ Size minimumPopupSize = "100;100";
+ [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);
+ }
}
}