Пример #1
0
        private void RadioButtonList_SelectionChanged(object sender, EditValueChangedEventArgs e)
        {
            FrameworkElement popupRoot = LayoutHelper.FindRoot((DependencyObject)sender) as FrameworkElement;

            if ((popupRoot != null) && (popupRoot.Parent is Popup))
            {
                (popupRoot.Parent as Popup).IsOpen = false;
            }
        }
        void AssociatedObjectLoaded(object sender, RoutedEventArgs e)
        {
            var root = (FrameworkElement)LayoutHelper.FindRoot(AssociatedObject);

            root.Do(x => x.Dispatcher.BeginInvoke(new Action(() => LayoutHelper.ForEachElement(x, element => (element as Button).Do(btn => btn.IsDefault = false)))));
        }