private void OnEditButtonTapped(object sender, EventArgs e) { if (DescriptionLabel.IsVisible) { TurnEditing(); DescriptionEditor.Focus(); } }
private MetaContentEditor createEditor(MetaData data, MetaContentEditorShell shell) { switch (data.Type) { case MetaDataType.Title: shell.ViewToggle.Toggle(true); TitleEditor result = Instantiate(_titleEditorPrefab); result.Data = data as TitleData; return(result); case MetaDataType.Tags: shell.ViewToggle.Toggle(true); TagsEditor tagsEditor = Instantiate(_tagsEditorPrefab); tagsEditor.Data = data as TagsData; return(tagsEditor); case MetaDataType.CreationDate: shell.ViewToggle.Toggle(false); CreationDateEditor creationDateEditor = Instantiate(_creationDateEditor); creationDateEditor.Data = data as CreationDateData; return(creationDateEditor); case MetaDataType.LastChangedDate: shell.ViewToggle.Toggle(false); LastChangeDateEditor lastChangeDate = Instantiate(_lastChangeDateEditor); lastChangeDate.Data = data as LastChangeDateData; return(lastChangeDate); case MetaDataType.Comment: shell.ViewToggle.Toggle(true); CommentEditor commentEditor = Instantiate(_commentEditor); commentEditor.Data = data as CommentData; return(commentEditor); case MetaDataType.Description: shell.ViewToggle.Toggle(true); DescriptionEditor descriptionEditor = Instantiate(_descriptionEditor); descriptionEditor.Data = data as DescriptionData; return(descriptionEditor); case MetaDataType.PreviewImage: shell.ViewToggle.Toggle(true); PreviewImageEditor previewImageEditor = Instantiate(_previewImageEditor); previewImageEditor.Data = data as PreviewImageData; return(previewImageEditor); case MetaDataType.Author: shell.ViewToggle.Toggle(true); AuthorsEditor authorsEditor = Instantiate(_authorsEditor); authorsEditor.Data = data as AuthorData; return(authorsEditor); default: throw new NotImplementedException(); } }
protected override async Task OnAppearingAnimationEndAsync() { if (!IsAnimationEnabled) { return; } var translateLength = 400u; await Task.WhenAll( HabitEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), HabitEntry.FadeTo(1), DescriptionLabel.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), DescriptionLabel.FadeTo(1), DescriptionEditor.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), DescriptionEditor.FadeTo(1), StartPicker.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), StartPicker.FadeTo(1), EndPicker.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), EndPicker.FadeTo(1), AmountEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), AmountEntry.FadeTo(1), UnitEntry.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), UnitEntry.FadeTo(1) //(new Func<Task>(async () => //{ // await Task.Delay(300); // await Task.WhenAll( // //RememberCheckBox.TranslateTo(0, 0, easing: Easing.SpringOut, length: translateLength), // //RememberCheckBox.FadeTo(1) // ); //}))() ); await Task.WhenAll( EditButton.ScaleTo(1), EditButton.FadeTo(1), SaveButton.ScaleTo(1), SaveButton.FadeTo(1), DeleteButton.ScaleTo(1), DeleteButton.FadeTo(1) ); }
private void FilteredTextBox_Loaded(object sender, RoutedEventArgs e) { DescriptionEditor.BackgroundFocus(); }