public KryptonSplitContainerActionList(KryptonSplitContainerDesigner owner)
: base(owner.Component)
{
_splitContainer = owner.Component as KryptonSplitContainer;
// Assuming we were correctly passed an actual component...
if (_splitContainer != null)
{
// Get access to the actual Orientation propertry
PropertyDescriptor orientationProp = TypeDescriptor.GetProperties(_splitContainer)["Orientation"];
// If we succeeded in getting the property
if (orientationProp != null)
{
// Decide on the next action to take given the current setting
if ((Orientation)orientationProp.GetValue(_splitContainer) == Orientation.Vertical)
_action = "Horizontal splitter orientation";
else
_action = "Vertical splitter orientation";
}
}
// Cache service used to notify when a property has changed
_service = (IComponentChangeService)GetService(typeof(IComponentChangeService));
}