Telerik Forums
UI for WPF Forum
15 answers
296 views

Hi,

If a button is placed in a RadMenu that causes navigation (in a Frame/Page setup), then the button is not getting focus and hence any Bindings that are present where the focus is are not executed before navigation takes place.  I see https://www.telerik.com/forums/radmenu-problem-404186d89499 and https://www.telerik.com/forums/i-think-i-found-a-nasty-bug which look like the same problem.  Is there any solution for this problem aside from not using RadMenu that will work for the focus being in any control?  I note that in Silverlight RadMenu does not have this problem. 

Vladimir Stoyanov
Telerik team
 answered on 22 Apr 2021
37 answers
1.0K+ views

Hi all 

I have a ListBox and its has Items to be Displayed. Additional i have added 

 <telerik:ListBoxDragDrop.Behavior> // for dragging operation
<telerik:ListBoxDragDropBehavior AllowReorder="True" telerik:TouchManager.DragStartTrigger="TapHoldAndMove" />
</telerik:ListBoxDragDrop.Behavior>
            
<telerik:ListBoxDragDrop.DragVisualProvider> //// for dragging Visual operation
<telerik:ScreenshotDragVisualProvider />
</telerik:ListBoxDragDrop.DragVisualProvider>

Any idea to Restrict the Dragging-Visual within the parent windows bounds.

Thanks In Advance

Dinko | Tech Support Engineer
Telerik team
 answered on 22 Apr 2021
1 answer
583 views

Hi,

 

I am using the RadSplashScreen and I would like to allow the following actions:

- Set splashscreen as not topmost

- Allow to move the splashscreen (no resize, or close, just move)

 

Thank you for your help

Martin Ivanov
Telerik team
 answered on 22 Apr 2021
3 answers
1.0K+ views

 I know grid performance has been discussed many times, but I could not derive a solution so far from those posts.

The scenario is very simple, we have to show 20 items in a grid. The data paging responsibility is ours, the grid sees only 20 rows.

When the ItemsSource changes, 1-2 sec is needed for the grid to display the new results.

The performance is bad regardless of Virtualization settings (and 20 rows do not need virtualization at all naturally).

Fixed Height and With do not help, I think this is not the usual infinite height MeasureOverride issue.

I have attached DotTrace and VS profiler traces, so you can see the problematic paths.
The profiler pinpoints MeasureOverride at the surface. Most posts about grid performance revolve around this.
However, when we dig deeper we see creating each datagrid row took about 50ms.
For 20 rows this is 1sec. This explains the perceived delay.
The attached dottrace images show that LoadContent is called many hundred times, this is what actually eats the time.

Now, it is your turn to explain what I can do to avoid this big performance overhead.

Tell me if you need more profiling data from me.

Thanks,
Zsolt

Zsolt
Top achievements
Rank 1
 answered on 22 Apr 2021
3 answers
281 views

I have a RadTabControl and I want to enable the drop-down button "WhenNeeded" so that users can easily access the buttons in the tab control. I have three templates for the tab items (RadTabItem) which means I should have 3 templates as well for the drop-down buttons that appear in the drop-down list. 

There is a field called ItemDropDownContentTemplateSelector in RadTabControl and I created a template selector class like so:

    public class DropDownDisplayModeTemplateSelector: DataTemplateSelector
    {
        public override DataTemplate
            SelectTemplate(object item, DependencyObject container)
        {
            try
            {
                FrameworkElement element = container as FrameworkElement;
                Console.WriteLine("DropDownDisplayModeTemplateSelector: " + element.GetType().Name);
                if (element != null && item != null && item is TabItem)
                {
                    TabItem tabItem = item as TabItem;

                    switch (tabItem.TabItemStyle)
                    {
                        case TabItemStyle.Title:
                            return element.FindResource("TitleDropDownModeDataTemplate") as DataTemplate;

                        case TabItemStyle.Button:
                            return element.FindResource("ButtonDropDownModeDataTemplate") as DataTemplate;

                        case TabItemStyle.GroupOfButtons:
                            return element.FindResource("GroupOfButtonsDropDownModeDataTemplate") as DataTemplate;

                        default:
                            return element.FindResource("ButtonDropDownModeDataTemplate") as DataTemplate;
                    }
                }
                else
                    return null;
            }
            catch(Exception ex)
            {
                Console.WriteLine(ex.Message);
                return null;
            }
        }
    }

 

However, finding the DataTemplates with element.FindResource() method doesn't work because the container element is of type "DropDownMenuItem" which of course is not the element where my data templates are defined.

I have them defined in the top level Grid element like so:

