NullReferenceException is thrown if you set the IsChecked property of the RadToggleSwitchButton before the button is added to the visual tree. This happens only when the switch animation is disabled.
To work this around, you can set the AnimationManager.IsAnimationEnabled property of the button to True initially. And then set it back to False on Loaded of the button.
RadToggleSwitchButton: The animation of the thumb switch updates its position when the animation finishes. This happens with a slight delay. However, if the animation is disabled, this delay should not be executed. Instead, the thumb should be updated immediately.
Currently, the delay can causes an animation-like effect in some specific situations.
To work this around, you can create a custom RadToggleSwitchButton and override the property changed callback of the IsChecked property.
public class CustomToggleSwitchButton : RadToggleSwitchButton
{
private FrameworkElement thumb;
static CustomToggleSwitchButton()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(CustomToggleSwitchButton), new FrameworkPropertyMetadata(typeof(CustomToggleSwitchButton)));
IsCheckedProperty.OverrideMetadata(typeof(CustomToggleSwitchButton), new FrameworkPropertyMetadata(OnIsCheckedPropertyChanged));
}
public override void OnApplyTemplate()
{
base.OnApplyTemplate();
this.thumb = this.GetTemplateChild("PART_Thumb") as FrameworkElement;
}
private static void OnIsCheckedPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
{
var switchButton = (CustomToggleSwitchButton)d;
if (switchButton.thumb == null)
{
return;
}
bool? isChecked = e.NewValue as bool?;
if (isChecked == true)
{
switchButton.thumb.HorizontalAlignment = HorizontalAlignment.Right;
}
else if (isChecked == false)
{
switchButton.thumb.HorizontalAlignment = HorizontalAlignment.Left;
}
else if (switchButton.IsThreeState)
{
switchButton.thumb.HorizontalAlignment = HorizontalAlignment.Center;
}
}
}
The application hangs when you click on a Label element placed in the DropDownContent of RadSplitButton. In order to recreate this the content of the Label should contain an underscore character, thus enabling the access text WPF functionality. Also, the CloseOnPopupMouseLeftButtonUp property should be set to True.
This behavior can be reproduced with any element that is not derived from FrameworkElement. The issue in this case appear because when the access text is enabled, the Label control produces Run elements in its visual tree. The Run class doesn't derive from FrameworkElement, but from FrameworkContentElement, which causes the issue.
To work this around, use TextBlock instead of Label.
To avoid this, handle the scrolling of the ScrollViewer when the dropdown content is opened. This behavior is already implemented in RadComboBox by overriding its OnMouseWheel method and handling the event arguments.
To work this around subscribe to the MouseWheel event of RadDropDownButton and set the Handled property of the event arguments to True.
private void RadDropDownButton_MouseWheel(object sender, MouseWheelEventArgs e)
{
var btn = (RadDropDownButton)sender;
if (btn.IsOpen)
{
e.Handled = true;
}
}
The current workaround we can offer is to define the following style for the RadioButton element: <Style TargetType="RadioButton" BasedOn="{StaticResource RadioButtonStyle}"> <Style.Triggers> <Trigger Property="IsChecked" Value="True"> <Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=AccentBrush}" /> </Trigger> </Style.Triggers> </Style> Where xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
A StackOverflowException occurs when you press a RadDropDownButton placed into the DropDownContent of another RadDropButton. To work this around, subscribe for the LostMouseCapture event of the parent drop down button and handle it. private void DropDownButton_LostMouseCapture(object sender, MouseEventArgs e) { e.Handled = true; }
If you have a tooltip on a button and focus the button before hovering it, the tooltip is not shown
There is a Dispatcher call without checking in the dispatcher call for NULL. This lead to NullReferenceException in huge production code. Available in R3 2016 SP
The issue is not reproducible since R2 2016 SP1 version.
The issue can be reproduced with DatePicker inside of ComboBoxItem ItemTemplate. Available in LIB Version 2016.3.1010, it will be also available in the 2016 R3 SP1.
SplitButton throws a design time exception with implicit styles if you've included Diagrams.Extensions.xaml