Hi,
How can I control the background colour of the extended bit of the header in a RadVirtualGrid? See the area circled in red on the screenshot.
Thanks in advance,
__Jason
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!
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:
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?
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.
<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>
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.
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
Hi,
I am using the TreeListView control and I've come along with it pretty well. A few days ago, I stumbled upon a small problem which I couldn't solve so far.
The bottom and right border of the TreeListView control appear to be thicker than the left and top border. This is caused by the interior cell borders: each cell seems to have a border on the bottom and right.
As soon as the cell border and the TreeListView border are directly next to each other, there's an 'illusion' created that the overall border is double in thickness.
E.g., as soon as I scroll to the bottom of the table, the border of the last cell will 'connect' with the overall table border:
In the attached screenshot, each border has a thickness of 1. But two borders which are layouted directly next to each other will make it look like the border has a thickness of 2.
The same problem appears on the right side of the table. I have some table rows which do not show borders at all, which is solved with a style selector (red arrow in the screenshot). This leads to a different thickness of the right border in comparison to a 'normal' row (blue arrow in the screenshot).
How could I solve this issue? My suggestion would be to use a style / template which is only applied to the last row / column. In the last row, the bottom border would have a thickness of 0; in the last column, the right border would have a thickness of 0. The bottom right cell would have no own borders at all because its optical borders are provided by the left and upper cell and the overall table border.
But I have no idea how to apply this. I have seen such solutions in other projects but I can't manage to apply it to the Telerik TreeListView. I Imagine it could be implemented by a mechanism which automatically determines the last row and cell and then applies a different template.
Thanks a lot in advance! Any help is highly appreciated.
Hi,
I am using a RadGridView with an unmodified GreenTheme. I disabled Grouping Columns, but the Area to group columns at the top of the grid is still shown and I can not find an easy way to hide it.
How can I make it disappear?
<telerik:RadGridView
CanUserGroupColumns="False"
ScrollViewer.VerticalScrollBarVisibility="Visible"
ScrollViewer.CanContentScroll="True"
telerik:StyleManager.Theme="{StaticResource GreenTheme}"
ItemsSource="{Binding FilteredMessages}"
VerticalAlignment="Stretch"
ScrollMode="RealTime"
IsReadOnly="True" />
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.
<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:
// 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