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)}");


This can be duplicated in the Telerik UI for WPF Desktop Examples app.
One of my clients uses a fleet of Logitech C920e cameras to capture photos. The RadWebCam's preview is very jerky and severely lags behind camera movement on every kind of computer we've tested (all running Windows 11) . This issue isn't present with the couple other camera models we've tested.
I've tested other webcam photo capture apps on Windows 11 and they all work fine with this camera (no lags, no jerkiness). This includes DevExpress's "Outlook-Inspired Application" demo WPF app.
I'm looking to load/save the appointments to a local file rather than a database.
I found a forum post from 2015 which seems a bit out of date.
Is there any facility for this and if not what is the suggested route? I don't want to ship a database source within my application.
Many thanks
There appears to be a bug in the column filter popup. Whenever I change one filter operator, the second filter operator changes to the same value. So I can't do something like GreaterThan X and LessThan Y.
See a video here: https://share.cleanshot.com/6Bn9FwlJ
Hi,
I have this code, thats not working like this.
Because of the DataContext, the DocumentSource wont work, because it needs obviously a different DataContext.
But I need this DataContext for the ContextMenu to work.
Is there a way I can have both? A working context menu and also bind the DocumentSource?
Greetings
Benedikt
<telerik:RadPdfViewerToolBar
Grid.Row="1"
x:Name="pdfViewerToolBarZeichnungen"
Margin="0 5 0 0"
RadPdfViewer="{Binding ElementName=pdfViewerZeichnungen}"
HasSaveButton="{DynamicResource SonderRechtPDFsSpeichernErlaubt}"
HasSignatureButton="False"
HasPercentComboBox="False"
HasPrintButton="{DynamicResource SonderRechtPDFsSpeichernErlaubt}"
/>
<telerik:RadPdfViewer
Grid.Row="2"
x:Name="pdfViewerZeichnungen"
DocumentSource="{Binding SelDatei.FilePath, Converter={StaticResource PdfDocumentSourceValueConverter}}"
DataContext="{Binding CommandDescriptors, ElementName=pdfViewerZeichnungen}"
telerik:RadPdfViewerAttachedComponents.RegisterFindDialog="True"
telerik:RadPdfViewerAttachedComponents.RegisterContextMenu="True"
Mode="TextSelection"
>
<telerik:RadListBox.DragDropBehavior>
<telerik:ListBoxDragDropBehavior AllowReorder="False"/>
</telerik:RadListBox.DragDropBehavior>
<telerik:RadListBox.DragVisualProvider>
<telerik:ScreenshotDragVisualProvider />
</telerik:RadListBox.DragVisualProvider>
<telerik:RadListBox.ItemsPanel>
<ItemsPanelTemplate>
<telerik:RadWrapPanel HorizontalAlignment="Stretch"/>
</ItemsPanelTemplate>
</telerik:RadListBox.ItemsPanel>