Telerik Forums
UI for WPF Forum
0 answers
100 views
The RadWebCam for WPF control currently relies on the SharpDX library to render the video feed. With 2024 Q4 we will replace SharpDX with the SkiaSharp library. This decision was taken because the SharpDX library is no longer maintained since March 2019.


Martin Ivanov
Top achievements
Rank 1
 asked on 10 Sep 2024
0 answers
224 views

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

Martin Ivanov
Top achievements
Rank 1
 asked on 28 May 2024
0 answers
303 views

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


Stenly
Top achievements
Rank 1
 asked on 30 Jan 2024
1 answer
12 views
We build using the Telerik UI for WPF NuGet Packages from your NuGet server.  Since I updated all our Telerik NuGet package references from a 2024 version to the most current 2025 version, I am now receiving licensing messages during my build process.  A lot of licensing messages.  They tend to look like this:


17>[Telerik and Kendo UI Licensing]
17>      Telerik and Kendo UI License Key found at: C:\Users\joe\AppData\Roaming\Telerik\telerik-license.txt (UserDirectory)
17>      License issued at 2025-02-25 to j*******@g*******.com.
17>[Telerik and Kendo UI Licensing]

And they are all over the place.

Please tell me that there is a way that I can silence these messages

They make it more difficult to locate the build output lines that I am truly interested in.  I don't need this information but if it must be output I don't need it this many times.
Martin Ivanov
Telerik team
 answered on 28 Apr 2025
1 answer
16 views

Hi Team,

We have developer license for the Telerik UI for WPF product, however we are unable to get the developer MSI for the Telerik UI for WPF 2024.1.130.45. Only the trial version is visible now.

Could you please guide us to get the dev  version of 2024.1.130.45? 

Martin Ivanov
Telerik team
 answered on 16 Apr 2025
1 answer
27 views
As the header state, after downloading the trial version of "Telerik_UI_for_WPF_Documentation_2025_1_211.chm", i opened the chm and navigated to the Contents Tab and when i clicked a topic nothing appears on the right side, What is wrong?
Martin Ivanov
Telerik team
 answered on 06 Mar 2025
2 answers
44 views

Hello,

I have to attach an xml file to a pdf document, generated by Telerik report Designer.

I have a problem at importing and exporting the generated document.

Import problems:
The MediaBox has values about 100 * 333333333, as you can see in the code, i already tried to reset its size.

Other Unknown problem:
Theres is no text displayed in the exported pdf, but the imported document has a page, and has page.Content.count=80, so there was data imported.

I already tried to remove/implement the PDFA-3b Standard for generation and exporting, but it is still the same result.
The generated document was validated and has correct PDFA-3b Standard.

I also tried to set the font to black via editor, because i thought theres maybe a font problem.

This problems only occures with invoices created by ReportDesigner.
A self created word document, exported to pdf works well.

Code for generating the document by ReportDesigner:

public void Export(object param)
{
    try
    {
        Logger.Log("Executing PrintDialogView.Export", LogLevels.Debug, null, 2);
        if (param != null)
        {
            Microsoft.Win32.SaveFileDialog dialog = new Microsoft.Win32.SaveFileDialog();
            dialog.FileName = FileName;
            dialog.Filter = String.Format("(*.{0})|*.{1}", param.ToString(), param.ToString());
            var SavePath = Repository<AppSetting>.GetSingle(Context, u => u.Key == AppSettingTypes.SavePath.ToString());
            if (SavePath != null && SavePath.Value != string.Empty)
			{
				dialog.InitialDirectory = SavePath.Value.ToString();
			}

            if (dialog.ShowDialog() == true)
            {

				// DeviceInfo für PDF/A-3 konfigurieren
				System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
				deviceInfo["ComplianceLevel"] = "PDF/A-3B"; // PDFA-3b-Standard

				Telerik.Reporting.Processing.ReportProcessor reportProcessor = new Telerik.Reporting.Processing.ReportProcessor();
				Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", ReportSource, deviceInfo);
				//Telerik.Reporting.Processing.RenderingResult result = RenderExport(param.ToString());

				using (System.IO.FileStream fs = new System.IO.FileStream(dialog.FileName, System.IO.FileMode.Create))
                {
                    fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
                    System.IO.FileInfo fi = new System.IO.FileInfo(dialog.FileName);
                    Logger.Log(String.Format("File saved to Directory = {0}, Filename = {1}", fi.Directory, fi.FullName), LogLevels.Debug, null, 2);
                    ReturnExport(fi.Extension, System.IO.Path.GetFileNameWithoutExtension(dialog.FileName), result.DocumentBytes);
                }
                if (SaveDocumentFile)
                {
                    DocumentNumber = GetAndSetNextDocumentNumber(SelectedDocumentLayout);
                }
            }
        }
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.ToString(), "Fehler", MessageBox.MessageBoxButtons.Okay, MessageBox.MessageBoxImages.Error);
    }
}


