Telerik Forums
UI for WPF Forum
1 answer
142 views

Hello,

The documentation for RadMap doesn't show all the resource keys for the control.

At least, the following resource keys are not defined:

  • MapNorthChar
  • MapSouthChar
  • MapWestChar
  • MapEastChar
  • MapMapScaleMeterFormat
  • MapOsmStandardCommand
  • MapOsmCycleCommand
  • MapOsmTransportCommand
  • MapOsmHumanitarianCommand
  • MapPhysicalCommand
  • MapShadedReliefCommand
  • MapTerrainBaseCommand
  • MapTopographicCommand

Please update the documentation with ALL resource keys with the default values.

Dinko | Tech Support Engineer
Telerik team
 answered on 26 Nov 2019
1 answer
224 views

I am using the telerik.RadTreeView in my WPF-Application.

Beginning of september I updated the Telerik.Windows.Controls (current version is 2019.1.114.45, unfortunately, I can not say right now which version it was before).

Now we have found out, that since these update, the SelectionChanged event is no longer triggered by touch if ScrollViewer.PanningMode="VerticalOnly" is set. Mouseclicking still triggers the event.

Since this is some old (and not my code), removing ScrollViewer.PanningMode="VerticalOnly" solved this problem and I can't figure out a different behavior for scrolling, so i can go with that.

I would still be interested, if you can tell me,why this error occurred.

Best regards

 

 

Dilyan Traykov
Telerik team
 answered on 25 Nov 2019
8 answers
565 views

Hi,

I'm facing one issue and I really do not know where could the problem.

 

It's once again (as I read few other posts in the forum, nothing new) related to persisting order of columns in GridView. My problem happens only when the columns get reordered by drag-n-drop. When I add and or remove columns (this is done programatically in my view's code-behind) and try to persists Grid's state, everything works well. Unless I reorder their sequence.

 

 

It's worth mentioning that I'm persisting the state in my filesystem so that I could restore it later. Solution with IsolatedStorageProvider is not well suited for me. But I do not think that this should be any issue.Storage happens everytime the button 'Save layout' is being clicked.

 

I have created sample video that shows what I'm trying to say maybe even more expressively. Look here.I have created sample video that shows what I'm trying to say maybe even more expressively. Look here - https://drive.google.com/file/d/0B0cxhvgqPibkNHhyUzM1TVVHOVU/view

 

I have implemented my version of ICustomPropertyProvider, but it's almost identical to the one provided in WPF Control Examples. See here:

 

public class GridViewCustomPropertyProvider : ICustomPropertyProvider
    {

        private const string _columnsProperty = "Columns";
        private const string _sortDescriptorsProperty = "SortDescriptors";

        public CustomPropertyInfo[] GetCustomProperties()
        {
            return new CustomPropertyInfo[]
            {
                new CustomPropertyInfo(_columnsProperty, typeof(List<ColumnProxy>)), 
                new CustomPropertyInfo(_sortDescriptorsProperty, typeof(List<SortDescriptorProxy>)), 
            };
        }

        public void InitializeObject(object context)
        {
            if (context is RadGridView)
            {
                RadGridView gridView = context as RadGridView;
                //gridView.Columns.Clear();
                gridView.SortDescriptors.Clear();
                foreach (GridViewColumn gridViewColumn in gridView.Columns)
                {
                    gridViewColumn.ClearFilters();
                }
            }
        }

        public object InitializeValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            return null;
        }

        public void RestoreValue(CustomPropertyInfo customPropertyInfo, object context, object value)
        {
            RadGridView gridView = context as RadGridView;

            switch (customPropertyInfo.Name)
            {
                case _sortDescriptorsProperty:

                    gridView.SortDescriptors.SuspendNotifications();
                    gridView.SortDescriptors.Clear();

                    List<SortDescriptorProxy> proxies = value as List<SortDescriptorProxy>;

                    foreach (SortDescriptorProxy proxy in proxies)
                    {
                        GridViewColumn column = gridView.Columns[proxy.ColumnName];
                        gridView.SortDescriptors.Add(new ColumnSortDescriptor(){Column = column, SortDirection = proxy.SortDirection});
                    }

                    gridView.SortDescriptors.ResumeNotifications();

                    break;

                default:

                    var columnProxies = value as List<ColumnProxy>;
                    //var orderedColumns = columnProxies.OrderBy(x => x.DisplayIndex);

                    foreach (ColumnProxy columnProxy in columnProxies)
                    {
                        GridViewColumn gridColumn = gridView.Columns[columnProxy.UniqueName];
                        gridColumn.DisplayIndex = columnProxy.DisplayIndex;
                        gridColumn.Header = "blabhalbl" + columnProxy.Header;
                        gridColumn.Width = columnProxy.Width;
                        //gridView.Columns.Add(gridColumn);
                    }

                    break;
            }
        }

        public object ProvideValue(CustomPropertyInfo customPropertyInfo, object context)
        {
            RadGridView gridView = context as RadGridView;

            var orderedColuns = OrderedColumns(gridView);

            switch (customPropertyInfo.Name)
            {

                case _sortDescriptorsProperty:
                    {
                        List<SortDescriptorProxy> sortDescriptorProxies = new List<SortDescriptorProxy>();

                        foreach (ColumnSortDescriptor descriptor in gridView.SortDescriptors)
                        {
                            sortDescriptorProxies.Add(new SortDescriptorProxy()
                            {
                                ColumnName = descriptor.Column.UniqueName,
                                SortDirection = descriptor.SortDirection,
                            });
                        }

                        return sortDescriptorProxies;
                    }


                default:

                    var columns = new List<ColumnProxy>();
                    foreach (GridViewColumn column in orderedColuns.OrderBy(x => x.DisplayIndex))
                    {
                        columns.Add(new ColumnProxy()
                        {
                            UniqueName = column.UniqueName,
                            Header = column.Header.ToString() + "someother",
                            DisplayIndex = column.DisplayIndex,
                            Width = column.Width
                        });
                    }

                    return columns;
            }
        }

        private static List<GridViewColumn> OrderedColumns(RadGridView gridView)
        {
            var orderedList = new List<GridViewColumn>();

            for (int i = 0; i < gridView.Columns.Count; i++)
            {
                orderedList.Add(gridView.Columns[i]);
            }
            return orderedList;
        }
    }

 

