Telerik Forums
UI for WPF Forum
0 answers
58 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
181 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
263 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

Hi,

3 questions please about RadDocking element sizes and positioning.

It's quite a simple layout: 1 dockable navigation (filters/selection) pane and 1 results/data pane in the document host.

There can only be 1 tab in each pane but the layout will be used by many different screen types.

---------------------------------------------------------------------------------

1) Is it possible to make the resize strip wider? - it's very narrow and often difficult to find. In the screenshot below I've set the RadPaneGroups' borders to be thick, leaving the obvious and narrow resize strip in between,

 

---------------------------------------------------------------------------------

2) Is it possible to make the compass targets larger - they're very small.

 

---------------------------------------------------------------------------------

3) It it possible to set the dock position programmatically? I've put a simple context menu in the TitleTemplate.

The first call to this always works but subsequent calls don't do anything:


private void OnPositionContextMenuClicked(object sender, RoutedEventArgs e)
{
     DockState ds = (DockState)((MenuItem)sender).Tag;

     if(this.NavigationSplitContainer.InitialPosition != ds)
     {
        this.NavigationSplitContainer.InitialPosition = ds;
     }
}


 

 

Here's the XAML (a simplified version of the demo code - the panes are injected programatically):


<UserControl x:Class="DM_Frontend_Views.TwoPaneDockingScreen"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:DM_Frontend_Views"
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             xmlns:dock="clr-namespace:Telerik.Windows.Controls.Docking;assembly=Telerik.Windows.Controls.Docking"
             
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">
    <!-- xmlns:telerikQuickStart="clr-namespace:Telerik.Windows.Controls.QuickStart;assembly=QuickStart.Common" -->

    <UserControl.Resources>
        <ResourceDictionary>

            <SolidColorBrush x:Key="ContentForegroundBrush" Color="#FF020202" />
            <SolidColorBrush x:Key="LabelBrush" Color="#767676" />

            <DataTemplate x:Key="TitleTemplate">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="20" />
                    </Grid.ColumnDefinitions>
                    <ContentPresenter Content="{Binding}" Margin="0,0,75,0" />
                    <telerik:RadButton Grid.Column="1" x:Name="PositionButton" Content="^" Click="PositionButton_Click">
                        <telerik:RadButton.ContextMenu>
                            <ContextMenu Name="cm" StaysOpen="false">
                                <MenuItem Header="Left" Tag="{x:Static dock:DockState.DockedLeft}" Click="OnPositionContextMenuClicked"/>
                                <MenuItem Header="Right" Tag="{x:Static dock:DockState.DockedRight}" Click="OnPositionContextMenuClicked"/>
                                <MenuItem Header="Up" Tag="{x:Static dock:DockState.DockedTop}" Click="OnPositionContextMenuClicked"/>
                                <MenuItem Header="Down" Tag="{x:Static dock:DockState.DockedBottom}" Click="OnPositionContextMenuClicked"/>
                            </ContextMenu>
                        </telerik:RadButton.ContextMenu>
                    </telerik:RadButton>
                </Grid>
            </DataTemplate>

            <!-- <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/Docking;component/FirstLook/Resources.xaml" />
            </ResourceDictionary.MergedDictionaries> -->

        </ResourceDictionary>
    </UserControl.Resources>

    <Grid Margin="8 0">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <telerik:RadMenu Grid.Row="0">
            <telerik:RadMenuItem Header="FILE" />
            <telerik:RadMenuItem Header="EDIT" />
            <telerik:RadMenuItem Header="VIEW" />
        </telerik:RadMenu>

        <telerik:RadDocking x:Name="RadDocking"
                            RetainPaneSizeMode="DockingAndFloating"
                            CanAutoHideAreaExceedScreen="True"
                            Grid.Row="1" Margin="0 0 0 10"
                            BorderThickness="00"
                            Padding="0"                                                        
                            PreviewShowCompass="RadDocking_PreviewShowCompass">

            <!-- Navigation/selection pane -->
            <telerik:RadSplitContainer  MaxWidth="600" telerik:DockingPanel.InitialSize="296,150" MinWidth="300"
            Name="NavigationSplitContainer" InitialPosition="DockedLeft" BorderThickness="0,0,0,0">
                <telerik:RadPaneGroup x:Name="NavigationPaneGroup" BorderThickness="0,0,20,0">
                    <telerik:RadPane x:Name="NavigationPane" CanUserClose="False" CanFloat="True" CanDockInDocumentHost="False" TitleTemplate="{StaticResource TitleTemplate}" Title="">
                        <telerik:RadPane.Header>
                            <TextBlock FontSize="40" Text="Filters"/>
                        </telerik:RadPane.Header>
                        <telerik:RadPane.Content>
                            <Grid x:Name="NavigationContentGrid">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="17.5"/>
                                    <!-- Spacer -->
                                </Grid.RowDefinitions>
                            </Grid>
                        </telerik:RadPane.Content>
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>

            <!-- Data/results pane -->
            <telerik:RadDocking.DocumentHost>
                <telerik:RadSplitContainer x:Name="MainSplitContainer" BorderThickness="0,0,0,0">
                    <telerik:RadPaneGroup x:Name="MainPaneGroup" BorderThickness="20,0,0,0">
                        <telerik:RadPane x:Name="MainPane" Header="Main Pane" CanFloat="False" Visibility="Collapsed" CanUserClose="False">
                            <telerik:RadPane.Content>
                                <Grid x:Name="MainContentGrid">
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*"/>
                                        <RowDefinition Height="17.5"/>
                                        <!-- Spacer -->
                                    </Grid.RowDefinitions>
                                </Grid>
                            </telerik:RadPane.Content>
                        </telerik:RadPane>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking.DocumentHost>

        </telerik:RadDocking>
    </Grid>
