Exemplo n.º 1
0
 private void CreateComponent(CreateTrainingDayViewModel viewModel)
 {
     if (viewModel != null && viewModel.EditMode == BodyReport.Message.TEditMode.Edit)
     {
         SwitchCell convertionSwitchCell = new SwitchCell();
         convertionSwitchCell.BindingContext = viewModel;
         convertionSwitchCell.SetBinding(SwitchCell.TextProperty, (CreateTrainingDayViewModel source) => source.AutomaticalUnitConvertionLabel, mode: BindingMode.OneWay);
         convertionSwitchCell.SetBinding(SwitchCell.OnProperty, (CreateTrainingDayViewModel source) => source.BindingTrainingDay.AutomaticalUnitConvertion, mode: BindingMode.TwoWay);
         tableSection.Add(convertionSwitchCell);
     }
 }
Exemplo n.º 2
0
 public CreateTrainingDayPage(CreateTrainingDayViewModel viewModel) : base(viewModel)
 {
     InitializeComponent();
 }