I am having a problem binding the TextboxHelper.ButtonCommand (from mahapps.metro) to my view model using caliburn.
At the moment I have this working using a delegate command.
View:
<TextBox Name="TextBoxContent"
mui:TextboxHelper.ButtonContent="s"
mui:TextboxHelper.ButtonCommand="{Binding DelCommand, Mode=OneWay}"
Style="{DynamicResource ButtonCommandMuiTextBox}" />
ViewMode:
ICommand DelCommand
{
get {return new Command();}
}
void Command() { //Handle press here }
However I really would like to use caliburn not the delegate command to acheive this. I have tried using the event triggers on the textbox to no avail, like so...
<TextBox Name="TextBoxContent" mui:TextboxHelper.ButtonContent="s"
Style="{DynamicResource ButtonCommandMuiTextBox}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="mui:TextboxHelper.ButtonCommand">
<i:EventTrigger.Actions>
<cal:ActionMessage MethodName="Command"/>
</i:EventTrigger.Actions>
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBox>
Is there a reason why this can't be done?
Thanks