SplitButton action

Dec 7, 2010 at 7:01 AM

Here is my XAML code for splitbutton (fluent ribbon splitbutton).

        <ControlTemplate x:Key="splitButton">
            <ef:SplitButton Header="{Binding DisplayName}" ItemsSource="{Binding Items}" LargeIcon="{Binding LargeIconPath}" cm:Message.Attach="ClickAction()">
                    <Style TargetType="MenuItem">
                        <Setter Property="Header" Value="{Binding DisplayName}"/>
                        <Setter Property="Icon">
                                <Image Source="{Binding Path=IconPath}"/>
                        <Setter Property="ItemsSource" Value="{Binding Items}"/>
                        <Setter Property="cm:Message.Attach" Value="ClickAction()"/>

The action (ClickAction) never gets fired, but "same" code for normal button works ok. Is there some trick in binding command to splitbutton?

The code works if i create a Click event in my viewModel and bind it to xaml Click property, but im not sure why cm:Message.Attach doesnt work (it works on splitbutton menuItems and normal button).

Dec 7, 2010 at 2:00 PM

I'm going to need a simple repro to try and fix this. You can email it to robertheisenberg at hotmail dot com