public UpdateTripView() { InitializeComponent(); UpdateTripViewModel = App.Current.Services.GetService <UpdateTripViewModel>(); DataContext = UpdateTripViewModel; ResourceLoader = ResourceLoader.GetForCurrentView(); UpdateTripName.AddHandler(TappedEvent, new TappedEventHandler(ResetErrors), true); UpdateTripLocation.AddHandler(TappedEvent, new TappedEventHandler(ResetErrors), true); UpdateTripStartDate.AddHandler(TappedEvent, new TappedEventHandler(ResetErrors), true); UpdateTripEndDate.AddHandler(TappedEvent, new TappedEventHandler(ResetErrors), true); }
private void ResetErrors(object sender, TappedRoutedEventArgs e) { UpdateTripName.Header = ResourceLoader.GetString("TripName/Header"); UpdateTripName.ClearValue(BorderBrushProperty); UpdateTripLocation.Header = ResourceLoader.GetString("TripLocation/Header"); UpdateTripLocation.ClearValue(BorderBrushProperty); UpdateTripStartDate.Header = ResourceLoader.GetString("TripStartDate/Header"); UpdateTripStartDate.ClearValue(ForegroundProperty); UpdateTripStartDate.ClearValue(BorderBrushProperty); UpdateTripEndDate.Header = ResourceLoader.GetString("TripEndDate/Header"); UpdateTripEndDate.ClearValue(ForegroundProperty); UpdateTripEndDate.ClearValue(BorderBrushProperty); }