As of 2024 Q4 (November), we will deprecate the .NET 7 distribution. This decision is rooted in our dedication to align with Microsoft’s recommended framework versions so that our products leverage the latest advancements in technology, security, and performance.
We are aligning our product with Microsoft’s lowest-supported framework versions for .NET Framework and .NET, respectively. Please refer to the following blog post: Product Update for Enhanced Performance and Security
For more information about how to upgrade your project when a new version of the Telerik UI for WPF suite is released, you can check here: Project Migration to .NET 4.6.2 and .NET 6
As of 2024 Q2, we will deprecate .NET Framework 4.0, .NET Framework 4.5, and .NET Core 3.1 distributions. This decision is rooted in our dedication to align with Microsoft’s recommended framework versions so that our products leverage the latest advancements in technology, security, and performance.
We are aligning our product with Microsoft’s lowest-supported framework versions for .NET Framework and .NET, respectively. Please refer to the following blog post:
Product Update for Enhanced Performance and Security (telerik.com)
For more information about how to upgrade your project's .NET Framework version, you can check the following MSDN article:
Migration Guide to .NET Framework 4.8, 4.7, and 4.6.2 - .NET Framework | Microsoft Learn
I have a question about my RadGridView. It contains checkboxes, and I noticed that if I don’t click directly on the checkbox but instead on the element surrounding it, the checkbox disappears and only becomes visible again once I click on another element.
RadGriddView
AutoGenerateColumns="False"
CanUserDeleteRows="False"
CanUserFreezeColumns="False"
CanUserReorderColumns="False"
CanUserResizeColumns="False"
CanUserSearch="False"
CanUserSortColumns="False"
GridLinesVisibility="Both"
GroupRenderMode="Flat"
ItemsSource="{Binding Items}"
RowIndicatorVisibility="Collapsed"
ShowGroupPanel="False"
<t:GridViewDataColumn
Width="*"
MinWidth="70"
Header="Test"
HeaderTextAlignment="Center">
<t:GridViewColumn.CellTemplate>
<DataTemplate>
<CheckBox
HorizontalAlignment="Center"
FontSize="16"
IsChecked="{Binding Test1}"
IsHitTestVisible="True"
Tag="{Binding}" />
</DataTemplate>
</t:GridViewColumn.CellTemplate>
</t:GridViewDataColumn>
When I use this t:GridViewCheckBoxColumn, the behavior is not as described above. However, I have to click three times on the checkbox, once before I can set the checkmark in the checkbox.
<t:GridViewCheckBoxColumn
MinWidth="50"
DataMemberBinding="{Binding Test1}"
Header="Test1" />
Hello,
I came to interesting problem of calculating correct number of items that are grouped up. I have GridView that has grouped items, however in each group there is "special" item, that points to object of different type (but derived from the base type of the ItemsSource collection). This item should not be counted into overall item count of the group, as its function is to enable user to write down some notes for each group and does not contain any production data. The calculated count is then displayed in the group header text.
My idea was to create converter, that would take Group object and return the number. The converter itself would take group.ItemCount of group and then iterate in loop over the group.Items collection and substract 1 from the count if the item is of specified type. All of this is done so that when the user searches via the inbuilt search bar in GridView, the count is always correct.
Now the problem, the gridview does no load items of groups that are not expanded (except for the first one??) and as such the converter iterates over nothing (the group.Items collection is empty) and thus the count is displayed wrong (displayed number is group.ItemCount without any substraction). Any ideas how could i work around this? I would rather avoid calculating this in viewmodel as that would require tracking the search text and then manually filtering items in collection.
Hello,
I'm trying to chanhe the color of the ToggleSwitchButton.
For example; when selected it turns green, unselected is red.
I found this article: Styling apperance and handled as such.
This gave me 200+ lines of XAML, but I cannot easily identify what to change, pleasy some guidance.
I'm on 2025 Q3 for WPF
<LinearGradientBrush x:Key="ControlOuterBorder_Normal" EndPoint="0.5,1" StartPoint="0.5,0"><GradientStop Color="#FFA9BFD6"/><GradientStop Color="#FFCDDAEA" Offset="1"/></LinearGradientBrush><LinearGradientBrush x:Key="ControlBackground_Normal" EndPoint="0.5,1" StartPoint="0.5,0"><GradientStop Color="#FFFDFEFF" Offset="0"/><GradientStop Color="#FFE6F0FA" Offset="0.5"/><GradientStop Color="#FFDCE6F4" Offset="0.5"/><GradientStop Color="#FFDDE9F7" Offset="1"/></LinearGradientBrush><SolidColorBrush x:Key="ControlOuterBorder_MouseOver" Color="#FFB8D6FB"/><LinearGradientBrush x:Key="ControlBackground_MouseOver" EndPoint="0.5,1" StartPoint="0.5,0"><GradientStop Color="#FFFBFCFD" Offset="0"/><GradientStop Color="#FFF6F8FB" Offset="0.5"/><GradientStop Color="#FFEDF2F9" Offset="0.5"/><GradientStop Color="#FFE5EBF4" Offset="1"/></LinearGradientBrush><SolidColorBrush x:Key="ControlOuterBorder_Pressed" Color="#FFC0CBD9"/><LinearGradientBrush x:Key="ControlBackground_Pressed" EndPoint="0.5,1" StartPoint="0.5,0"><GradientStop Color="#FFC0CBD9" Offset="0"/><GradientStop Color="#FFE6EAEE" Offset="0.5"/></LinearGradientBrush><SolidColorBrush x:Key="ControlInnerBorder_Checked" Color="#00000000"/><LinearGradientBrush x:Key="ControlBackground_Checked" EndPoint="0.5,1" StartPoint="0.5,0"><GradientStop Color="#FFC0CBD9" Offset="0"/><GradientStop Color="#FFE6EAEE" Offset="0.5"/></LinearGradientBrush><Style x:Key="VATToggleSwitchButton" TargetType="{x:Type telerik:RadToggleSwitchButton}">
<Setter Property="Padding" Value="4 0"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Foreground" Value="{StaticResource ControlForeground_Normal}"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="Background" Value="{StaticResource ToggleSwitchButton_TrackBackground}"/>
<Setter Property="BorderBrush" Value="{StaticResource ControlOuterBorder_Normal}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="TrackHeight" Value="20"/>
<Setter Property="ThumbHeight" Value="20"/>
<Setter Property="ThumbWidth" Value="20"/>
<Setter Property="CornerRadius" Value="2"/>
<Setter Property="TrackWidth" Value="60"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:RadToggleSwitchButton}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="{Binding TrackWidth, RelativeSource={RelativeSource Mode=TemplatedParent}}"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<ContentPresenter x:Name="UncheckedContent" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding UncheckedContentTemplate}" Grid.Column="2" Content="{TemplateBinding UncheckedContent}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
<Grid Grid.Column="1" Height="{TemplateBinding TrackHeight}" SnapsToDevicePixels="True">
<Border x:Name="TrackBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}" Opacity="0">
<Rectangle x:Name="TrackInnerBackground" Fill="{TemplateBinding Background}" RadiusX="{TemplateBinding CheckedTrackRadius}" RadiusY="{TemplateBinding CheckedTrackRadius}" Stroke="{StaticResource ToggleSwitchButton_TrackInnerBorder}" StrokeThickness="0"/>
</Border>
<Border x:Name="UncheckedTrackBackground" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{TemplateBinding CornerRadius}">
<Rectangle x:Name="UncheckedTrackInnerBackground" Fill="{StaticResource ToggleSwitchButton_TrackBackground_Unchecked}" RadiusX="{TemplateBinding UncheckedTrackRadius}" RadiusY="{TemplateBinding UncheckedTrackRadius}" Stroke="{StaticResource ToggleSwitchButton_TrackInnerBorder}" StrokeThickness="0"/>
</Border>
<Border x:Name="PART_Thumb" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="2" HorizontalAlignment="Left" Height="{TemplateBinding ThumbHeight}" RenderTransformOrigin="0.5,0.5" Width="{TemplateBinding ThumbWidth}">
<Border.RenderTransform>
<TranslateTransform X="0" Y="0"/>
</Border.RenderTransform>
<Grid>
<Rectangle x:Name="ThumbInnerRectangle" Fill="{StaticResource ControlBackground_Checked}" Stroke="{StaticResource ControlInnerBorder_Checked}" StrokeThickness="1"/>
<Path Height="9" Stroke="{TemplateBinding Foreground}" Width="6"/>
</Grid>
</Border>
</Grid>
<ContentPresenter x:Name="CheckedContent" ContentStringFormat="{TemplateBinding ContentStringFormat}" ContentTemplate="{TemplateBinding CheckedContentTemplate}" Grid.Column="2" Content="{TemplateBinding CheckedContent}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="False">
<Setter Property="BorderBrush" TargetName="PART_Thumb" Value="{StaticResource ControlOuterBorder_Normal}"/>
<Setter Property="Fill" TargetName="ThumbInnerRectangle" Value="{StaticResource ControlBackground_Normal}"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Opacity" TargetName="TrackBackground" Value="1"/>
<Setter Property="Opacity" TargetName="UncheckedTrackBackground" Value="0"/>
</Trigger>
<Trigger Property="IsChecked" Value="{x:Null}">
<Setter Property="BorderBrush" TargetName="PART_Thumb" Value="{StaticResource ControlOuterBorder_Normal}"/>
<Setter Property="Fill" TargetName="ThumbInnerRectangle" Value="{StaticResource ControlBackground_Normal}"/>
<Setter Property="Opacity" TargetName="TrackBackground" Value="0"/>
<Setter Property="Opacity" TargetName="UncheckedTrackBackground" Value="1"/>
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsKeyboardFocused" Value="True"/>
<Condition Property="IsEnabled" Value="True"/>
</MultiTrigger.Conditions>
<Setter Property="BorderBrush" TargetName="PART_Thumb" Value="{StaticResource ToggleSwitchButton_ThumbBorder_Focused}"/>
</MultiTrigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="BorderBrush" TargetName="PART_Thumb" Value="{StaticResource ControlOuterBorder_MouseOver}"/>
<Setter Property="Fill" TargetName="ThumbInnerRectangle" Value="{StaticResource ControlBackground_MouseOver}"/>
</Trigger>
<Trigger Property="IsPressed" Value="True">
<Setter Property="BorderBrush" TargetName="PART_Thumb" Value="{StaticResource ControlOuterBorder_Pressed}"/>
<Setter Property="Fill" TargetName="ThumbInnerRectangle" Value="{StaticResource ControlBackground_Pressed}"/>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter Property="Opacity" TargetName="UncheckedContent" Value="0.3"/>
<Setter Property="Opacity" TargetName="CheckedContent" Value="0.3"/>
<Setter Property="Opacity" TargetName="PART_Thumb" Value="0.3"/>
<Setter Property="BorderBrush" TargetName="PART_Thumb" Value="{StaticResource ToggleSwitchButton_TrackBorder_Disabled}"/>
<Setter Property="Stroke" TargetName="ThumbInnerRectangle" Value="{StaticResource ToggleSwitchButton_ThumbBackground_Disabled}"/>
<Setter Property="Fill" TargetName="ThumbInnerRectangle" Value="{StaticResource ToggleSwitchButton_ThumbBackground_Disabled}"/>
<Setter Property="BorderBrush" TargetName="TrackBackground" Value="{StaticResource ToggleSwitchButton_TrackBorder_Disabled}"/>
<Setter Property="Stroke" TargetName="TrackInnerBackground" Value="{StaticResource ToggleSwitchButton_ThumbBackground_Disabled}"/>
<Setter Property="Fill" TargetName="TrackInnerBackground" Value="{StaticResource ToggleSwitchButton_TrackBackground_Unchecked}"/>
<Setter Property="BorderBrush" TargetName="UncheckedTrackBackground" Value="{StaticResource ToggleSwitchButton_TrackBorder_Disabled}"/>
<Setter Property="Stroke" TargetName="UncheckedTrackInnerBackground" Value="{StaticResource ToggleSwitchButton_ThumbBackground_Disabled}"/>
<Setter Property="Fill" TargetName="UncheckedTrackInnerBackground" Value="{StaticResource ToggleSwitchButton_TrackBackground_Unchecked}"/>
</Trigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Mode=Self}}" Value="True"/>
<Condition Value="True">
<Condition.Binding>
<MultiBinding Converter="{StaticResource MultiBindingBooleanOrConverter}" Mode="OneWay">
<Binding ConverterParameter="Left" Converter="{StaticResource EnumToBooleanConverter}" Mode="OneWay" Path="ContentPosition" RelativeSource="{RelativeSource Mode=Self}"/>
<Binding ConverterParameter="Right" Converter="{StaticResource EnumToBooleanConverter}" Mode="OneWay" Path="ContentPosition" RelativeSource="{RelativeSource Mode=Self}"/>
</MultiBinding>
</Condition.Binding>
</Condition>
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" TargetName="UncheckedContent" Value="Hidden"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Mode=Self}}" Value="False"/>
<Condition Value="True">
<Condition.Binding>
<MultiBinding Converter="{StaticResource MultiBindingBooleanOrConverter}" Mode="OneWay">
<Binding ConverterParameter="Left" Converter="{StaticResource EnumToBooleanConverter}" Mode="OneWay" Path="ContentPosition" RelativeSource="{RelativeSource Mode=Self}"/>
<Binding ConverterParameter="Right" Converter="{StaticResource EnumToBooleanConverter}" Mode="OneWay" Path="ContentPosition" RelativeSource="{RelativeSource Mode=Self}"/>
</MultiBinding>
</Condition.Binding>
</Condition>
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" TargetName="CheckedContent" Value="Hidden"/>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding IsChecked, RelativeSource={RelativeSource Mode=Self}}" Value="{x:Null}"/>
<Condition Value="True">
<Condition.Binding>
<MultiBinding Converter="{StaticResource MultiBindingBooleanOrConverter}" Mode="OneWay">
<Binding ConverterParameter="Left" Converter="{StaticResource EnumToBooleanConverter}" Mode="OneWay" Path="ContentPosition" RelativeSource="{RelativeSource Mode=Self}"/>
<Binding ConverterParameter="Right" Converter="{StaticResource EnumToBooleanConverter}" Mode="OneWay" Path="ContentPosition" RelativeSource="{RelativeSource Mode=Self}"/>
</MultiBinding>
</Condition.Binding>
</Condition>
</MultiDataTrigger.Conditions>
<Setter Property="Visibility" TargetName="CheckedContent" Value="Hidden"/>
<Setter Property="Visibility" TargetName="UncheckedContent" Value="Hidden"/>
</MultiDataTrigger>
<Trigger Property="ContentPosition" Value="Left">
<Setter Property="Grid.Column" TargetName="CheckedContent" Value="0"/>
<Setter Property="Grid.Column" TargetName="UncheckedContent" Value="0"/>
<Setter Property="HorizontalContentAlignment" Value="Right"/>
</Trigger>
<Trigger Property="ContentPosition" Value="Both">
<Setter Property="Grid.Column" TargetName="UncheckedContent" Value="0"/>
<Setter Property="Grid.Column" TargetName="CheckedContent" Value="2"/>
<Setter Property="HorizontalAlignment" TargetName="CheckedContent" Value="Right"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="animation:AnimationManager.AnimationSelector">
<Setter.Value>
<animation:AnimationSelector>
<animation:AnimationGroup AnimationName="CheckedAnimation">
<animation:MoveAnimation Duration="0:0:0.4" TargetElementName="PART_Thumb">
<animation:MoveAnimation.Easing>
<QuadraticEase EasingMode="EaseInOut"/>
</animation:MoveAnimation.Easing>
</animation:MoveAnimation>
<animation:FadeAnimation Direction="Out" Duration="0:0:0.4" TargetElementName="UncheckedTrackBackground"/>
<animation:FadeAnimation Direction="In" Duration="0:0:0.4" TargetElementName="TrackBackground"/>
</animation:AnimationGroup>
<animation:AnimationGroup AnimationName="UncheckedAnimation">
<animation:MoveAnimation Duration="0:0:0.4" TargetElementName="PART_Thumb">
<animation:MoveAnimation.Easing>
<QuadraticEase EasingMode="EaseInOut"/>
</animation:MoveAnimation.Easing>
</animation:MoveAnimation>
<animation:FadeAnimation Direction="Out" Duration="0:0:0.4" TargetElementName="TrackBackground"/>
<animation:FadeAnimation Direction="In" Duration="0:0:0.4" TargetElementName="UncheckedTrackBackground"/>
</animation:AnimationGroup>
<animation:AnimationGroup AnimationName="IsThreeStateUncheckedAnimation">
<animation:MoveAnimation Duration="0:0:0.4" TargetElementName="PART_Thumb">
<animation:MoveAnimation.Easing>
<QuadraticEase EasingMode="EaseInOut"/>
</animation:MoveAnimation.Easing>
</animation:MoveAnimation>
</animation:AnimationGroup>
<animation:AnimationGroup AnimationName="IndeterminateAnimation">
<animation:MoveAnimation Duration="0:0:0.4" TargetElementName="PART_Thumb">
<animation:MoveAnimation.Easing>
<QuadraticEase EasingMode="EaseInOut"/>
</animation:MoveAnimation.Easing>
</animation:MoveAnimation>
<animation:FadeAnimation Direction="Out" Duration="0:0:0.4" TargetElementName="TrackBackground"/>
<animation:FadeAnimation Direction="In" Duration="0:0:0.4" TargetElementName="UncheckedTrackBackground"/>
</animation:AnimationGroup>
</animation:AnimationSelector>
</Setter.Value>
</Setter>
Jeroen
Hello. I have recently needed to repave my dev box. I got my latest code, setup two environment variables (username and password with the once only visible API key), as well as still have the nuget.config file and adding the proper telerik nuget server to the nuget manager. Unfortunately, I still have something wrong because when I compile, I get asked for my username and password what looks like it's the telerik nuget calls. Please help, this is driving me crazy. I'm just not able to figure this out.
I have ensured the nugetconfig is using the right\same environment variables as I have setup in the system environment. And the values are correct. Please help.
Can RadGlyph work with Font Awesome's Duotone font? For example, we want to render: https://fontawesome.com/icons/house?f=duotone&s=solid
I've tried various things, including:
<Grid>
<!-- Secondary (back) layer -->
<telerik:RadGlyph
Font="fads"
FontSize="40"
Glyph="􏀕"
Foreground="Red" />
<!-- Primary (front) layer -->
<telerik:RadGlyph
Font="fads"
FontSize="40"
Glyph=""
Foreground="Blue" />
</Grid>
This just renders an all blue house.
Reversing the elements:
<telerik:RadTabItem.Content>
<Grid>
<!-- Primary (front) layer -->
<telerik:RadGlyph
Font="fads"
FontSize="40"
Glyph=""
Foreground="Blue" />
<!-- Secondary (back) layer -->
<telerik:RadGlyph
Font="fads"
FontSize="40"
Glyph="􏀕"
Foreground="Red" />
</Grid>
I'm using the same technique I use to register regular Font Awesome fonts and have verified the codepoints exist:
var solidDuotoneFontFilePath = Path.Combine(directory, "Resources/Fonts", "Font Awesome 7 Duotone-Solid-900.otf");
var solidDuotoneFontUri = new Uri(solidDuotoneFontFilePath, UriKind.Absolute);
var solidDuotoneFontFamily = new FontFamily(solidDuotoneFontUri, "./#Font Awesome 7 Duotone Solid");
RadGlyph.RegisterFont(solidDuotoneFontFamily, "fads");
bool HasChar(FontFamily fam, int codePoint)
{
var tf = new Typeface(fam, FontStyles.Normal, FontWeights.Normal, FontStretches.Normal);
if (!tf.TryGetGlyphTypeface(out var gtf)) return false;
return gtf.CharacterToGlyphMap.ContainsKey(codePoint);
}
Debug.WriteLine($"Primary F015 present: {HasChar(solidDuotoneFontFamily, 0xF015)}");
Debug.WriteLine($"Secondary 10F015 present: {HasChar(solidDuotoneFontFamily, 0x10F015)}");