Telerik Forums
UI for WPF Forum
1 answer
959 views

   This question is for Telerik UI for WPF, version R2 2022.  Development environment is Windows 10 Pro 64-bit, Visual Studio 2022 64-bit version 17.2.2.  WPF application targeting .NET Framework 4.8.

I use many Telerik RadExpanders throughout my application.  Rather than style the header of each one individually, I would like to apply a master style to the Application.xaml so it will apply to all of them.  

   An example of one of my RadExpanders is:

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 

        <telerik:RadExpander x:Name="radExpGeneral" IsExpanded="True" 
                             telerik:AnimationManager.IsAnimationEnabled="False" telerikControls:StyleManager.Theme="Office_Blue">
            <telerik:RadExpander.Header>
                <StackPanel Orientation="Horizontal">
                    <TextBlock Text="Steps"/>
                </StackPanel>
            </telerik:RadExpander.Header>
        </telerik:RadExpander>

   I'm attempting to style with the following in my Application.xaml:

xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 

        <Style TargetType="{x:Type telerik:RadExpander}">
            <Style.Resources>
                <Style TargetType="{x:Type HeaderedContentControl}">
                    <Style.Resources>
                        <Style TargetType="{x:Type TextBlock}">
                            <Setter Property="FontSize" Value="12"/>
                            <Setter Property="FontWeight" Value="DemiBold"/>
                        </Style>
                    </Style.Resources>
                </Style>
            </Style.Resources>
        </Style>

   The idea is that this style first targets all RadExpanders, then targets only the header, then applies the style to the textblocks inside of it.  The problem seems to be targeting the header only, not the contents.  This style does not work.  Can anyone advise how to target just the radexpander headers?  Thank you!

Martin Ivanov
Telerik team
 answered on 27 Jun 2022
0 answers
234 views

Failed to focus RadWatermarkTextBox

<telerik:RadDropDownButton Margin="10 0" 
                        DropDownIndicatorVisibility="Collapsed"
                        DropDownPlacement="Mouse">
    <telerik:RadDropDownButton.DropDownContent>
        <StackPanel Orientation="Horizontal">
            <telerik:RadButton Click="AddLocation_OnClick"/>
            <telerik:RadWatermarkTextBox 
                    Width="100" 
                    Loaded="RadWatermarkTextBox_Loaded"/>
        </StackPanel>
    </telerik:RadDropDownButton.DropDownContent>
</telerik:RadDropDownButton>

 

private void RadWatermarkTextBox_Loaded(object sender, RoutedEventArgs e)
{
    if (sender is RadWatermarkTextBox tb)
    {
        tb.Text = string.Empty;
    }
}
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 asked on 27 Jun 2022
1 answer
237 views

Application simple crush when try to load this component. 
This can occur only on poor computers. 
What can be a problem ?  Any suggestion.

Event time    6/20/2022, 9:21:02.512 AM (Local time)    
Message    System.OutOfMemoryException: Eine Ausnahme vom Typ "System.OutOfMemoryException" wurde ausgelöst.    
Exception type    System.OutOfMemoryException    
Failed method    Telerik.Windows.Controls.AutomationExtensions.GetBaseControlItemStatus    
Problem Id    System.OutOfMemoryException at Telerik.Windows.Controls.AutomationExtensions.GetBaseControlItemStatus    
Assembly    Telerik.Windows.Controls, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7    
Severity level    Critical    
Telemetry type    exception    
Device type    PC    
Client IP address    0.0.0.0    
Country or region    United Kingdom    
Role instance    DEM5CG9125VHX.int.cpaglobal.net    
SDK version    nlog:2.17.0-146    
Sample rate    1    
Custom Properties
LoggerName    error    
threadid    1    
Message    A fatal error has occured. The application will be terminated.    

