public TFluent Content <TFluent2, T2> (FluentViewBase <TFluent2, T2> fluentView)
            where TFluent2 : FluentBase <T2>
            where T2 : View, new()
        {
            this.BuilderActions.Add(contentPage => {
                contentPage.Content = fluentView.Build();;
            });

            return(this as TFluent);
        }
Beispiel #2
0
        public TFluent View <TFluent2, T2> (FluentViewBase <TFluent2, T2> fluentView)
            where TFluent2 : FluentBase <T2>
            where T2 : View, new()
        {
            this.BuilderActions.Add(viewCell => {
                viewCell.View = fluentView.Build();
            });

            return(this as TFluent);
        }
Beispiel #3
0
        public TFluent AddChildVertical <TFluent2, T2> (FluentViewBase <TFluent2, T2> fluentView)
            where TFluent2 : FluentBase <T2>
            where T2 : View, new()
        {
            this.BuilderActions.Add(grid => {
                grid.Children.AddVertical(fluentView.Build());
            });

            return(this as TFluent);
        }
Beispiel #4
0
        public TFluent AddChild <TFluent2, T2> (FluentViewBase <TFluent2, T2> fluentView, int column = 0, int row = 0, int columnspan = 1, int rowspan = 1)
            where TFluent2 : FluentBase <T2>
            where T2 : View, new()
        {
            if (fluentView == null)
            {
                throw new ArgumentNullException("view");
            }
            if (column < 0)
            {
                throw new ArgumentOutOfRangeException("column");
            }
            if (row < 0)
            {
                throw new ArgumentOutOfRangeException("row");
            }
            if (columnspan <= 0)
            {
                throw new ArgumentOutOfRangeException("columnspan");
            }
            if (rowspan <= 0)
            {
                throw new ArgumentOutOfRangeException("rowspan");
            }

            this.BuilderActions.Add(grid => {
                var view = fluentView.Build();

                Grid.SetRow((BindableObject)view, row);
                Grid.SetRowSpan((BindableObject)view, rowspan);
                Grid.SetColumn((BindableObject)view, column);
                Grid.SetColumnSpan((BindableObject)view, columnspan);

                grid.Children.Add(view);
            });

            return(this as TFluent);
        }