private Constraint GetWidthFor(ExpandViewDirectionX expandTo, double desiredWidth) { switch (expandTo) { case ExpandViewDirectionX.None: { //We let the RelativeLayout to find the Width itself depending on the View return(null); } case ExpandViewDirectionX.Custom: { return(Constraint.RelativeToParent(p => desiredWidth)); } case ExpandViewDirectionX.ExpandParentWidth: { return(Constraint.RelativeToParent(p => p.Width)); } case ExpandViewDirectionX.ExpandViewHorizontallyBetween: { throw new NotImplementedException("This feature is not available yet"); } default: { return(Constraint.RelativeToParent(p => 0)); } } }
RelativeBuilder ExpandViewX(ExpandViewDirectionX expandViewDirection) { var transaction = _transactionManager.GetTransactionFor(_lastViewAddedToCollection); transaction.ExpandToX = expandViewDirection; return(this); }
private Constraint GetWidthFor(ExpandViewDirectionX expandTo, double desiredWidth) { switch (expandTo) { case ExpandViewDirectionX.None: { //We let the RelativeLayout to find the Width itself depending on the View return null; } case ExpandViewDirectionX.Custom: { return Constraint.RelativeToParent(p => desiredWidth); } case ExpandViewDirectionX.ExpandParentWidth: { return Constraint.RelativeToParent(p => p.Width); } case ExpandViewDirectionX.ExpandViewHorizontallyBetween: { throw new NotImplementedException("This feature is not available yet"); } default: { return Constraint.RelativeToParent(p=>0); } } }
RelativeBuilder ExpandViewX(ExpandViewDirectionX expandViewDirection) { var transaction = _transactionManager.GetTransactionFor(_lastViewAddedToCollection); transaction.ExpandToX = expandViewDirection; return this; }