Esempio n. 1
0
        private Constraint GetHeightFor(ExpandViewDirectionY expandTo, double desiredHeight)
        {
            switch (expandTo)
            {
            case ExpandViewDirectionY.None:
            {
                //We let the RelativeLayout to find the Height itself depending on the View

                return(null);
            }

            case ExpandViewDirectionY.Custom:
            {
                return(Constraint.RelativeToParent(p => desiredHeight));
            }

            case ExpandViewDirectionY.ExpandParentHeight:
            {
                return(Constraint.RelativeToParent(p => p.Height));
            }

            case ExpandViewDirectionY.ExpandViewVerticallyBetween:
            {
                throw new NotImplementedException("This feature is not available yet");
            }

            default:
            {
                return(Constraint.RelativeToParent(p => 0));
            }
            }
        }
Esempio n. 2
0
        RelativeBuilder ExpandViewY(ExpandViewDirectionY expandViewDirection)
        {
            var transaction = _transactionManager.GetTransactionFor(_lastViewAddedToCollection);

            transaction.ExpandToY = expandViewDirection;

            return(this);
        }
		private Constraint GetHeightFor(ExpandViewDirectionY expandTo, double desiredHeight)
        {
            switch (expandTo)
            {
			case ExpandViewDirectionY.None:
				{
					//We let the RelativeLayout to find the Height itself depending on the View

					return null;
				}
			case ExpandViewDirectionY.Custom:
				{
					return Constraint.RelativeToParent(p => desiredHeight);
				}
			case ExpandViewDirectionY.ExpandParentHeight:
				{
					return Constraint.RelativeToParent(p => p.Height);
				}
			case ExpandViewDirectionY.ExpandViewVerticallyBetween:
                    {
						throw new NotImplementedException("This feature is not available yet");
                    }
                default:
                    {
						return Constraint.RelativeToParent(p=>0);
                    }
            }
        }
		RelativeBuilder ExpandViewY(ExpandViewDirectionY expandViewDirection)
		{
			var transaction = _transactionManager.GetTransactionFor(_lastViewAddedToCollection);

			transaction.ExpandToY = expandViewDirection;

			return this;
		}