Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1415
XamDateTimeInput in DataTemplate
posted

I'm dynamically creating a XamDateTimeInput field within a DataTemplate - programmatically managing the properties in C#.

How do I wire up the ValueChanged event? i don't see this as a property within ValueInput, but its accessible in XAML

            var date = new FrameworkElementFactory(typeof(XamDateTimeInput));
            var valueBinding = GetDataItemBinding(col);
            
            date.SetValue(ValueInput.ValueProperty, valueBinding);
            date.SetValue(ValueInput.FormatProperty, "MM/dd/yyyy");
            date.SetValue(ValueInput.ValueTypeProperty, typeof(string));
            date.AddHandler(ValueInput.ValueChangedEvent...,