public SizeD GetMinimumSize(INode node) { SizeD result = delegateProvider != null?delegateProvider.GetMinimumSize(node) : SizeD.Empty; foreach (ILabel label in node.Labels) { INodeSizeConstraintProvider provider = label.LayoutParameter.Model.Lookup <INodeSizeConstraintProvider>(); if (provider != null) { result = SizeD.Max(result, provider.GetMinimumSize(node)); } } return(result); }
public SizeD GetMinimumSize(INode item) { SizeD result = delegateProvider != null?delegateProvider.GetMinimumSize(item) : SizeD.Empty; foreach (ILabel label in item.Labels) { var labelModel = label.LayoutParameter.Model; // we only want to do this for InteriorStretchLabelModel if (labelModel is InteriorStretchLabelModel) { INodeSizeConstraintProvider provider = labelModel.Lookup <INodeSizeConstraintProvider>(); if (provider != null) { result = SizeD.Max(result, provider.GetMinimumSize(item)); } } } return(result); }