Beispiel #1
0
 public static void Place(
     IDotvvmControl control,
     DotvvmControlCollection container,
     IValueBinding?value,
     ValidatorPlacement placement)
 {
     if (placement.HasFlag(ValidatorPlacement.AttachToControl))
     {
         control.SetValue(ValueProperty, value !);
     }
     if (placement.HasFlag(ValidatorPlacement.Standalone))
     {
         var validator = new Validator();
         validator.SetValue(ValueProperty, value);
         container.Add(validator);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DotvvmControl"/> class.
 /// </summary>
 public DotvvmControl()
 {
     Children = new DotvvmControlCollection(this);
 }