Example #1
0
        public Form1()
        {
            InitializeComponent();

            this.SetEnabledQsfbButton(QSFButtons.TransparentBackground | QSFButtons.ChangeTheme, false);

            this.strip = this.radPageView1.ViewElement as RadPageViewStripElement;
            this.strip.ItemDragMode = PageViewItemDragMode.Preview;

            ExamplesForm.FillComboFromEnum(this.stripAlignCombo, typeof(StripViewAlignment), this.strip.StripAlignment);
            ExamplesForm.FillComboFromEnum(this.itemAlignCombo, typeof(StripViewItemAlignment), this.strip.ItemAlignment);
            ExamplesForm.FillComboFromEnum(this.fitModeCombo, typeof(StripViewItemFitMode), this.strip.ItemFitMode);
            ExamplesForm.FillComboFromEnum(this.sizeModeCombo, typeof(PageViewItemSizeMode), this.strip.ItemSizeMode);
            ExamplesForm.FillComboFromEnum(this.orientationCombo, typeof(PageViewContentOrientation), this.strip.ItemContentOrientation);

            this.spacingSpin.Value = this.strip.ItemSpacing;

            foreach (RadPageViewPage page in this.radPageView1.Pages)
            {
                page.Image = PageViewImages.Images[this.imageIndex++];
                page.Controls.Add(PageViewLabels.CreateLabel());
            }

            this.radPageView1.NewPageRequested += radPageView1_NewPageRequested;
        }
Example #2
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);
            this.SetEnabledQsfbButton(QSFButtons.TransparentBackground | QSFButtons.ChangeTheme, false);

            this.strip = this.radPageView1.ViewElement as RadPageViewStripElement;

            for (int i = 0; i < 5; i++)
            {
                RadPageViewPage page = new RadPageViewPage();
                page.Text  = PageViewImages.Names[i];
                page.Image = PageViewImages.Images[i];

                this.radPageView1.Pages.Add(page);
            }

            this.radPageView1.NewPageRequested += radPageView1_NewPageRequested;

            this.newItemVisibilityCombo.DataSource = Enum.GetValues(typeof(StripViewNewItemVisibility));
            this.stripAlignCombo.DataSource        = Enum.GetValues(typeof(StripViewAlignment));

            this.newItemVisibilityCombo.SelectedValue = StripViewNewItemVisibility.End;
            this.stripAlignCombo.SelectedValue        = this.strip.StripAlignment;

            this.shrinkItemsCheck.Checked = true;
        }
Example #3
0
        public Form1()
        {
            InitializeComponent();

            this.SetEnabledQsfbButton(QSFButtons.TransparentBackground | QSFButtons.ChangeTheme, false);

            this.view        = new Telerik.WinControls.UI.RadPageView();
            this.view.Size   = new Size(400, 300);
            this.view.Anchor = AnchorStyles.None;
            this.view.Parent = this;
            this.strip       = this.view.ViewElement as RadPageViewStripElement;
            this.view.SelectedPageChanged += new EventHandler(view_SelectedPageChanged);
            this.view.ThemeName            = themeName;

            PageViewLabels.currIndex = 0;

            for (int i = 0; i < 10; i++)
            {
                RadPageViewPage page = new RadPageViewPage();
                page.Text  = PageViewImages.Names[i];
                page.Image = PageViewImages.Images[i];
                page.Controls.Add(PageViewLabels.CreateLabel());

                this.view.Pages.Add(page);
            }

            this.strip.StripButtons           = StripViewButtons.Scroll | StripViewButtons.ItemList;
            this.enableAnimationCheck.Checked = strip.AnimatedStripScrolling;
        }
        public RadPageViewElement CreatePageViewElement(object context)
        {
            RadPageViewStripElement viewStripElement = new RadPageViewStripElement();

            viewStripElement.StripButtons        = StripViewButtons.None;
            viewStripElement.StretchHorizontally = false;
            return((RadPageViewElement)viewStripElement);
        }
Example #5
0
        public Form1()
        {
            InitializeComponent();

            this.radPageView1.Dock = DockStyle.Fill;

            this.strip = this.radPageView1.ViewElement as RadPageViewStripElement;
            this.strip.StripButtons = StripViewButtons.None;

            this.PopulateSettingsCombo(this.alignCombo, typeof(StripViewAlignment), strip.StripAlignment);
            this.PopulateSettingsCombo(this.orientationCombo, typeof(PageViewContentOrientation), strip.ItemContentOrientation);
            this.PopulateSettingsCombo(this.buttonsCombo, typeof(StripViewButtons), strip.StripButtons);
            this.SetEnabledQsfbButton(QSFButtons.TransparentBackground | QSFButtons.ChangeTheme, false);
        }
Example #6
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad(e);

            this.radPageView1.ThemeName = "Office2010";

            this.radPageView1.PageRemoved         += radPageView1_PageRemoved;
            this.radPageView1.SelectedPageChanged += radPageView1_SelectedPageChanged;

            this.strip = this.radPageView1.ViewElement as RadPageViewStripElement;
            this.strip.StripButtons             = StripViewButtons.All;
            this.animatedScrollingCheck.Checked = this.strip.AnimatedStripScrolling;

            this.PopulatePages();
            this.PopulateDropDownLists();
            this.SetEnabledQsfbButton(QSFButtons.TransparentBackground | QSFButtons.ChangeTheme, false);
        }
Example #7
0
        public Form1()
        {
            InitializeComponent();

            CommandBarRowElement   row   = new CommandBarRowElement();
            CommandBarStripElement strip = new CommandBarStripElement();

            row.Strips.Add(strip);
            radCommandBar1.Rows.Add(row);

            foreach (RadPageViewPage page in radPageView1.Pages)
            {
                if (strip.Items.Count > 3)
                {
                    row   = new CommandBarRowElement();
                    strip = new CommandBarStripElement();
                    row.Strips.Add(strip);
                    radCommandBar1.Rows.Add(row);
                }

                CommandBarButton pageButton = new CommandBarButton();
                pageButton.DrawText            = true;
                pageButton.Orientation         = Orientation.Horizontal;
                pageButton.Image               = null;
                pageButton.Text                = page.Item.Text;
                pageButton.Click              += new EventHandler(pageButton_Click);
                pageButton.StretchHorizontally = true;
                strip.Items.Add(pageButton);
                strip.StretchHorizontally = true;

                strip.OverflowButton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

                //adding a label to each page in order to verify the change when a command bar button is clicked
                RadLabel pageTitle = new RadLabel();
                pageTitle.Text     = "Current page = " + page.Item.Text;
                pageTitle.Location = new Point(10, 10);
                page.Controls.Add(pageTitle);
            }
            RadPageViewStripElement stripElement = radPageView1.ViewElement as RadPageViewStripElement;

            stripElement.ItemContainer.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
        }