Telerik Forums
UI for WPF Forum
0 answers
129 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
0 answers
3 views

In the HtmlExportSettings there is no valid ImageExportMode that word is compatible with as it is not able to display Base64 encoded images.

Is there another ImageExportMode that is compatible?

OR

Is there a better solution to insert images from RichTextBox into a Microsoft word document? Possibly, create RadDocument from the word document I have and replace it in the RadDocument and do conversion to Microsoft word document?

Open to suggestions.

Patrick
Top achievements
Rank 1
Iron
Iron
 asked on 10 May 2024
1 answer
5 views
Hi , I'm trying to automate the testing of a WPF program by writing code. I can perform actions on the main window of the program, but I can't do it on a different window. I think the reason for this is that it doesn't recognize that window. However, I couldn't find out how to switch to a different window.Can you help me ?. Here's an example of the code I've written:
        [CodedStep(@"Type 'XXX' into ServerNameWatermarkTextbox")]
        public void ConfirmInstalledDate_CodedStep()
        {
            string formattedDate = DateTime.Now.ToString("yyyy-MM-dd");
            ActiveApplication.MainWindow.Find.ByName("serverNameWatermark").User.TypeText("XXX",2);
            ActiveApplication.MainWindow.Find.ByName("usernameWaterMark").User.TypeText("logadmin",2);         
            ActiveApplication.MainWindow.Find.ByName("usernameWaterMark").KeyPress(ArtOfTest.WebAii.Win32.KeyBoard.KeysFromString("Tab"),1,1,1);
            ActiveApplication.MainWindow.Find.ByName("pwdBox").User.TypeText("XXX",2);
            ActiveApplication.MainWindow.Find.ByName<Button>("btnSignIn").User.Click();
            System.Threading.Thread.Sleep(5000);
            ActiveApplication.MainWindow.Find.ByName("imgData").User.Click();
            ActiveApplication.MainWindow.Find.ByTextContent("Status").User.Click(MouseClickType.RightClick);
            ActiveApplication.MainWindow.Find.ByTextContent("Select columns").User.Click();
            ActiveApplication.GetWindow("Select columns");
            ActiveApplication.GetWindow("Select columns").Find.ByName("txtSearch").User.TypeText("Date",2); 
            System.Threading.Thread.Sleep(5000);
            ActiveApplication.GetWindow("Select columns").Find.ByName("txtSearch").User.KeyPress(System.Windows.Forms.Keys.Enter,1);
            ActiveApplication.MainWindow.Find.ByTextContent("^"+formattedDate).User.Click();
            System.Threading.Thread.Sleep(2000);
        }
    }
Patrick
Top achievements
Rank 1
Iron
Iron
 answered on 10 May 2024
0 answers
2 views
How can I bind a property to RadRichTextBox FontSize and FontFamily? I get errors saying the property types don't match but they do. FontSize property is double and FontFamily property type is FontFamily. Any ideas?
Patrick
Top achievements
Rank 1
Iron
Iron
 asked on 10 May 2024
1 answer
3 views

Hello,

I would like to add a slide button under the tile view like screenshot.

How can I add a button under the tile view?

Thanks for your feedback.

Martin Ivanov
Telerik team
 answered on 10 May 2024
1 answer
4 views
I have a simple NumericUpDown control showing milliseconds.  I use a 'ms' custom unit to show alongside the number. 

<tk:RadNumericUpDown  Width="150"  Height="50"
    Value="{Binding Exposure}"
    IsInteger="True"
    CustomUnit="ms"/>

It looks good but as soon as hit the + or - key, the 'ms' disappears and I have just a number.  This is because hitting +/- gives keyboard focus to the edit box -- activates the cursor in there and all that.    Once I click somewhere else focus leaves the edit box, the 'ms' re-appears.

Is there a property or some simple way that would let me prevent this behavior?   I want +/- to just change the number without grabbing the keyboard focus.  

Note that I do still want the number to be user-editable if they actually go to the trouble of clicking directly in the edit box itself.  I just want to stop +/- from doing that for me.
Dimitar
Telerik team
 answered on 09 May 2024
0 answers
3 views