<Grid>
        <Grid.Resources>
            <ResourceDictionary>

                <DataTemplate x:Key="TitleDropDownModeDataTemplate">
                    <TextBlock
                        HorizontalAlignment="Left"
                            VerticalAlignment="Center"
                            Margin="4"
                            Grid.Column="1"
                            Text="TitleDropDownModeDataTemplate" />
                </DataTemplate>

                <DataTemplate x:Key="ButtonDropDownModeDataTemplate">
                    <TextBlock
                        HorizontalAlignment="Left"
                            VerticalAlignment="Center"
                            Margin="4"
                            Grid.Column="1"
                            Text="ButtonDropDownModeDataTemplate" />
                </DataTemplate>

                <DataTemplate x:Key="GroupOfButtonsDropDownModeDataTemplate">
                    <TextBlock
                        HorizontalAlignment="Left"
                            VerticalAlignment="Center"
                            Margin="4"
                            Grid.Column="1"
                            Text="GroupOfButtonsDropDownModeDataTemplate" />
                </DataTemplate>

                <models:DropDownDisplayModeTemplateSelector x:Key="myDropDownDisplayModeTemplateSelector"/>
            </ResourceDictionary>
        </Grid.Resources>
        
        <telerik:RadTabControl

           ItemsSource="{Binding TabItems}"

           ItemDropDownContentTemplateSelector="{StaticResource myDropDownDisplayModeTemplateSelector}"
            DropDownDisplayMode="WhenNeeded">
</Grid>

In this case what should I do, hack the way top to the Grid's resources or I have done something wrong in defining my drop-down template selector?

Dinko | Tech Support Engineer
Telerik team
 answered on 21 Apr 2021
22 answers
1.4K+ views
Hello!

if I set an RadTreeViewItem to  ".Visibility = Visibility.Collapsed" or ".Visibility = Visibility.Hidden", the item is not visible BUT it stil takes space in the triewview (as a empty row).

Is this a bug, or how do I make an item invisible by code?

Petar Mladenov
Telerik team
 answered on 20 Apr 2021
2 answers
517 views

Hi there,

very simple scenario - we have a RadRichTextBox and want to show a placeholder (ghost) when there is no content in it.
Same behavior like WatermarkTextBox

Found no simple solution for this... or I have overseen something..

Thank you, Andi

Andi
Top achievements
Rank 1
 answered on 20 Apr 2021
9 answers
895 views
Hi. I'm generating a RadTreeView and its items through WPF data binding using a HierarchicalDataTemplate. So when I add a new item to the collection the RadTreeView is looking at, and I set the selected item to that newly added object, I try to get the selected container, but it's null. This is my code:

private void OnAddFolderClicked(object sender, RoutedEventArgs e) 
        { 
            IFolderContainer container = (sender as MenuItem).DataContext as IFolderContainer ?? null; 

            Folder folder = new Folder() { Name = "Folder" }; 
 
            container.AddFolder(folder); 
 
            treeViewExplorer.SelectedItem = folder; 
 
            folder.IsNodeInEditMode = true; 
 
            RadTreeViewItem selectedItem = treeViewExplorer.SelectedContainer; // this is null even though I set the SelectedItem = folder
        } 

What I want to do is to set focus on it, so if the user clicks F2 right away after creating it, it can go into edit mode, right now the object looks selected, but hitting F2 doesn't do anything unless deselect it, and select it again.

Thanks!
Dinko | Tech Support Engineer
Telerik team
 answered on 20 Apr 2021
5 answers
374 views

Hi,

 

I want to be able to receive the file and/or set the file for the radSpreadsheet.CommandDescriptors.SaveFile.Command  command. It appears that no event can be handled before or after the command is executed.

 

Thanks

Tanya
Telerik team
 answered on 19 Apr 2021
0 answers
315 views
I have a <Grid> which has two <ItemsControl> in it.
The first <ItemsControl-1> will be vertically placed and second <ItemsControl-2> will be horizontally placed.
Each <ItemsControl> will have same number of counts as child items.
I have attached a snap for reference(MockUI Changes.jpeg) of how it looks like. 
Be default the items in <ItemsControl> height is set to AUTO and it has lot of sub-control(telerik) in it and height of the ItemControl.items may vary based on datatrigger set for the viewmodel property. 
I want to synchronize Height of ItemsControl1.Item1 with ItemsContol2.Item.(ex:during runtime if the height of ItemControl1.Item1 is 20 then ItemControl2.Item1 must also be same).
Any Idea or suggestion or samples to implement this behavior.


Thanks and Regards,
Kishore
Kishorekumar
Top achievements
Rank 1
Veteran
 asked on 19 Apr 2021
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?