In a UWP Windows 10 application I'm working on have a command in my Viewmodel
public class ViewModel {
public ICommand LoadedCommand{ get; set; }
}
and I'd like to run it when my grid control gets the focus, without having to call the command in the code behind file.
<Grid GotFocus="Grid_GotFocus">
<Grid.ColumnDefinitions>
</Grid.ColumnDefinitions>
</Grid>
Does anyone know if its possible to assign the command to the event directly in the xaml and if it is how I might do it.
Many Thanks