I've developed an app on windows phone 8.1. When the event is triggered is not sent the eventArgs. Why? In the old solution WP 8.0 this syntax works fine....
<TextBox x:Name="Amount" Grid.Row="2" Grid.Column="1" InputScope="Number" Header="{Binding TbAmount}" micro:Message.Attach="[Event KeyUp] = [Action NumericKeyboard_OnKeyUp($source, $eventArgs)]"/>
This is the event handler:
public void NumericKeyboard_OnKeyUp(object sender, KeyEventArgs e)
{
if (CultureInfo.CurrentCulture.ToString() != "en-US")
return;
if (e.VirtualKey == VirtualKey.None)
{
var distanceTb = sender as TextBox;
distanceTb.Text = distanceTb.Text.Replace(",", ".");
// reset cursor position to the end of the text (replacing the text will place
// the cursor at the start)
distanceTb.Select(distanceTb.Text.Length, 0);
}
}