Code for Import/Export the generated Document

using iText.IO.Colors; using iText.Kernel.Pdf; using iText.Kernel.XMP.Options; using iText.Kernel.XMP; using iText.Pdfa; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf; using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Export; using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Model.Encryption; using Telerik.Windows.Documents.Fixed.Model; using System.Diagnostics; using iText.Pdfa.Exceptions; using Telerik.Windows.Documents.Fixed.Model.Text; using System.Windows; using Telerik.Windows.Documents.Fixed.Model.Editing; using Telerik.Documents.Fixed.Model.Fonts; using Telerik.Documents.Media; using Telerik.Windows.Documents.Fixed.Model.ColorSpaces; using System.Drawing; namespaceZUGFeRD_ConsoleTest { publicclassTest { public RadFixedDocument LoadPdf(string @pdfPath) { // Read the PDF file as a byte arraybyte[] pdfBytes = System.IO.File.ReadAllBytes(@pdfPath); // Create a PdfFormatProvider instance PdfFormatProvider provider = new PdfFormatProvider(); // Import the PDF into a RadFixedDocument RadFixedDocument document = provider.Import(pdfBytes, new TimeSpan(0, 0, 60));

// RadFixedDocumentEditor editor = new RadFixedDocumentEditor(document); //RgbColor black = new RgbColor(127, 255, 255, 255);//RgbColor white = new RgbColor(0, 0 , 0, 0);

//editor.CharacterProperties.ForegroundColor = black;//editor.ParagraphProperties.BackgroundColor = white;

if (document.Pages.Count == 0) { thrownew Exception("Das geladene PDF-Dokument enthält keine Seiten."); } foreach(var page in document.Pages) { if(page.Content != null) { Console.WriteLine($"Seite mit {page.Content.Count} Objekten geladen."); foreach (var content in page.Content) { Console.WriteLine(content.ToString()); } } //page.MediaBox = new System.Windows.Rect(0, 0, 2480, 3508); //page.CropBox = page.MediaBox; } //editor.Dispose(); return document; }public void ExportDocument(RadFixedDocument document, string targetPath) { // Export to PDF including xml file PdfFormatProvider provider = new PdfFormatProvider(); PdfExportSettings settings = new PdfExportSettings(); if (provider.CanExport) { settings.ComplianceLevel = PdfComplianceLevel.PdfA3B; settings.IsEncrypted = false; settings.FontEmbeddingType = FontEmbeddingType.None; provider.ExportSettings = settings; //System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();//deviceInfo["ComplianceLevel"] = "PDF/A-3B"; // PDF/A-3-Standardbyte[] exportBytes = provider.Export(document, new TimeSpan(0, 0, 60)); using (FileStream fs = new FileStream(targetPath, FileMode.Create)) { fs.Write(exportBytes, 0, exportBytes.Length); } //using (Stream output = System.IO.File.Create(targetPath))//{// provider.Export(document, output, new TimeSpan(0, 0, 60));// FileInfo fileInfo = new FileInfo(targetPath);// Console.WriteLine($"Exportierte Datei Größe: {fileInfo.Length} Bytes");//} } //Telerik.Reporting.Processing.RenderingResult result = reportProcessor.RenderReport("PDF", new ReportSource(), deviceInfo);//Telerik.Reporting.Processing.RenderingResult result = RenderExport(param.ToString());//using (System.IO.FileStream fs = new System.IO.FileStream(targetPath, System.IO.FileMode.Create))//{// fs.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);// System.IO.FileInfo fi = new System.IO.FileInfo(pdfPath);// } public void ExportDocumentByiText7(PdfDocument document, string targetPath) { // Paths for input and output filesstring outputPdfPath = targetPath; string iccProfilePath = "sRGB.icc"; // Ensure you have an ICC profile file// Create a PdfWriter for the output fileusing (PdfWriter writer = new PdfWriter(outputPdfPath)) { // Load the ICC profile IccProfile iccProfile = IccProfile.GetInstance(System.IO.File.ReadAllBytes(iccProfilePath)); // Create a PdfADocument with PDF/A-3b conformance PdfADocument pdfaDocument = new PdfADocument(writer, PdfAConformance.PDF_A_3B, new PdfOutputIntent("Custom", "", null, "sRGB IEC61966-2.1", writer)); // Add metadata (required for PDF/A compliance) pdfaDocument.GetDocumentInfo().SetTitle("Sample PDF/A-3b Document"); pdfaDocument.GetDocumentInfo().SetAuthor("Your Name"); pdfaDocument.GetDocumentInfo().SetSubject("PDF/A-3b Export Example"); // Add XMP metadata XMPMeta xmpMeta = XMPMetaFactory.Create(); xmpMeta.SetProperty(XMPConst.NS_DC, "title", "Sample PDF/A-3b Document", new PropertyOptions(PropertyOptions.SEPARATE_NODE)); pdfaDocument.SetXmpMetadata(xmpMeta); // Add content to the document pdfaDocument.AddNewPage(); // Add an empty page as an example// Close the document to finalize it pdfaDocument.Close(); } // Output message System.Console.WriteLine("PDF/A-3b document created successfully!"); } } }


 

Yoan
Telerik team
 answered on 07 Feb 2025
0 answers
31 views

Hi All,

I am developing a tool for Autodesk Revit using the pyrevit extension and IronPython. For this, I have implemented a custom control called IntegerUpDown, which I need to use in my tool. I tested the control in Visual Studio, and it works well. However, I am struggling to use my control in pyrevit by referencing it's name space in my main xaml file, considering the structure of my project attached below:

Please check my references:

IntegerUpDown.xaml :

<UserControl 
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

             MinWidth="50">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>

        <Grid Grid.Column="0">
            <TextBox x:Name="NumericText" Grid.Column="0"
                     Text="0"
                     TextAlignment="Center"
                     BorderBrush="Black" Margin="0,0,0.2,0" />
        </Grid>
        <Grid Grid.Column="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <RepeatButton x:Name="PART_IncreaseButton" Click="btnIncrease_Click" Grid.Row="0" Margin="0,0,0,0.1"
				  Width="15" BorderThickness="0.75">
                <Polygon x:Name="PART_Up_Polygon" 
                         HorizontalAlignment="Center" 
                         VerticalAlignment="Center" Margin="2"
						 StrokeThickness="0.5" Stroke="Transparent" 
                         Points="0,0 -2,5 2,5" Stretch="Fill" Fill="Black"/>
            </RepeatButton>
            <RepeatButton x:Name="PART_DecreaseButton" Click="btndecrease_Click"  Grid.Row="1" Margin="0,0.1,0,0" 
				  Width="15" BorderThickness="0.75">
                <Polygon x:Name="PART_Down_Polygon" HorizontalAlignment="Center" 
                         VerticalAlignment="Center" Margin="2"
						 StrokeThickness="0.5" Stroke="Transparent" 
                         Points="-2,0 2,0 0,5 " Stretch="Fill" Fill="Black"/>
            </RepeatButton>
        </Grid>

    </Grid>
</UserControl>


IntegerUpDown.py:

import os, clr, wpf

from System.Windows.Controls import UserControl


script_path = os.path.dirname(__file__)

class IntegerUpDown(UserControl):
    def __init__(self):
        xaml_path = os.path.join(script_path, 'IntegerUpDown.xaml')
        wpf.LoadComponent(self, xaml_path)

    def btnIncrease_Click(self, sender, e):
        num = int(self.NumericText.Text)
        num += 1
        self.NumericText.Text = str(num)

    def btnDecrease_Click(self, sender, e):
        num = int(self.NumericText.Text)
        num = max(num - 1, 0)
        self.NumericText.Text = str(num)


grids.xaml  (Main xaml):

<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        <!--I am struggling what putting here?-->
        xmlns:local="clr-namespace:...."
        Title="Grids"
        Height="500"  Width="340"
        WindowStartupLocation="CenterScreen">
    <Grid Margin="10">
        <Grid.RowDefinitions>
            <RowDefinition Height="7*"/>
            <RowDefinition Height="86*"/>
            <RowDefinition Height="7*"/>
        </Grid.RowDefinitions>

        <DockPanel >
            <Label Content="Nom :" />
            <TextBlock Text="Grid for Revit" Width="150" Margin="0,4,0,0" />
        </DockPanel>

        <TabControl Grid.Row="1">
            <TabItem Header="X" Width="50">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="65*"/>
                        <ColumnDefinition Width="35*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="7*"/>
                        <RowDefinition Height="7*"/>
                        <RowDefinition Height="79*"/>
                        <RowDefinition Height="7*"/>
                    </Grid.RowDefinitions>
                    <DockPanel Grid.ColumnSpan="2">
                        <Label Content="Position:" Margin="0,0,40,0"/>
                        <Label Content="Repeter x:" Margin="0,0,40,0"/>
                        <Label Content="Espacement:"/>
                    </DockPanel >
                    <DockPanel Grid.Row="1" Grid.ColumnSpan="2">
                        <TextBox Width="50" Text="0.00" Margin="0,0,5,0"/>
                        <TextBlock Text="(m)" Margin="0,0,25,0" Width="20"/>
                        <IntegerUpDown x:Name="MyUpDown" Minimum="00" Margin="0,0,50,0"/>
                        <TextBox Width="50" Text="0.00" Margin="0,0,5,0"/>
                        <TextBlock Text="(m)" Width="20" HorizontalAlignment="Left" />
                    </DockPanel>
                    <ListBox Grid.Row="2" Margin="0,5,0,0">
                        <ListBoxItem>
                            1
                        </ListBoxItem>
                        <ListBoxItem>
                            2
                        </ListBoxItem>
                        <ListBoxItem>
                            3
                        </ListBoxItem>
                    </ListBox>
                    <StackPanel Grid.Column="1" Grid.Row="2">
                        <Button Name="ajouter_X" Content="Ajouter" Click="ajouter_X_Click" VerticalAlignment="Top" Margin="5,50,5,10"/>
                        <Button Name="supprimer_X" Content="Supprimer" Click="supprimer_X_Click"  Margin="5,0,5,10"/>
                        <Button Name="supprimer_tout_X" Content="Supprimer tout" Click="supprimer_tout_X_Click"  Margin="5,0,5,10"/>
                    </StackPanel>
                </Grid>
            </TabItem>
         </TabControl>

        <DockPanel Grid.Row="2">
            <Button Content="Appliquer" Width="100" Height="25"/>
            <Button Content="Fermer" Width="100" Height="25"  Click="Fermer_Click" HorizontalAlignment="Right"/>
        </DockPanel>

    </Grid>
</Window>


Grids_script.py (Main script) :


# -*- coding: UTF-8 -*-
import wpf, clr, os

from System.Windows import Window


script_path = os.path.dirname(__file__)
class Mywindow(Window):
    def __init__(self):
        xaml_path = os.path.join(script_path, 'grids.xaml')
        wpf.LoadComponent(self, xaml_path)

    def ajouter_X_Click(self, sender, e):
        pass

    def supprimer_X_Click(self, sender, e):
        pass

    def supprimer_tout_X_Click(self, sender, e):
        pass

    def Fermer_Click(self, sender, e):
        self.Close()

if __name__ == "__main__":
    Grids = Mywindow()
    Grids.ShowDialog()

 

Any help would be appreciated

 

Thanks.

 

 

Redouane
Top achievements
Rank 1
 asked on 15 Jan 2025
1 answer
75 views

I have a new WPF application, one that I am updating from Framework to Core.   Everything has been converted and working properly except for one thing: the CheckBoxControl controls are not displaying.  All other controls, including things like RadButton are RadGridView, are all displaying and working perfectly.    I deleted the BIN and OBJ folders and cleaned the project, no change.   

If I change the code to use the standard WPF CheckBox control everything works correctly.

The main project of the solution has this inside it's project file:

    <PackageReference Include="Telerik.UI.for.Wpf.80.Xaml" Version="2024.4.1213" />
    <PackageReference Include="Telerik.Windows.Themes.Crystal.for.Wpf" Version="2024.4.1213" />

I have other projects in the solution that have working Telerik controls (except for the CheckBoxControl) that contain this in their project files:

    <PackageReference Include="Telerik.UI.for.Wpf.80.Xaml" Version="2024.4.1213" />

in the xaml form:

<telerik:CheckBoxControl Grid.Row="5" Grid.Column="0" Name="ChkCustomProcess"  HorizontalAlignment="Right" VerticalAlignment="Center"  Margin="5" />

// I have tried this with and without binding to the IsChecked property.

Everything else works fine, including the theming, except for the invisible CheckBox Control.   IntelliSense works in the editor; no compilation errors or warnings.

I am using the NuGet packages from Telerik.  There are no pending updates. I am not referencing any NoXaml packages.

It's probably something simple I am missing. Any thoughts and ideas would be greatly appreciated.

Thanks,
Lou

Martin Ivanov
Telerik team
 answered on 13 Jan 2025
1 answer
51 views

I use nuget.telerik for my CI/CD.

There is actually a bug in WPF controls (Touch Manager) which is fixed in preview version Telerik UI for WPF 2024.4.1126

But this version is not available throught nuget.telerik.

How can I use it in my CI/CD?

Stenly
Telerik team
 answered on 27 Nov 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?