public viewcellitems()
        {
            #region creation de la view
            Nom_produit = new Label () {
                FontAttributes = FontAttributes.Bold,
                FontSize = 20,
                TextColor = Color.Black
            };
            Nom_produit.SetBinding (Label.TextProperty, "Nom_produit");

            var IconAnzeige = new Image ();
            IconAnzeige.SetBinding (Image.SourceProperty, new Binding ("IconName", BindingMode.OneWay, new StringToImageConverter ()));
            IconAnzeige.HeightRequest = 50;
            IconAnzeige.HorizontalOptions = LayoutOptions.EndAndExpand;
            IconAnzeige.VerticalOptions = LayoutOptions.End;

            Detail = new Label () {
                FontAttributes = FontAttributes.Bold,
                FontSize = 16,
                TextColor = Color.FromHex ("ff3498dc")
            };
            Detail.SetBinding (Label.TextProperty, "Detail");

            #region grid
            var rowdefdef = new RowDefinition {
                Height = GridLength.Auto,

            };
            var columndef = new ColumnDefinition {
                Width = GridLength.Auto
            };

            var grid = new Grid {
                HorizontalOptions = LayoutOptions.Fill,
                Padding = 5
            };
            grid.RowDefinitions.Add (rowdefdef);
            grid.ColumnDefinitions.Add (columndef);

            Nom_produit.SetValue (Grid.ColumnProperty, 0);
            Nom_produit.SetValue (Grid.RowProperty, 0);
            grid.Children.Add (Nom_produit);

            Detail.SetValue (Grid.ColumnProperty, 0);
            Detail.SetValue (Grid.RowProperty, 1);
            grid.Children.Add (Detail);

            IconAnzeige.SetValue (Grid.ColumnProperty, 1);
            IconAnzeige.SetValue (Grid.RowProperty, 0);
            grid.Children.Add (IconAnzeige);

            #endregion

            View = grid;

            #endregion
        }
Ejemplo n.º 2
0
        public CommitmentPage(Commitment commitment)
        {
            _commitment = commitment;
            BindingContext = commitment;

            var grid = new Grid() {
                RowDefinitions = new RowDefinitionCollection {
                    new RowDefinition(),
                    new RowDefinition(),
                },
                ColumnDefinitions = new ColumnDefinitionCollection {
                    new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) },
                    new ColumnDefinition { Width = new GridLength(2, GridUnitType.Star) },
                }
            };

            var plannedLabel = new Label {
                Text = "I am"
            };
            plannedLabel.SetValue(Grid.RowProperty, 0);

            var plannedTextCell = new TextCell {

            };
            plannedTextCell.SetBinding(TextCell.TextProperty, "Status");
            grid.Children.Add(plannedLabel);

            Content = grid;
        }
Ejemplo n.º 3
0
        void InitializeComponent()
        {
            var grid = new Grid();

            grid.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Auto
            });
            grid.RowDefinitions.Add(new RowDefinition {
                Height = GridLength.Star
            });
            grid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = GridLength.Star
            });
            grid.ColumnDefinitions.Add(new ColumnDefinition {
                Width = GridLength.Star
            });

            editor = new Editor
            {
                FontSize   = 12,
                FontFamily = "monospace",
            };
            editor.SetValue(Grid.ColumnProperty, 0);
            editor.SetValue(Grid.RowProperty, 1);

            results = new ContentView();
            results.SetValue(Grid.ColumnProperty, 1);
            results.SetValue(Grid.RowProperty, 1);

            var title = new Label
            {
                Text           = "XAML Editor",
                FontSize       = 24,
                FontAttributes = FontAttributes.Bold,
                Margin         = new Thickness(8),
            };

            title.SetValue(Grid.ColumnProperty, 0);
            title.SetValue(Grid.RowProperty, 0);

            grid.Children.Add(title);
            grid.Children.Add(editor);
            grid.Children.Add(results);

            Content = grid;
        }
Ejemplo n.º 4
0
        public void SetSubcontent(View subcontent)
        {
            _label.Margin = new Thickness(0, 10, 0, 0);
            _label.SetValue(RowSpanProperty, 1);
            _label.VerticalOptions = LayoutOptions.End;

            subcontent.VerticalOptions = LayoutOptions.Start;
            subcontent.Margin          = new Thickness(0, -5, 0, 15);

            this.Add(1, 1, subcontent);
        }
Ejemplo n.º 5
0
        public MyMenuItemView()
            : base(2, 2)
        {
            this.SetWidths(MyMenuView.IconSize, 0);
            this.SetHeights(MyMenuView.IconSize >> 1, 0);

            _icon = new MyIcon {
            };
            _icon.SetValue(RowSpanProperty, 2);

            _label = new Label {
                VerticalOptions = LayoutOptions.Center
            };
            _label.SetValue(RowSpanProperty, 2);

            this.Add(_icon);
            this.Add(0, 1, _label);
        }