Telerik Forums
UI for WPF Forum
1 answer
217 views

Hi all,

Is it possible to display icons for child items of a navigation view in a data-bound hierarchy scenario? I'm following the documentation at https://docs.telerik.com/devtools/wpf/controls/radnavigationview/populating-with-data/hierarchical-databinding but also in this example the icons are missing for child items (even if them are defined in the example data model).

Thanks.

Martin Ivanov
Telerik team
 answered on 09 Nov 2020
4 answers
283 views

After trying the First Look exemple code, there is something I did not find.

If we want to store the control content to a database or any data storage, we can look at the DataContext.Data to get back all the cards.
State property is well corresponding to the new column for exemple.

But how to know in which orders they are now sorted. There is no "Order" / "Index" / "Position" property we can bind ?

Without this info it is difficult to redraw later the same board in the same state.

Is there a way to get this information

 

Thanks

Patrick
Top achievements
Rank 1
 answered on 09 Nov 2020
1 answer
92 views

Hi,

we are currently tweaking the initial loading performance of a RadDiagram with >1000 Shapes and >5000 Connections. According to the attached DotTrace profiler run, we are spending a good amount of time (~5 seconds) within the function "UpdateFocusedElement" which intuitively seems unnecessary during the initial load of a diagram.

Would you agree that this call is unnecessary during initial load and if so could you suggest a way to temporarily suppress or work around this to improve loading time?

Thanks in advance!

Regards

Petar Mladenov
Telerik team
 answered on 09 Nov 2020
2 answers
293 views

I'm using RadGlyph with the FontAwesome library and it works great. I register the font in my App.xaml - OnStartup  and when I run my application the icons load correctly and look crisp and clear. 

The issue is in the Visual Studio designer RadGlyph complains constantly that the 'Font family FontAwsome is not registered'. This breaks parts of the UI designer and add these errors to the Error List make it look a lot worse than it is and makes finding real errors harder. 

My question is, how do I register the custom font in away that RadGlyph can detect it in the designer or can I turn off the detection of this error altogether? I don't need to see the icon in the designer I just want to clean up the error messages. 

 

Thanks,

Richard

Richard
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 09 Nov 2020
8 answers
164 views

Hello everyone.

I have shell WinForms application that hosts WPF User Control contains RadDocking. When I drag RadPane, a RootCompass indicators of RadDocking shows in wrong location (see attachment). It looks like indicators shows without offset of embedded WPF Control relatively shell WinForms application.

Is it bug? Or maybe is there a way to change a location of RootCompass indicators? 

 

Thank you.

Shrikant
Top achievements
Rank 1
 answered on 06 Nov 2020
1 answer
528 views

Hello.

I want add ToolTip on GridViewHeaderCell, column created in code as

column = new GridViewDataColumn
                {
                    ColumnGroupName = args.ColumnDef.ColumnGroupName,                
                    DataMemberBinding = new Binding(args.ColumnDef.Member)
                    {
                        Mode = BindingMode.TwoWay,
                        UpdateSourceTrigger = UpdateSourceTrigger.PropertyChanged,
                    },
                    IsReadOnlyBinding = new Binding(args.ColumnDef.IsReadOnlyMember)
                    {
                        Converter = new NullToBooleanConverter {IsInverted = true}
                    },
                    Header = args.ColumnDef.Header,
                    HeaderCellStyle = TryFindResource("DataHeaderCellStyle") != null ? (Style)Resources["DataHeaderCellStyle"] : new Style(typeof(GridViewHeaderCell)),

                    IsVisible = true,
                    IsFilterable = false,
                };

                if (args.ColumnDef.ToolTip != null)
                    column.ToolTip = new ToolTip { Content = args.ColumnDef.ToolTip };

 

in xaml i added style

<Style x:Key="DataHeaderCellStyle" BasedOn="{StaticResource GridViewHeaderCellStyle}" TargetType="telerik:GridViewHeaderCell">
            <!--<Setter Property="ToolTipService.ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Content.Column.ToolTipText, Mode=OneWay}" />-->
            <Setter Property="ToolTip" Value="{Binding Content, RelativeSource={RelativeSource Self}}"/>
                <Setter Property="HorizontalContentAlignment" Value="Center"/>
                <Setter Property="TextWrapping" Value="Wrap"/>
                <Setter Property="FontSize" Value="12"/>
</Style>

 

