MouseLeave event is never fired after we change the Them of the controls from a control located in the DropDownContent. Therefor the controls IsMouseOver property is true and looks like it is hovered.
Implement functionality similar to http://demos.telerik.com/aspnet-ajax/button/examples/togglebutton/defaultcs.aspx
DropDownButton's DropDownContent blinks when its template and its parent's ControlTemplate are changed at runtime
Clicking on the RadSplitButton in XAML opens the designer unexpectedly Available in LIB version: 2015.1.0309
A button with state that looks like a switch. We have created a SDK sample demonstrates how to style a RadToggleButton to look like a Toggle-Switch button. You can find the example in out SDK repository(https://github.com/telerik/xaml-sdk/tree/master/Buttons/ToggleSwitchButton)
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
It should be possible to specify whether the drop down should stretch to the width of the button or whether it should be left - right aligned. The same should apply for the vertical positioning when the popup appears left or right of the button.
Implement mechanism that allows positioning the drop down content of RadDropDownButton when the DropDownPlacement property is set to Absolute or Relative. Something like DropDownHorizontalOffset and DropDownVerticalOffset.
Property values are inherited from the logical parent and not visual parent (as in SL). Thus ContentPresenter and ContentControls children doesn't get the new Foreground property. This can not be workarounded with VisualStates, but Triggers only Reason for declination: WPF limitation
Custom property values for BorderThickness and BorderBrush are replaced after button click. To reproduce, use the following code, you'll see that a highlighted border appears after clicking the button. <telerik:RadButton Background="Gray" Foreground="White" BorderThickness="0" BorderBrush="Transparent" Content="click me" HorizontalAlignment="Center" VerticalAlignment="Center" /> Reason for declination: The border that you see is the focused state of RadButton, which is a separate visual and its BorderThickness is not template-bound to the BorderThickness of the control intentionally. We believe that a control should have focus even if its default border is removed. In our latest themes we are trying to keep this behavior. In the Office2016 theme there is an exposed palette property, which you can use in code-behind if you want to remove the focus: Office2016Palette.Palette.FocusThickness = new Thickness(0);
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"
Please add an option to modify the corner radius for TrackBackground and UncheckedTrackBackground in the RadToggleSwitchButton template.
The radius of both rectangles is hard-coded to 9 (TrackBackground) / 12 (UncheckedTrackbackground) (Why are they different btw?). While it is possible to set the TrackHeight and TrackWidth to custom values, this doesn't really work well for the Fluent theme right now due to the radii quickly becoming disproportionally large or small compared to the TrackHeight. This results in the control losing its shape and becoming more and more egg-shaped or rectangular, depending on whether you decrease or increase the TrackHeight.
Ideally, the Radii would be automatically computed, depending on the selected TrackHeight (Floor(TrackHeight/2) ?), however, a manual solution would also be a lot better than nothing. That way we could at lease define proportionally matching values via styles.
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.