Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I'm a little problem with the RibbonSplitButton.
I wanted the current button contains the image and the action of current item, but the text I want it to be static.
The RibbonSplitButton contains a property called "IsSynchronizedWithCurrentItem" that does this, but it takes all information of current item.
I want behavior equal to the circle of ribbon autocad, where the text "circle" is static, as shown in the image below:
Below a generic code of how I did:
RibbonSplitButton panSplitButton = new RibbonSplitButton(); panSplitButton.Text = "Circle"; panSplitButton.ShowText = true; panSplitButton.ShowImage = true; panSplitButton.IsSplit = true; panSplitButton.Size = RibbonItemSize.Large; panSplitButton.IsSynchronizedWithCurrentItem = true; RibbonButton panButton1 = new RibbonButton(); panButton1.Text = "Center, Radius"; panButton1.ShowText = true; panButton1.ShowImage = true; panButton1.Image = Images.getBitmap(Properties.Resources.Small); panButton1.LargeImage = Images.getBitmap(Properties.Resources.large); panButton1.Size = RibbonItemSize.Large; panButton1.Orientation = System.Windows.Controls.Orientation.Vertical; panButton1.CommandHandler = new RibbonCommandHandler(); RibbonButton panButton2 = new RibbonButton(); panButton2.Text = "Center, Diameter"; panButton2.ShowText = true; panButton2.ShowImage = true; panButton2.Image = Images.getBitmap(Properties.Resources.Small); panButton2.LargeImage = Images.getBitmap(Properties.Resources.large); panButton2.Size = RibbonItemSize.Large; panButton2.Orientation = System.Windows.Controls.Orientation.Vertical; panButton2.CommandHandler = new RibbonCommandHandler(); panSplitButton.Items.Add(panButton1); panSplitButton.Items.Add(panButton2);
How can I keep the static text "circle" in the "IsSynchronizedWithCurrentItem" property as true?
Solved! Go to Solution.