</UserControl>

Any advice (maybe regarding Templates/Adorners) would be very much appreciated!

 

Martin Ivanov
Telerik team
 answered on 22 Jan 2025
0 answers
15 views

 

Hello,

I have found a bug in the Track Changes Mode. It also occurs in the latest version (in the demo). To reproduce the bug:

  1. Enable Track Changes mode.
  2. Insert some text, e.g., "Lorem Ipsum is simply dummy text of the printing and typesetting industry."
  3. Wait for a short period (to allow the insertion to occur at different times), approximately 10-15 seconds.
  4. After inserting a word entire the existing text (like on the screenshot), type a character or word, then immediately try to delete the last character using the backspace key. At this point, the error occurs: backspace does not remove the last character, only on the second attempt.

 

 

 

The error occurs in Telerik WPF 2022.1.222, but in the new version, it still appears, though without throwing exceptions (I checked in the lastest demo, and the last character doesn't delete on the first attempt).

Can you reproduce this issue, or is it a known problem?

Is there a solution available?

 

Emin Sadigov
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 21 Jan 2025
0 answers
9 views

Hi,

I have a ScheduleView where I want it to initially be readonly. But then open for edit by clicking a toggle button.

Right now I have added the ReadOnlyBehaviour... and I can see how I can remove it.. but adding it back when clicking out of Edit mode is not so clear.

hhgm
Top achievements
Rank 1
Iron
Iron
 asked on 20 Jan 2025
0 answers
13 views

I've been tasked with designing an interactive tutorial for our Desktop application.  I'm not a developer however so I'm not entirely clear on all the capabilities of the Telerik UI.

I see there is a callout available, which seems ideal but I have a question.  I want to ensure that the person has actually done the thing in the callout.  Is there a option to restrict what the user can select or click on, while running the tutorial?  If they do something different from what the tutorial is asking of them, it could for sure cause problems.

Jonathan
Top achievements
Rank 1
 asked on 17 Jan 2025
1 answer
20 views
Hi,

I am adding Rows to a RadGridView in the ViewModel while the View is displayed. When the RadGridView runs out of vertical Space, I would like the user to be able to scroll, but scrolling is not possible despite the Scrollbal being visible and Scrolling Enabled.


<telerik:RadGridView
    ScrollViewer.VerticalScrollBarVisibility="Visible"
    ScrollViewer.CanContentScroll="True"
    telerik:StyleManager.Theme="{StaticResource GreenTheme}"
    ItemsSource="{Binding FilteredMessages}"
    VerticalAlignment="Stretch"
    ScrollMode="RealTime"
    CanUserGroupColumns="False"
    IsReadOnly="True">
</telerik:RadGridView>

Martin Ivanov
Telerik team
 answered on 16 Jan 2025
0 answers
11 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
7 views

Hi there, 

I implemented a drag and drop behavior within a radgridview based on this page: https://docs.telerik.com/devtools/wpf/controls/dragdropmanager/how-to/howto-draganddrop-within-radgridview and it works correctly.

But now I need to introduce grouping of elements based on a specific property

<telerik:RadGridView.GroupDescriptors>
	<telerik:GroupDescriptor Member="GroupingField" SortDirection="Ascending" />
</telerik:RadGridView.GroupDescriptors>

I was able to modify the RadGridViewRowDragDropBehavior class so that dragging is limited to the current group, but when it is allowed, the dragged element falls to the last position in the group instead of the desired position. For example:

Group A
    Item 1
    Item 2
Group B
   Item 3
   Item 4
   Item 5
   Item 6
Group C
   Item 7

when I drag “item 3” and drop it after “item 4” the result is as follows: 

Group B
   Item 4
   Item 5
   Item 6
   Item 3

I tied to solve the problem by invoking the RadGridView.Rebind() method at the end of RadGridViewRowDragDropBehavior.OnDrop, but it does not work and I don't think this is the best solution, any suggestions?

Thanks

 

 

 

Carlo
Top achievements
Rank 1
Iron
 answered on 14 Jan 2025
Narrow your results
Selected tags
Tags
+? more
Top users last month
Mila
Top achievements
Rank 1
Iron
Toya
Top achievements
Rank 1
Iron
Iron
Kyle
Top achievements
Rank 1
Omar
Top achievements
Rank 3
Iron
Iron
Iron
Les Baker
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Mila
Top achievements
Rank 1
Iron
Toya
Top achievements
Rank 1
Iron
Iron
Kyle
Top achievements
Rank 1
Omar
Top achievements
Rank 3
Iron
Iron
Iron
Les Baker
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?