How to add a PopupButton to a Ribbon StackPanel in code?

Ribbon for WPF Forum

Posted 16 years ago by Crile Carvey
Given this in XAML:
    <ribbon:StackPanel x:Name="ListButtonPanel" >
        <ribbon:PopupButton Label="Button" />
I'd like to do something like this in the code:
    PopupButton pb = new PopupButton();
    pb.Label="New button";
But Visual Studio Intellisense doesn't think it is a good idea.

Any hints?


[Modified at 11/17/2008 08:12 PM]

Comments (2)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA

That code looks fine to me, other than my guess is that your code PopupButton reference might be pulling in the one in ActiproSoftware.Windows.Controls namespace instead of the one in the ActiproSoftware.Windows.Controls.Ribbon.Controls namespace.

Actipro Software Support

Posted 16 years ago by Crile Carvey
Thanks - that was it.

The latest build of this product (v24.1.2) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.