ChartView experiences frequent garbage collection in TrackInfoUpdated after Tooltip of any control is activated.

    <Grid Loaded="Grid_Loaded">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel>
            <TextBlock x:Name="DTextBlock"></TextBlock>
            <StackPanel Width="200" Height="25" ToolTip="SSSS" Background="Red"></StackPanel>
        </StackPanel>
        <telerik:RadCartesianChart Grid.Row="1" x:Name="DMainChart">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeCategoricalAxis MajorTickInterval="30" LineStroke="Transparent">
                </telerik:DateTimeCategoricalAxis>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis />
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.Series>
                <telerik:LineSeries x:Name="DLineSeries" CategoryBinding="Seq" ValueBinding="Open"></telerik:LineSeries>
            </telerik:RadCartesianChart.Series>
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartPanAndZoomBehavior ZoomMode="Horizontal" DragMode="Pan"/>
                <telerik:ChartTrackBallBehavior ShowIntersectionPoints="False" ShowTrackInfo="False" TrackInfoUpdated="ChartTrackBallBehavior_TrackInfoUpdated"/>
            </telerik:RadCartesianChart.Behaviors>
        </telerik:RadCartesianChart>
    </Grid>

        private void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            if (sender is Grid grid)
            {
                grid.DataContext = this;
                ObservableCollection<SeriesKLineModel> ChartKLine = new ObservableCollection<SeriesKLineModel>();
                Random random = new Random();
                for (int i = 0; i < 5000; i++)
                {
                    SeriesKLineModel mode = new SeriesKLineModel(DateTime.Now.AddDays(i), random.Next(10, 20), 5, -5, 0, Color.FromRgb(33, 141, 252));
                    mode.Seq = mode.Seq.AddHours((-1) * i);
                    ChartKLine.Add(mode);
                }
                this.DLineSeries.ItemsSource = ChartKLine;
                this.DTextBlock.SetBinding(TextBlock.TextProperty, new Binding(nameof(TestText)));
            }
        }
        private string _TestText = "";
        public event PropertyChangedEventHandler PropertyChanged;
        public string TestText
        {
            get
            {
                return _TestText;
            }
            set
            {
                _TestText = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(TestText)));
            }
        }

        private void ChartTrackBallBehavior_TrackInfoUpdated(object sender, Telerik.Windows.Controls.ChartView.TrackBallInfoEventArgs e)
        {
            DataPointInfo pointInfo = e.Context?.ClosestDataPoint;
            if (pointInfo != null && pointInfo.DataPoint.DataItem is SeriesKLineModel data)
            {
                string str = data.Seq.ToLongDateString();
                Task.Run(() =>
                {
                    this.TestText = str;
                });
            }
        }
力源
Top achievements
Rank 1
 asked on 08 May 2024
0 answers
3 views

i have a combo box that i need when i select one of it's items, it will open a new sub combo box to choose a sub item

 

is it feasible?

Wael
Top achievements
Rank 1
Iron
 asked on 07 May 2024
0 answers
5 views

The Telerik WPF ScheduleView's appointment cells have a problem with intersecting times when assigning schedules within a one-minute timeframe. For example, when I drag and drop to assign a schedule like 12:30 PM - 1:30 PM, and then another schedule from 1:30 PM - 2:30 PM, sometimes it displays two cells in one column (as shown in the right corner), while other times it functions correctly (as shown in the left corner).

I must emphasize that this is a bug in the user interface. Is there a way you can address and fix this issue? Thank you!

Bryan
Top achievements
Rank 1
 asked on 06 May 2024
1 answer
7 views
I have found this documentation online in order to extract and modify the default template style for telerik controls.

https://docs.telerik.com/devtools/wpf/controls/radrichtextbox/styles-and-templates/styling-radrichtextbox#:~:text=To%20copy%20the%20default%20style%2C%20load%20your%20project%20in%20Expression,Style%20%2D%3E%20Edit%20a%20Copy.

I've done this many times on standard WPF controls so I am familiar with the process. When I open project, I get the below options. There is no option to edit style and edit a copy.



Object -> Edit Style -> Edit a Copy.

Martin Ivanov
Telerik team
 answered on 06 May 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mark
Top achievements
Rank 1
Yurii
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Hon
Top achievements
Rank 1
Iron
Deltaohm
Top achievements
Rank 3
Bronze
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?