Telerik Forums
UI for WPF Forum
0 answers
26 views

This should be trivial, but.... I see an old question about this at HorizontalContentAlignment doesn't work in UI for WPF | Telerik Forums.  When I download the sample, it works as advertised, even if I upgrade to the latest.  However, in my project I can't seem to get the text to right-justify.  This is a direct copy of my XAML:

<telerik:RadNumericUpDown Grid.Row="9" Grid.Column="1" Width="100" NumberDecimalDigits="0" Value="{Binding MyIntField}" HorizontalContentAlignment="Right" />

And yet...

If I inspect the field in the live tree, "HorizontalContentAlignment" shows "Right".

What have I got wrong?

 

Bradley
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 10 Apr 2025
1 answer
54 views

When reading https://docs.telerik.com/devtools/wpf/controls/radgridview/hierarchical-gridview/self-referencing-grid I was expecting that `Self-Referencing` RadGridView means it uses own columns and rest visual stuff to display all nested child RadGridViews. Since it references the same type in the underlying data on every hierarchy level (that is self-referencing), it's obviously should display all levels in the same way (as it displays itself on top-level). 

Turned out it was not the case. Each child level requires own visual template, own columns with own styling. We have about 20 columns with heavy styling each (more than 500 lines in .xaml) for top-level `RadGridView`. Copy-pasting all that into `RadGridView.HierarchyChildTemplate` is not an option.

In your demo application, I saw that you add columns manually for a child `RadGridView` from `RadGridView1_DataLoading` handler in code-behind. I was hoping it was a mistake.

 

Martin Ivanov
Telerik team
 answered on 08 Apr 2025
1 answer
70 views

I was looking at the https://www.telerik.com/forums/preview-(and-stop)-selectionchanged post from 5 years ago. In the first answer, there was an attached solution to the problem. If using the ItemsSource binding, you could prevent the change by not firing the OnPropertyChanged event.

I loaded this project using the 2025Q1 dlls and while the SelectedItem may not technically update, the UI reflects that the item is selected. Is there an updated solution to this?

Martin Ivanov
Telerik team
 answered on 01 Apr 2025
1 answer
39 views

Hi,

The radwindow does not show up unless I put Style="{DynamicResource RadWindowStyle}".

May I ask where do I put theme for my radwindow?

 

And how do I change the radwindowstyle? It shows up the minimize, close button on the left side but I would want it to put on the right side of the window.

Martin Ivanov
Telerik team
 answered on 28 Mar 2025
1 answer
36 views

Hello,

In our app we are using filtering through a RadGridView bound to a QueryableCollectionView that wraps an ObservableCollection. Now I'm trying to use that filtered QueryableCollectionView as the ItemSource for a VisualizationLayer in a RadMap so that the filter on the grid also applies to items shown on the map, but the bind fails with the following error: "System.ArgumentException: 'Telerik.Windows.Data.QueryableCollectionView' is not a valid value for property 'Source'."

I've attached a quick project replicating the issue with the relevant code in MainWindow.xaml:

            <!-- Doesn't work -->
            <telerik:VisualizationLayer ItemsSource="{Binding ItemViewModelsView }" ItemSelectionMode="None">
                <telerik:VisualizationLayer.ItemTemplate>
                    <DataTemplate DataType="{x:Type local:ItemViewModel}">
                        <Ellipse Fill="Blue" Width="12" Height="12" telerik:MapLayer.Location="{Binding Location}"/>
                    </DataTemplate>
                </telerik:VisualizationLayer.ItemTemplate>
            </telerik:VisualizationLayer>
            
            <!-- Also doesn't work pulling directly from the GridView -->
            <telerik:VisualizationLayer ItemsSource="{Binding Items, ElementName=GridView }" ItemSelectionMode="None">
                <telerik:VisualizationLayer.ItemTemplate>
                    <DataTemplate DataType="{x:Type local:ItemViewModel}">
                        <Ellipse Fill="Blue" Width="12" Height="12" telerik:MapLayer.Location="{Binding Location}"/>
                    </DataTemplate>
                </telerik:VisualizationLayer.ItemTemplate>
            </telerik:VisualizationLayer>
            
            <!-- Works but isn't filtered -->
            <telerik:VisualizationLayer ItemsSource="{Binding ItemViewModels }" ItemSelectionMode="None">
                <telerik:VisualizationLayer.ItemTemplate>
                    <DataTemplate DataType="{x:Type local:ItemViewModel}">
                        <Ellipse Fill="Blue" Width="12" Height="12" telerik:MapLayer.Location="{Binding Location}"/>
                    </DataTemplate>
                </telerik:VisualizationLayer.ItemTemplate>
            </telerik:VisualizationLayer>

and the ViewModel:

public partial class MainWindowViewModel : ObservableObject
{
    [ObservableProperty] private ObservableCollection<ItemViewModel> _itemViewModels;
    public QueryableCollectionView ItemViewModelsView { get; private set; }
//...
}

It appears to me that the issue is because QueryableCollectionView is both an IEnumerable and a ICollectionView so when it tries to assign it to the MapItemsSource the CollectionViewSource.IsSourceValid() that's called during that assignment is returning false because it is an ICollectionView.