Thanks in advance for any piece of advice,

Erik

Hans
Top achievements
Rank 1
Veteran
 answered on 25 Nov 2019
3 answers
279 views

Hello. 

It seems like there is no  RTB assembly for .NET 4.7.2

Any advise on how to get it from NuGet?

The steps to setup nuget feed and dependent assemblies was taken from the documentation.

 

 

 

Dimitar
Telerik team
 answered on 25 Nov 2019
5 answers
167 views

Hi, I want to change my GridViewCell FocusBrush, I try this but don't work:

 

    <Style TargetType="{x:Type telerik:GridViewCell}" BasedOn="{StaticResource GridViewCellStyle}">
        <Setter Property="materialControls:MaterialAssist.PressedBrush" Value="{StaticResource BaseColor}"/>
        <Setter Property="materialControls:MaterialAssist.FocusBrush" Value="{StaticResource BaseColor}"/>
        <Setter Property="materialControls:MaterialAssist.MouseOverBrush" Value="{StaticResource BaseColor}"/>
    </Style>

 

I want to change Line's color bottom of cell

 

 

Mahdi
Top achievements
Rank 1
 answered on 25 Nov 2019
3 answers
251 views
I want to reorder the  the items in RadListbox thru DragDropManager. Any example?
Dilyan Traykov
Telerik team
 answered on 21 Nov 2019
1 answer
205 views

WPF RadGrid ClipboardCopyMode Row and Cell 

Can we differentiate when we copy entire row or a single cell?

 

For Row selection we need row values with headers. Sp using these properties we can include headers too ClipboardCopyMode="All" CopyingCellClipboardContent="

 

For cell copying can we ignore the header? 

 

Dilyan Traykov
Telerik team
 answered on 21 Nov 2019
1 answer
124 views

Hi,

    I created a project that wanted to implement custom connections and implemented mvvm. But I ran into a problem, the connection line position changed when I reopened the Diagram after saving. Figure 1 is before saving, and Figure 2 is opened after saving. I set the SourceConnectorPosition and TargetConnectorPosition properties as follows:
<Style TargetType="{x:Type telerik:RadDiagramConnection}" x:Key="CommonDiagramConnectionStyleBase" BasedOn="{StaticResource RadDiagramConnectionStyle}">
        <Setter Property="SourceCapType" Value="{Binding SourceCapType, Mode=OneWayToSource}" />
        <Setter Property="TargetCapType" Value="{Binding TargetCapType, Mode=OneWayToSource}" />
        <Setter Property="Visibility" Value="{Binding Visibility, Mode=OneWayToSource}" />
        <Setter Property="Position" Value="{Binding Position, Mode=OneWayToSource}" />
        <Setter Property="IsSelected" Value="{Binding IsSelected, Mode=OneWayToSource}" />
        <Setter Property="SourceConnectorPosition" Value="{Binding SourceConnectorPosition, Mode=TwoWay}" />
        <Setter Property="StartPoint" Value="{Binding StartPoint, Mode=TwoWay}" />
        <Setter Property="TargetConnectorPosition" Value="{Binding TargetConnectorPosition, Mode=TwoWay}" />
        <Setter Property="EndPoint" Value="{Binding EndPoint, Mode=TwoWay}" />
        <Setter Property="ZIndex" Value="{Binding ZIndex, Mode=OneWayToSource}" />
        <!--<Setter Property="Background" Value="{StaticResource DiagramShape_Connection_Background}" />
        <Setter Property="Stroke" Value="{StaticResource DiagramShape_Connection_BorderBrush}" />
        <Setter Property="StrokeThickness" Value="1" />
        <Setter Property="ZIndex" Value="{StaticResource connectionZIndex}" />
        <Setter Property="HorizontalContentAlignment" Value="Center" />
        <Setter Property="VerticalContentAlignment" Value="Center" />
        <c:If Condition="WPF">
            <Setter Property="FocusVisualStyle" Value="{x:Null}" />
        </c:If>-->
    </Style>


Dinko | Tech Support Engineer
Telerik team
 answered on 21 Nov 2019
1 answer
147 views

Hello,

For other controls, there is an page in the help file for the localization of the control, listing the resource keys.

There is no such information for RadWindow.

Can you give us the resource keys?

Dimitar Dinev
Telerik team
 answered on 20 Nov 2019
9 answers
170 views

Hi,

I'm binding the ItemSource with ListCollectionView ....I noted that changing the selection on TreeListView the CurrentItem is not updated. Also the MoveCurrentTo method doesn't work. I use the some procedure with RadGridView and works fine!

How I can resolve this issue?

 

Dilyan Traykov
Telerik team
 answered on 20 Nov 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?