Example #1
0
        public override void Run(Window window)
        {
            Background bg = new Background(window)
            {
                AlignmentX = -1,
                AlignmentY = -1,
                WeightX    = 1,
                WeightY    = 1,
                Color      = Color.Black
            };

            bg.Show();
            window.AddResizeObject(bg);

            Conformant conformant = new Conformant(window);

            conformant.Show();
            Box box = new Box(window);

            box.Geometry = window.GetInnerSquare();
            box.Show();

            Entry entry = new Entry(window)
            {
                AlignmentX   = -1,
                AlignmentY   = 1,
                WeightX      = 1,
                WeightY      = 1,
                IsSingleLine = true,
                Text         = "Hello, Tizen"
            };

            var btn = new Button(window)
            {
                AlignmentX = -1,
                AlignmentY = 1,
                WeightX    = 1,
                WeightY    = 1,
                Text       = "Set Filter"
            };

            btn.Show();

            //var filter = new Entry.TextFilter(SetFilter);
            btn.Clicked += (s, e) =>
            {
                entry.AppendMarkUpFilter(SetFilter);
            };

            var btn1 = new Button(window)
            {
                AlignmentX = -1,
                AlignmentY = 1,
                WeightX    = 1,
                WeightY    = 1,
                Text       = "Remove Filter"
            };

            btn1.Show();
            btn1.Clicked += (s, e) =>
            {
                entry.RemoveMarkUpFilter(SetFilter);
            };

            //entry.AppendMarkUpFilter(new Entry.Filter(SetFilter));

            entry.Show();
            box.PackEnd(entry);
            box.PackEnd(btn);
            box.PackEnd(btn1);
        }