If use <Setter Property="ToolTipService.ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Content.Column.ToolTipText, Mode=OneWay}" /> or <Setter Property="ToolTipService.ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, Path=Content.ToolTipText, Mode=OneWay}" /> this is don't work, no tooltip.

If use <Setter Property="ToolTip" Value="{Binding Content, RelativeSource={RelativeSource Self}}"/> (seen here https://www.telerik.com/forums/tooltip-on-column-title) content of GridViewHeaderCell will be lost (on attachement).

How need set tooltip in style property?

If add event subscribe (as here https://www.telerik.com/forums/radgridview---tooltip-for-dynamically-created-column), will work...

ctor

{

    InitializeComponent();
    EventManager.RegisterClassHandler(typeof(GridViewHeaderCell), GridViewHeaderCell.MouseEnterEvent, new RoutedEventHandler(OnMouseEnterEvent));
}

        private void OnMouseEnterEvent(object sender, RoutedEventArgs e)
        {
            if (sender is GridViewHeaderCell cell && cell.Column.ToolTip != null)
            {
                cell.ToolTip = cell.Column.ToolTip;
            }
        }

Martin Ivanov
Telerik team
 answered on 05 Nov 2020
11 answers
296 views

The performance of the property grid isn't great, and it appears that the performance degrades on some scenarios.

We are placing the property grid inside a RadDocking. The pane itself has the IsHidden bound to a property, since the software is an IDE and depending on the type of the active document, we either show a toolbox and  / or a property grid.

 

I can see with dotTrace that something is leaking (The weakevent listener is raising the handler more time than it should).

 

Code:

MainWindow.xaml:

<Window x:Class="RadPropertyGridPerformanceIssue1.MainWindow"
        xmlns:local="clr-namespace:RadPropertyGridPerformanceIssue1"
        Title="MainWindow" Height="350" Width="525" x:Name="self">
     
    <Grid>
        <telerik:RadDocking>
            <telerik:RadSplitContainer telerik:DockingPanel.InitialSize="228,650"
                    Name="RightContainer" InitialPosition="DockedRight" Orientation="Vertical">
                <telerik:RadPaneGroup>
                    <telerik:RadPane CanUserClose="False" x:Name="propertiesPane" Header="Properties Window"
                                     CanDockInDocumentHost="False" telerik:RadDocking.SerializationTag="Properties"
                                     DataContext="{Binding ElementName=self, Path=DataContext}"
                                     IsHidden="{Binding ElementName=self, Path=IsHidden, Mode=TwoWay}">
                        <local:PropertiesControl DataContext="{Binding}" />
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking
        <StackPanel HorizontalAlignment="Left">
            <Button Click="Button_Click">Toggle Visibility</Button>
            <Button Click="Button_Click_1">Toggle Selected Item</Button>
        </StackPanel>
    </Grid>
</Window>

 

MainWindow,cs

public partial class MainWindow : Window
{
    private bool isItemSet = false;
 
    public object Item
    {
        get { return (object)GetValue(ItemProperty); }
        set { SetValue(ItemProperty, value); }
    }
 
    // Using a DependencyProperty as the backing store for Item.  This enables animation, styling, binding, etc...
    public static readonly DependencyProperty ItemProperty =
        DependencyProperty.Register("Item", typeof(object), typeof(MainWindow), new UIPropertyMetadata(null));
 
 
 
    public bool IsHidden
    {
        get { return (bool)GetValue(IsHiddenProperty); }
        set { SetValue(IsHiddenProperty, value); }
    }
 
    // Using a DependencyProperty as the backing store for IsHidden.  This enables animation, styling, binding, etc...
    public static readonly DependencyProperty IsHiddenProperty =
        DependencyProperty.Register("IsHidden", typeof(bool), typeof(MainWindow), new UIPropertyMetadata(false));
 
     
     
    public MainWindow()
    {
        InitializeComponent();
        this.DataContext = this;
    }
 
    private void Button_Click(object sender, RoutedEventArgs e)
    {
        IsHidden = !IsHidden;
    }
 
    private void Button_Click_1(object sender, RoutedEventArgs e)
    {
        if (!isItemSet)
            Item = new MyObject();
        else
            Item = null;
 
        isItemSet = !isItemSet;
    }
}

 

MyObject:

public class MyObject
    {
 
        [Display(Name = "Name1", GroupName = "Details1", Order = 5, Prompt = "tttt"), Browsable(true)]
        public string Name1 { get; set; }
 
        [Display(Name = "Name2", GroupName = "Details1", Order = 5, Prompt = "tttt"), Browsable(true)]
        public string Name2 { get; set; }
 
        [Display(Name = "Name3", GroupName = "Details2", Order = 5, Prompt = "tttt"), Browsable(true)]
        public string Name3 { get; set; }
 
        [Display(Name = "Name4", GroupName = "Details2", Order = 5, Prompt = "tttt"), Browsable(true)]
        public string Name4 { get; set; }
 
        [Display(Name = "Name5", GroupName = "Details2", Order = 5, Prompt = "tttt"), Browsable(true)]
        public string Name5 { get; set; }
 
        [Display(Name = "Name6", GroupName = "Details2", Order = 5, Prompt = "tttt"), Browsable(true)]
        public string Name6 { get; set; }
 
        [Display(Name = "Name7", GroupName = "Details2", Order = 5, Prompt = "tttt"), Browsable(true)]
        public string Name7 { get; set; }
 
        [Display(Name = "Name8", GroupName = "Details2", Order = 5, Prompt = "tttt"), Browsable(true)]
        public string Name8 { get; set; }
 
        [Display(Name = "Name9", GroupName = "Details2", Order = 5, Prompt = "tttt"), Browsable(true)]
        public string Name9 { get; set; }
 
        [Display(Name = "Name10", GroupName = "Details2", Order = 5, Prompt = "tttt"), Browsable(true)]
        public string Name10 { get; set; }
 
        [Display(Name = "Name11", GroupName = "Details3", Order = 6, Prompt = "tttt"), Browsable(true)]
        public string Name11 { get; set; }
 
        [Display(Name = "Name12", GroupName = "Details3", Order = 6, Prompt = "tttt"), Browsable(true)]
        public string Name12 { get; set; }
 
        [Display(Name = "Name13", GroupName = "Details3", Order = 6, Prompt = "tttt"), Browsable(true)]
        public string Name13 { get; set; }
 
        [Display(Name = "Name14", GroupName = "Details3", Order = 6, Prompt = "tttt"), Browsable(true)]
        public string Name14 { get; set; }
 
        [Display(Name = "Name15", GroupName = "Details3", Order = 6, Prompt = "tttt"), Browsable(true)]
        public string Name15 { get; set; }
 
        [Display(Name = "Name16", GroupName = "Details3", Order = 6, Prompt = "tttt"), Browsable(true)]
        public string Name16 { get; set; }
 
        [Display(Name = "Name17", GroupName = "Details4", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name17 { get; set; }
 
        [Display(Name = "Name18", GroupName = "Details4", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name18 { get; set; }
 
        [Display(Name = "Name19", GroupName = "Details4", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name19 { get; set; }
 
        [Display(Name = "Name20", GroupName = "Details4", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name20 { get; set; }
 
        [Display(Name = "Name21", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name21 { get; set; }
 
        [Display(Name = "Name22", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name22 { get; set; }
 
        [Display(Name = "Name23", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name23 { get; set; }
 
        [Display(Name = "Name24", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name24 { get; set; }
 
        [Display(Name = "Name25", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name25 { get; set; }
 
        [Display(Name = "Name26", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name26 { get; set; }
 
        [Display(Name = "Name27", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name27 { get; set; }
 
        [Display(Name = "Name28", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name28 { get; set; }
 
        [Display(Name = "Name29", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name29 { get; set; }
 
        [Display(Name = "Name30", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name30 { get; set; }
 
        [Display(Name = "Name31", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name31 { get; set; }
 
        [Display(Name = "Name32", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name32 { get; set; }
 
        [Display(Name = "Name33", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name33 { get; set; }
 
        [Display(Name = "Name34", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name34 { get; set; }
 
        [Display(Name = "Name35", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name35 { get; set; }
 
        [Display(Name = "Name36", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name36 { get; set; }
 
        [Display(Name = "Name37", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name37 { get; set; }
 
        [Display(Name = "Name38", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name38 { get; set; }
 
        [Display(Name = "Name39", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name39 { get; set; }
 
        [Display(Name = "Name40", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name40 { get; set; }
 
        [Display(Name = "Name41", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name41 { get; set; }
 
        [Display(Name = "Name42", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name42 { get; set; }
 
        [Display(Name = "Name43", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name43 { get; set; }
 
        [Display(Name = "Name44", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name44 { get; set; }
 
        [Display(Name = "Name45", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name45 { get; set; }
 
        [Display(Name = "Name46", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name46 { get; set; }
 
        [Display(Name = "Name47", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name47 { get; set; }
 
        [Display(Name = "Name48", GroupName = "Details5", Order = 7, Prompt = "tttt"), Browsable(true)]
        public string Name48 { get; set; }
    }

 

PropertiesControl.xaml:

<UserControl x:Class="RadPropertyGridPerformanceIssue1.PropertiesControl"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:telerk="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <telerk:RadPropertyGrid Item="{Binding Item}" DescriptionPanelVisibility="Collapsed"/>
    </Grid>
</UserControl>

 

If you click the first button and then the second button over and over again, then you would notice that the property grid becomes slower and slower, and that the Telerik.Windows.Data.WeakEvent+WeakListener`1.Handler() is being called more than once, event though OnCollectionChanged was called only once.

 

On Telerik 2016.Q2 the problem was even worse. The OnCollectionChanged would be called as the number of properties the object has.

 

 

 

 

BENN
Top achievements
Rank 1
 answered on 05 Nov 2020
1 answer
137 views

Hi,

 

I am storing the user changes in the PDF viewer for multiple PDFs.

For zoom, there is the ScaleFactorChanged event.

It seems there is no event exposed for Rotation, like RotationChanged?

How is it possible to store the information when the user changes the rotation?

 

As a workaround, I now check the rotation with :

 DetailPdfViewer.CommandDescriptors.RotateClockwiseCommandDescriptor.Command.CanExecuteChanged += OnRotationChanged;

and then get DetailPdfViewer.RotationAngle, but this seems really hacky to me. It just triggers to often, so I do not like having this in production too long.

 

Best regards,

Kevin

Dimitar
Telerik team
 answered on 05 Nov 2020
4 answers
209 views

Hello,

I am having an issue with reordering multiple selected items in a RadListBox. I am trying to select multiple items in a RadListBox, and drag them within the same RadListBox to reorder them. However, it doesn't always work. When I start to drag, sometimes I will be able to reorder the items (cursor indicator and drop visual indicator in the RadListBox show normally), and sometimes it won't. The drag visual always works normally, but it looks like AllowDrop is immediately false sometimes (not sure if that is what is actually happening, but it's the best way I can describe it). I have a test RadListBox for theme visual feedback and testing, and the behavior is happening there. Here is the code I am using:

<telerik:RadListBox SelectionMode="Extended">
    <telerik:RadListBoxItem Content="Item 1"
                    Style="{DynamicResource ReorderableListItemStyle}"/>
    <telerik:RadListBoxItem Content="Item 2"
                    Style="{DynamicResource ReorderableListItemStyle}"/>
    <telerik:RadListBoxItem Content="Item 3"
                    Style="{DynamicResource ReorderableListItemStyle}"/>
    <telerik:RadListBoxItem Content="Item 4"
                    Style="{DynamicResource ReorderableListItemStyle}"/>
    <telerik:RadListBoxItem Content="Item 5"
                    Style="{DynamicResource ReorderableListItemStyle}"/>
    <telerik:RadListBoxItem Content="Item 6"
                    Style="{DynamicResource ReorderableListItemStyle}"/>
    <telerik:RadListBoxItem Content="Item 7"
                    Style="{DynamicResource ReorderableListItemStyle}"/>
    <telerik:RadListBoxItem Content="Item 8"
                    Style="{DynamicResource ReorderableListItemStyle}"/>
    <telerik:RadListBox.DragDropBehavior>
        <telerik:ListBoxDragDropBehavior/>
    </telerik:RadListBox.DragDropBehavior>
</telerik:RadListBox>

 

And here is the code for ReorderableListItemStyle:

<Style x:Key="ReorderableListItemStyle"
    TargetType="telerik:RadListBoxItem"
    BasedOn="{StaticResource RadListBoxItemStyle}">
    <Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
</Style>

 

Is there something I am missing? I am using Telerik WPF R3 2020.

Dinko | Tech Support Engineer
Telerik team
 answered on 05 Nov 2020
9 answers
223 views
Hi, i need to understand how to implement following thing. We are unable to navigate with Down key to Exit button in the backstage. I think this is a bug. I do not provide any source because it can be seen also in the example provided by your company (look at the attached picture). When user comes with keyboard to "Help" (look in the picture) he is unable to go down to buttons that are only "command" without anything to show on the right side of the backstage menu. This is a BUG. I should be possible to go there and in the area on the right should not be shown anything
Martin Ivanov
Telerik team
 answered on 04 Nov 2020
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
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
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?