Telerik Forums
UI for WPF Forum
0 answers
85 views

I'm currently working with the RadDocking control in a WPF application and facing a challenge with programmatically docking a floating panel. My goal is to dock a floating RadPane programmatically in a way that exactly replicates the user manually dragging it to dock.

Here's the scenario: When a user manually drags a RadPane to dock it, everything works as expected, including behaviors such as layout restoration (using Telerik's layout save and restore functionality). However, when I attempt to dock the same RadPane programmatically by moving it to a desired RadPaneGroup, the behavior differs. Specifically, after programmatically docking and then performing a layout restore, the previously docked RadPane disappears, which does not happen with manual docking.

rPanel.RemoveFromParent();
rPanGroup.Items.Add(rPanel);

I suspect that the programmatic approach might not replicate some internal state changes that occur with manual dragging and docking, affecting the layout restoration process.

Could anyone provide insights or guidance on how to programmatically dock a RadPane in a manner that fully mimics the manual drag-and-dock process, ensuring consistent behavior with layout restoration? Are there specific methods or properties in the RadDocking control that I should be utilizing to achieve this?

Any suggestions or examples would be greatly appreciated!

Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
 asked on 03 Mar 2024
2 answers
104 views

Hello. I am trying to figure out what and why my controls are getting their widths blown out to infinity, which has the negative effect of making one of my telerik:RadGridViews not show the complete grid cause it's off the form.

I have tried setting up my project with both Telerik.UI.for.Wpf.10.Xaml and without (for NoXaml) and both show the bad behaviour. What I'm seeing is, as soon as I add a vertical scrollbar around my Grid, then all the containing widths are suddenly blown out to infinity. HUH? Why is that?

I've attached what I'm seeing. I think this is a bug. If it's not, I am not sure what I am doing wrong? I simply started to try playing with styles, and this happens to my ScrollViewer? Doesn't seem right.

 

Stenly
Telerik team
 answered on 01 Mar 2024
1 answer
143 views

Hi,

I used the documentation to create a tree view with Windows folders. I wish to expand the item from from a specified path, e.g.. I want to have expanded Documents folder from the beginning, but I did not find anything that works.

Thanks!

Martin Ivanov
Telerik team
 answered on 01 Mar 2024
2 answers
1.5K+ views
Can you make extension for new ARM verison of Visual Studio 2022?
Viliana
Telerik team
 answered on 29 Feb 2024
1 answer
80 views

Hi,

We are using the scheduler in an old asp.net app (see attachment).

How do we set the background, foreground and border color for every single appointment/item.

For example: An Appointment/item now has the following properties:

            var app1 = new Appointment()
            {
                Subject = "Front-End Meeting",
                Start = DateTime.Today.AddHours(9),
                End = DateTime.Today.AddHours(10)
                ForeColor = "Red",
                BackColor = "Blue",
                BorderColor = "Black"
            };

Thanks and best regards,
Egbert

Martin Ivanov
Telerik team
 answered on 28 Feb 2024
1 answer
106 views

Hello. 
I want to add Custom User control to RadDocument in RadRichTextBox. So I use InlineUiContainer to do that. And add it to paragraph.

And it looks so that I have to define height and width to make it so that it will take correct space in the document layout. If I skip this step then it looks like it takes zero width and height.
Looks strange. Because of course I don't know physical size of element in advance. As workaround I can do some "magic" with Loaded event and extract size of UiElement once it was rendered. And it works. But definitely it looks like a dirty code. 
I believe I miss something. Please help me. What am I doing wrong here? :)

By the way when I need to add InlineUiElement  to standard WPF RichTextBox it does all calculations of size by itself.

Dimitar
Telerik team
 answered on 28 Feb 2024
2 answers
97 views

Hello,

My Radtaskboard contains dozens of items. How do I find an item and scroll to it so the user can find it?
I have made this code:


 foreach (taskboarddata item in MyRadTaskBoard.Items)
 {
     if (item.Id == itemidsearch)
     {
         this.MyRadTaskBoard.SelectedItem = item;


but only selection, the UI does not direct/point to the item.

Thank you for your help.

The Nimble Coder
Top achievements
Rank 2
Iron
 answered on 27 Feb 2024
0 answers
87 views
I have a controls on a <UserControl> the first of which is a <telerik:RadComboBox>
I have another control that is a <telerik:RadWatermarkTextBox>
I want the second control to have the focus after the screen loads because the combobox has the OpenDropDownOnFocus property set to true.

I use txtPolicyNumber.Focus(); in the after load event but the Combobox grabs the focus.

I even have this code and it still goes to the combobox:

Any suggestions as to what I can do to make Focus() focus?
FrameworkElement focusedElement = Keyboard.FocusedElement as FrameworkElement;
if (focusedElement != null) 
{
    string focusedControlName = focusedElement.Name;
    if (focusedControlName == "txtPolicyNumber")
    {
        iefInsuranceThirdPartyVM.CanAutoDrop = true;
        txtPolicyNumber.Focus();    // WTF is making it focus on the combobox
    }
}


Paul
Top achievements
Rank 2
Iron
Iron
Iron
 asked on 27 Feb 2024
1 answer
79 views

Currently the RadCalculatorPicker only recognize the decimal key from a numeric keypad. This is a problem when working on a laptop that does not have a numeric keypad.

Is there an easy and robust way to capture the period keystroke and "convert" it into a decimal key?

Regards

Renier

Martin Ivanov
Telerik team
 updated answer on 26 Feb 2024
1 answer
108 views

I have a RadGridView where i've replaced the "Full Text Search" with a custom control (TextBox + Label) 

I'm using a Debouncer to collect text changes from the Textbox and then after 300msec - do the search:


if (e.PropertyName == "Query")
{
	debounce.Debounce(() =>
	{
		Dispatcher.Invoke(() =>
		{
			FilterByQuery();
		});
	});
}
FilterByQuery() : 
var searchBytextCommand = RadGridViewCommands.SearchByText as RoutedUICommand;
searchBytextCommand.Execute(Query, radgrid);

Query = String property

radgrid = x:name of the RadGridView.

at some random point in time of the lifetime of the WPF program, this function stops working !

- I dont have any other case of the Debouncer stops working so i trust that it's not the issue. 

- WPF Databinding and PropertyChanged events are also working 1000 other places in the program without failing, so i trust that they work too.

- This leads me to believe that the RadGridViewCommands might have an issue.. 

 

Martin
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 26 Feb 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?