private static void OnExpandableContentChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { RadExpanderControl typedSender = sender as RadExpanderControl; if (!typedSender.IsTemplateApplied) { return; } typedSender.expandableContent.Visibility = Visibility.Collapsed; typedSender.SetInitialControlState(false); }
private static void OnDataContextPrivateChanged(DependencyObject sender, DependencyPropertyChangedEventArgs args) { RadExpanderControl typedSender = sender as RadExpanderControl; if (!typedSender.IsProperlyTemplated || typedSender.contextBinding) { return; } typedSender.expandableContent.Visibility = Visibility.Collapsed; typedSender.SetInitialControlState(false); }