Is there a known workaround for this or suggested alternative to get the expected functionality?

Thanks!

Petar Mladenov
Telerik team
 answered on 26 Mar 2025
0 answers
39 views

RadGridView, for WPF .NET Framework 4.8, automatically hides rows that do not match the filter/search criteria after a row has been edited. How does one prevent the auto-filtering/searching?

A very important workflow for our customers is to search / filter for outliers and then edit the found rows. After they finish editing, they don't want the row to automatically disappear because of the search / filter doesn't match the row after the edits.

The customer only wants to search / filter if they actually initiated the action. They do not want auto searching and filtering.

Stephen
Top achievements
Rank 1
 asked on 24 Mar 2025
1 answer
46 views

Hey Telerik Team,

I'm working with the RadRichTextEditor in WPF and ran into a little issue. When I switch my keyboard to Arabic, I was expecting to see Arabic digits (٠١٢٣٤٥), but instead, it still shows the standard Western numbers.

Is there a way to enable Arabic digits when typing in Arabic? I’ve looked around but haven’t had much luck so far. If there's a setting or a workaround that could help, I’d really appreciate any pointers!


using System.Globalization;

Console.OutputEncoding = System.Text.Encoding.UTF8;

CultureInfo arabicCulture = new CultureInfo("ar-AE");
arabicCulture.NumberFormat.DigitSubstitution = DigitShapes.NativeNational;
arabicCulture.NumberFormat.NativeDigits = ["Ù ", "Ù¡", "Ù¢", "Ù£", "Ù¤", "Ù¥", "Ù¦", "Ù§", "Ù¨", "Ù©"];
//arabicCulture.CultureTypes = CultureTypes.
Thread.CurrentThread.CurrentCulture = arabicCulture;
Thread.CurrentThread.CurrentUICulture = arabicCulture;


int number = 12345;
Console.WriteLine(number.ToString(CultureInfo.CurrentCulture));

Stenly
Telerik team
 answered on 20 Mar 2025
0 answers
45 views

I'm using a RadChat in my project with a DataBinding to the ItemSource.

A MessageConverter creates either TextMessages or GifMessages. This all works fine.

The problem I have is that I want to add a TimeBreak to the top of the list, as I use the chat to store messages in my interface to view later, like a log. The first message can be in the past. And I want to know when this was.

My current solution is to always add one dummy message to  the top of the pile, which has a DateTime:  2000-01-01

I've added a Style to my App.Xaml:

 

 <Style BasedOn="{StaticResource InlineMessageControlStyle}" TargetType="conversationalUi:InlineMessageControl">
    <EventSetter Event="Loaded" Handler="InlineMessageControl_OnLoaded" />
 </Style>

This gives access to the loading of the InlineMessageControl. In which I look up the Message with the CreateAt of 2000-01-01. Like this:

 

private void InlineMessageControl_OnLoaded(object sender, RoutedEventArgs e)
{
  try
  {
    if (sender is not InlineMessageControl inlineMessageControl) { return; }

    //Hide first item, that is inserted manually to force a TimeBreak on the second
    if (inlineMessageControl.DataContext is InlineViewModel { CreationDate.Year: 2000 })
    {
      if (inlineMessageControl.TryFindParent<MessageGroup>() is { } messageGroup)
      {
        messageGroup.Visibility = Visibility.Collapsed;
      }

      if (inlineMessageControl.TryFindParent<VirtualizingStackPanel>() is { } panel)
      {
        panel.Margin = new Thickness(0, -15, 0, 0);
      }
    }
}

 

The result can be seen in the PNG attachment. However, I think this method should not be necesarry, as the tool itself should be able to do this using a bool like: AddTimeBreakToTop or something.

 

I am aware that you can add the Messages manually, but this seems like a even worse solution.

 

Waht are you thoughts, Am I missing something? Can this be improved?

 

Second question would be. How do I style the background of the TextMessages?

 

Max
Top achievements
Rank 1
Veteran
Iron
 updated question on 20 Mar 2025
1 answer
33 views

Hello,

With the telerik:RadDocking the content of the tab that I open expect a specific parent Window (of type like WindowBase) with utilities, notification, modals, ...

Then I drag out one of the docking pane the parent window is a ToolWindow, is there a way to create a custom ToolWindow or wrap the content of a ToolWindow in a custom UserControl ?

Thanks you,

Martin Ivanov
Telerik team
 answered on 19 Mar 2025
1 answer
42 views

Hi there,

In the color editor, is there a mechanism to have alpha show as 0... 255 rather than as a percentage?  Our users are accustomed to working with these colors as 4x byte values for consistency.

I don't think I see a setting similar to AlphaSettingsVisibility, but I thought I'd ask to see whether I've missed anything.

Thanks!

-David

Stenly
Telerik team
 answered on 17 Mar 2025
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Slider
Expander
TileList
PersistenceFramework
DataPager
TimeBar
Styling
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
CardView
DataBar
WebCam
FilePathPicker
Licensing
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
HighlightTextBlock
Security
TouchManager
StepProgressBar
VirtualKeyboard
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?