Version 3.0.381

This commit is contained in:
Anja 2024-04-09 12:53:23 +02:00
parent f963c0a219
commit 3a363acf3a
1525 changed files with 60589 additions and 125098 deletions

View file

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
x:Class="ShareeBike.View.MiniSurvey.Question.CheckOneViewCell">
<ViewCell.View>
<Frame>
<StackLayout>
<Label
FontSize="Medium"
Text="{Binding QuestionText}" />
<Picker
Title="{x:Static resources:AppResources.MiniSurveyAskForAnswer}"
SelectedItem="{Binding AnswerText}"
ItemsSource="{Binding AnswersText}"/>
</StackLayout>
</Frame>
</ViewCell.View>
</ViewCell>

View file

@ -0,0 +1,14 @@
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace ShareeBike.View.MiniSurvey.Question
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class CheckOneViewCell : ViewCell
{
public CheckOneViewCell()
{
InitializeComponent();
}
}
}

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<ViewCell xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:ShareeBike.MultilingualResources;assembly=SharedBusinessLogic"
x:Class="ShareeBike.View.MiniSurvey.Question.FreeTextViewCell">
<ViewCell.View>
<Frame>
<StackLayout>
<Label
FontSize="Medium"
Text="{Binding QuestionText}" />
<Editor
AutoSize="TextChanges"
Text="{Binding AnswerText}"
Placeholder="{x:Static resources:AppResources.MiniSurveyEnterAnswer}">
</Editor>
</StackLayout>
</Frame>
</ViewCell.View>
</ViewCell>

View file

@ -0,0 +1,15 @@

using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace ShareeBike.View.MiniSurvey.Question
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class FreeTextViewCell : ViewCell
{
public FreeTextViewCell()
{
InitializeComponent();
}
}
}

View file

@ -0,0 +1,26 @@
using Xamarin.Forms;
namespace ShareeBike.View.MiniSurvey.Question
{
/// <summary>
/// Selects different templates for different question types.
/// </summary>
public class QuestionViewCellTemplateSelector : DataTemplateSelector
{
DataTemplate checkOneViewCell;
DataTemplate freeTextViewCell;
public QuestionViewCellTemplateSelector()
{
checkOneViewCell = new DataTemplate(typeof(CheckOneViewCell));
freeTextViewCell = new DataTemplate(typeof(FreeTextViewCell));
}
protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
{
return item is ViewModel.MiniSurvey.Question.FreeTextViewModel
? freeTextViewCell
: checkOneViewCell;
}
}
}