Hi all,
how can I implement a button like the CMFCRibbonUndoButton used in VS2010 and Office 2010?
has someone any implementation in WPF e.g with a SplitButton with a special content?
Thanks for any information
Peter
Hi all,
how can I implement a button like the CMFCRibbonUndoButton used in VS2010 and Office 2010?
has someone any implementation in WPF e.g with a SplitButton with a special content?
Thanks for any information
Peter
Hi Peter,
I'm not sure exactly what you are going for, but the ribbon:SplitButton accepts any content as a popup. So you can show any control in its popup.
Hi,
yes I know, but to do the gui functionality there is a lot of work like the VS2010 RibbonUndoButton does.
I have started with this:
<ribbon:SplitButton
ImageSourceSmall="/Resources/Undo16.png"
Label="Undo"
Command="{Binding ViewModel.UndoCommand}"
AutomationProperties.AutomationId="UndoQuickAccessToolBarButton"
ScreenTipHeader="Undo (Ctrl + Z)"
ScreenTipDescription="Select Commands from list to undo">
<ribbon:SplitButton.PopupContent>
<StackPanel Orientation="Vertical" Width="200">
<ListBox Name="UndoList" Height="200" ItemsSource="{Binding ViewModel.UndoStack}">
<ListBox.ItemTemplate>
<DataTemplate>
<Label Content="{Binding Path=.}"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
<TextBlock Name="SelectedActions" Text="{Binding ViewModel.UndoStackCount}"></TextBlock>
</StackPanel>
</ribbon:SplitButton.PopupContent>
</ribbon:SplitButton>
now I must implement the special hover selection in the listbox to select mutiple items which will be undone
If the selection is finished I must close the popup und get the multiple selected information for the undo/redo business logic
A lot of application were using undo redo, so I think Actipro should support such a undo/redo splitbutton in the future :-)
Hi Peter,
Ok I see what you are trying to achieve. We don't have anything for that at the moment. My guess is that you would need to have a custom control to handle the popup content there since it does have the special hover functionality as well as the label indicating the selected count. We'll mark down your suggestion.
Please log in to a validated account to post comments.