Пример #1
0
        public TextPivotItem(int width)
        {
            this.Title = "text";
            this.textWidth = width - 3;

            var sv = new ScrollViewer
            {
                Location = new Point(21, 0),
                Size = new Size(width, 10), // Height will be set by the Pivot
                ShowScrollbars = true,
                VerticalScroll = true
            };

            sv.Content = new DelegateUIElement
            {
                Size = new Size(sv.Size.Width, 950),
                DrawingAction = this.DrawTextSamples
            };

            this.Body = sv;
        }
Пример #2
0
        public TextPage()
            : base("FLEUX DEMO", "text sample")
        {
            this.LeftMenu.DisplayText = "Back";
            this.LeftMenu.OnClickAction = this.Close;

            var sv = new ScrollViewer
            {
                Size = new Size(this.Content.Size.Width - 19, this.Content.Size.Height),
                Location = new Point(21, 0),
                ShowScrollbars = true,
                VerticalScroll = true
            };

            sv.Content = new DelegateUIElement
            {
                Size = new Size(sv.Size.Width, 950),
                DrawingAction = this.DrawTextSamples
            };

            this.Content.AddElement(sv.AnimateHorizontalEntrance(true));

            this.Control.ShadowedAnimationMode = Fleux.Controls.FleuxControl.ShadowedAnimationOptions.FromRight;
        }
Пример #3
0
        private PivotItem CreateFontPage()
        {
            var page = new PivotItem { Title = "incoming", };
            var stackPanel = new StackPanel { Size = new Size(480, 700) };

            var scroller = new ScrollViewer
            {
                Content = stackPanel,
                Location = new Point(0, 0),
                ShowScrollbars = true,
                HorizontalScroll = false,
                VerticalScroll = true,
            };

            stackPanel.AddElement(
                new TextBox(this)
                    {
                        Size = new Size(300, 50),
                        MultiLine = false,
                        Text = "abc",
                    });

            stackPanel.AddElement(
                new TextBox(this)
                {
                    Size = new Size(300, 150),
                    MultiLine = true,
                    Text = "abc\n123",
                });

            stackPanel.AddElement(
                new FileSettingsControl(this)
                {
                }
                );

            stackPanel.AddElement(
                new StringSettingsControl(this)
                {
                    Value = "123",
                    Caption = "Name",
                }
                );

            page.Body = scroller;
            return page;
        }
Пример #4
0
        private PivotItem CreateFirstPage()
        {
            var page = new PivotItem { Title = "incoming", };
            _stackPanel = new StackPanel { Size = new Size(480, 700) };

            var scroller = new ScrollViewer
            {
                Content = _stackPanel,
                Location = new Point(0, 0),
                ShowScrollbars = true,
                HorizontalScroll = false,
                VerticalScroll = true,
            };

            page.Body = scroller;
            return page;
        }
Пример #5
0
        public HomeScreen()
            : base(true)
        {
            this.Control.EntranceDuration = 500;
            homeScreenCanvas = new Canvas { Size = new Size(960, 740) };
            var canvas = new Canvas() { Size = new Size(400, 1203) };

            tiles.Add(this.CreateTile("Phone", 28, 93));
            tiles.Add(this.SetEntranceAnimationFromLeft(new PeopleTile(213, 93)));
            tiles.Add(this.CreateTile("Messaging", 28, 278));
            tiles.Add(this.CreateTile("Email", 213, 278));
            tiles.Add(this.CreateTile("Internet", 28, 463));
            tiles.Add(this.CreateTile("Games", 213, 463));
            tiles.Add(this.CreateTile("Calendar", 28, 648, true));
            tiles.Add(this.CreateTile("Pictures", 28, 833, true));
            tiles.Add(this.CreateTile("Zune", 28, 1018));
            tiles.Add(this.CreateTile("Marketplace", 213, 1018));

            tiles.ForEach(el => { canvas.AddElement(el); this.SetExitAnimationToLeft(el, this.ShowGames); });

            var sv = new ScrollViewer
            {
                Content = canvas,
                Size = new Size(400, this.Size.Height - 62),
                Location = new Point(0, 0),
                VerticalScroll = true,
            };

            this.homeScreenCanvas.AddElement(sv);

            this.Control.AddElement(new SoftKeys()
            {
                Size = new Size(480, 60),
                Location = new Point(0, this.Size.Height - 60)
            });

            this.switchArrow = new Arrow()
            {
                Location = new Point(400, 93),
                TapHandler = this.TapOnArrow,
            };
            this.homeScreenCanvas.AddElement(this.switchArrow);

            this.homeScreenCanvas.PanHandler = this.Pan;
            this.homeScreenCanvas.FlickHandler = this.Flick;

            var programsSv = new ScrollViewer { Size = new Size(315, this.Size.Height - 62), Location = new Point(574, 0), VerticalScroll = true };
            programsSv.Content = new ImageElement(ResourceManager.Instance.GetBitmapFromEmbeddedResource("Programs.png"))
            {
                Size = new Size(315, 893),
                EntranceAnimation = new NullAnimation(),
                ExitAnimation = new NullAnimation()
            };

            this.homeScreenCanvas.AddElement(programsSv);

            this.Control.AddElement(this.homeScreenCanvas);
            this.Control.AddElement(new Clock() { Location = new Point(425, 0) });

            this.homeScreenCanvas.TapHandler = p => { this.ReShow(); return true; };
        }