I want to Populate a DataFrom with values by default.
Model:
using System;
using System.Collections.Generic;
using System.Text;
namespace BottomBarDemo.Model
{
public class ViewWorkItemDataForm
{
private string title;
private string state;
private string assignedTo;
private string description;
private string acceptanceCriteria;
private string area;
private string iteration;
private string effort;
public ViewWorkItemDataForm()
{
}
public string Title
{
get { return title; }
set { this.title = value; }
}
public string State
{
get { return state; }
set { this.state = value; }
}
public string AssignedTo
{
get { return assignedTo; }
set { this.assignedTo = value; }
}
public string Description
{
get { return description; }
set { this.description = value; }
}
public string AcceptanceCriteria
{
get { return acceptanceCriteria ; }
set { this.acceptanceCriteria = value; }
}
public string Area
{
get { return area; }
set { this.area = value; }
}
public string Iteration
{
get { return iteration; }
set { this.iteration = value; }
}
public string Effort
{
get { return effort; }
set { this.effort = value; }
}
}
}
View:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:dataForm="clr-namespace:Syncfusion.XForms.DataForm;assembly=Syncfusion.SfDataForm.XForms"
xmlns:local="clr-namespace:BottomBarDemo.Behavior"
mc:Ignorable="d"
x:Class="BottomBarDemo.EpicDetailsPage">
<ContentPage.Behaviors>
<local:DataFormBehaviorDetails />
</ContentPage.Behaviors>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition Height="*" />
<RowDefinition Height="50" />
</Grid.RowDefinitions>
<Grid Grid.Row="0"
x:Name="TitleGrid">
<Grid.RowDefinitions>
<RowDefinition Height="10" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid Grid.Row="1">
<Label x:Name="title"
Text="Epic Details"
TextColor="White"
FontSize="Large"
VerticalTextAlignment="Center"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
HorizontalOptions="Center"></Label>
</Grid>
<Grid Grid.Row="2">
<Label x:Name="project"
Text="digital-cells-sso-dna"
TextColor="White"
FontSize="Small"
VerticalTextAlignment="Start"
HorizontalTextAlignment="Center"
VerticalOptions="Start"
HorizontalOptions="Center"></Label>
</Grid>
</Grid>
<Grid Grid.Row="1"
Padding="10,2,0,0">
<dataForm:SfDataForm x:Name="dataForm"
LayoutOptions="TextInputLayout"
ColumnCount="2" />
</Grid>
<Grid Grid.Row="2">
<Button x:Name="CreateChildFeature"
Text="Create Feature"
Clicked="CreateChildFeature_Clicked" />
</Grid>
</Grid>
</ContentPage>
The json data is obtained on a previous view and is stored in App.xaml.cs
I am very confused how to I access the Data Form