System.OutOfMemoryException:
   at System.Text.StringBuilder..ctor (mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089)
   at System.Windows.ThicknessConverter.ToString (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Thickness.ToString (PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at Telerik.Windows.Controls.AutomationExtensions.GetBaseControlItemStatus (Telerik.Windows.Controls, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at Telerik.Windows.Automation.Peers.GridViewDataControlAutomationPeer.GetItemStatusCore (Telerik.Windows.Controls.GridView, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at Telerik.Windows.Automation.Peers.RadGridViewAutomationPeer.GetItemStatusCore (Telerik.Windows.Controls.GridView, Version=2019.1.220.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Automation.Peers.AutomationPeer.UpdateSubtree (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.ContextLayoutManager.fireAutomationEvents (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.ContextLayoutManager.UpdateLayout (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.UIElement.UpdateLayout (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Interop.HwndSource.Process_WM_SIZE (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Interop.HwndSource.LayoutFilterMessage (PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at MS.Win32.HwndWrapper.WndProc (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen (WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35)

Dilyan Traykov
Telerik team
 answered on 27 Jun 2022
1 answer
126 views

How can I go through the Appointment list and know if the appointment is happening today.

Of course that includes all the limitations of Recurrence and ExceptionOccurence, I want to know the bottom line whether it is happening today or not.

Would appreciate help

Dilyan Traykov
Telerik team
 answered on 27 Jun 2022
1 answer
159 views

How to reproduce:

To simplify the problem, I used a basic RadGridView and implemented a horizontal mouse wheel scrolling like so:

  private void GridView_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
        {
            if (((RadGridView)sender).ChildrenOfType<ScrollViewer>().FirstOrDefault() is ScrollViewer scrollViewer)
            {
                if (Keyboard.Modifiers.Equals(ModifierKeys.Shift))
                {
                    if (e.Delta < 0)
                    {
                        scrollViewer.LineRight();
                    }
                    else
                    {
                        scrollViewer.LineLeft();
                    }
                    e.Handled = true;
                }
            }
        }

I used the solution found in this thread and added the code above.

https://www.telerik.com/forums/horizontal-scrolling-w-mouse-wheel-trackpad

 

Horizontal mouse wheel scrolling works fine until I open the text search (Ctrl + F). After opening the search bar, the ScrollViewer seems to be changed in a way that scrolling with the mouse wheel + shift behavior is not working anymore.

I would be very grateful for any help.

 

Best regards

Jonas

Vladimir Stoyanov
Telerik team
 answered on 27 Jun 2022
1 answer
124 views

Hi,

The  RadCalculatorPicker is a great option to provide spreadsheet-like input for the user. You can open the calculator by hitting the down-arrow key, but once opened the only way to close is to click on the button again. Typically the user will be entering on the keyboard, typing in the formula rather than clicking it in, making this pretty cumbersome.

Is there a way to automatically close the popup when hitting enter, an event I can intercept?

Regards

Renier

Stenly
Telerik team
 answered on 24 Jun 2022
0 answers
206 views

Hi,

I use RadGridView component, that I want to clean and reuse with different data in code behind (for example by clicking on button).
So what am I doing is calling a clear on all Columns (RadGridView.Columns.Clear()) and then I will start adding new columns for different data.

But the problem is when I use it with GridViewColumnGroup the clearing or adding new Columns takes an long time (seconds or minutes for test example where I have 500 Columns and 50 ColumnGroups).
Even if I add ColumnGroups before adding Columns, it will only slightly improve the situation. 

This slow processing occurs only after component has been displayed at least once. If the component was not already loaded (shown) it takes almost no time.

I tried hidding component before this process, or unsetting ItemsSource, but nothing helped.

Thank you for any help.

Edit:
I added image of Callstack, when i call Clear() method on Columns:

Radek
Top achievements
Rank 1
 updated question on 24 Jun 2022
1 answer
120 views

We have observed that minimized Telerik window/control is not showing few characters of title. We would like to see the few characters of window title even in minimized state. Do we have any property to control the width of minimized window?

Thanks in advance,

Manohar

Stenly
Telerik team
 answered on 24 Jun 2022
0 answers
117 views

Hello,

My question is: how to prevent click on disabled cells?

I have some disabled cells in my RadGridView (their "IsEnabled" property is set to false), yet when I click on them, it actually adds a border around the very first cell of the corresponding row, setting it in an "unfocused" state:

On this screenshot, I clicked in the bottom right cell and it set a white border around test2.
How to avoid this? In my opinion, clicking on a disabled cell should have no effect at all.

Thanks,
Arthur

Eldoir
Top achievements
Rank 2
Iron
Iron
Iron
 updated question on 24 Jun 2022
0 answers
144 views

Hello,

I am using the MVVM style on a RadRichTextBox and the XamlDataProvider (using a view model to populate the Xaml through binding). The problem is that I also want to be able to scroll the box after I set the Xaml, preferably as a percentage of the total possible scroll. I can get it to scroll down but then it goes right back.

Any thoughts?

Suzanne
Top achievements
Rank 1
 asked on 24 Jun 2022
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
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?