private static void OnNumericUpDownDataContextChanged(ProcessFilterDetailsView view, object sender, DependencyPropertyChangedEventArgs e)
        {
            var numericUpDown = (RadNumericUpDown)sender;
            var filterViewModel = (SimpleFilterViewModel)numericUpDown.DataContext;

            if (filterViewModel != null && filterViewModel.Value == OperatorValueFilterDescriptorBase.UnsetValue)
            {
                filterViewModel.Value = null;
            }
        }
        private static void OnStateComboBoxDataContextChanged(ProcessFilterDetailsView vm, object sender, DependencyPropertyChangedEventArgs args)
        {
            var comboBox = (RadComboBox)sender;
            var filterViewModel = (SimpleFilterViewModel)comboBox.DataContext;

            if (filterViewModel != null && filterViewModel.Descriptor != null)
            {
                var stateInfo = filterViewModel.Descriptor.Value as StateInfoClass;

                if (stateInfo != null)
                    comboBox.SelectedValue = stateInfo.Guid;
            }

            var filterControl = comboBox.ParentOfType<RadDataFilter>();
            if (filterControl != null)
                filterControl.Tag = null;
        }
 private static void OnComboBoxSelectionChanged(ProcessFilterDetailsView target, EventPattern<SelectionChangedEventArgs> handler)
 {
     OnComboBoxSelectionChanged(handler.Sender, handler.EventArgs);
 }