Пример #1
0
        protected override void Init()
        {
            BindingContext = this;

            var cv1 = BindingWithConverter();
            var cv2 = WithTrigger();

            var grid = new Grid
            {
                RowDefinitions = new RowDefinitionCollection
                {
                    new RowDefinition()
                    {
                        Height = GridLength.Star
                    },
                    new RowDefinition()
                    {
                        Height = GridLength.Star
                    },
                }
            };

            grid.Children.Add(cv1);
            grid.Children.Add(cv2);
            Grid.SetRow(cv2, 1);

            Content = grid;

            Device.StartTimer(TimeSpan.FromMilliseconds(300), () =>
            {
                Device.BeginInvokeOnMainThread(() =>
                {
                    Source1.Add(new Item {
                        Text = Success1
                    });
                    Source2.Add(new Item {
                        Text = Success2
                    });
                });

                return(false);
            });
        }