Skip to the content

using System;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;
using System.Xml.Linq;
using Neurodot.Forms.Controls;
using Neurodot.Forms.CustomControls.RadioGroup;
using Neurodot.Forms.Render;
using Neurodot.Forms.Render.Interfaces;

public static partial class FormCodeClass
// To find controls in the current visual tree (i.e. the form) use static methods:
// object ThisForm.FindElement(string elementName); or
// T ThisForm.FindElement(string elementName);

static CheckBox _checkBox = ThisForm.FindElement("CheckBoxConfirm");

public static void Loaded(object sender, System.Windows.RoutedEventArgs e)
var role = new CallbackValidationRole("$CheckValidationMessage") { Callback = ValidateConfirmCheckBox };
ThisForm.RegisterValidationRole(_checkBox, role);

// Validates if the checkbox is checked.
// Returns true if the checkbox is checked (valid); otherwise, false (invalid).
private static bool ValidateConfirmCheckBox()
return (_checkBox.IsChecked == true);

Umbraco: The Friendly CMS
Video caption
Light window Image
Image caption

Secondary Heading

Related Content


Studio 119 South Block
60 Osborne Street
Glasgow G1 5QH