mirror of
https://dev.azure.com/TeilRad/sharee.bike%20App/_git/Code
synced 2025-04-23 21:36:28 +02:00
Version 3.0.381
This commit is contained in:
parent
f963c0a219
commit
3a363acf3a
1525 changed files with 60589 additions and 125098 deletions
|
@ -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>
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue