Telerik Forums
UI for WPF Forum
1 answer
141 views

Hello,

The MapOsmCycleCommand resource key is not available in French

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

Hello,

The documentation about localization is missing the RibbonViewMinimizeRibbon resource key.

Dinko | Tech Support Engineer
Telerik team
 answered on 26 Nov 2019
8 answers
163 views

I was surprised to find that assigning a foreground color to a LinearAxis3D does not automatically make the axis line, title or labels take on that color.  That was the behavior I would expect.  But it does not. 

Ok, no problem, I figured I would get around it by defining a style resource for LinearAxis3D that individually binds the color to its logical children to the parent LinearAxis3D.    So I did that and it works just fine for the text title and labels.  But it does not work for the axis line

Are a LinearAxis3D object's axis lines not logical children of that axis?  And if not, is there any way to generically find the LinearAxis3D object for (binding purposes) from within the style?

To illustrate, here's a the Z axis on my chart.  (I've nested the style here for simplicity but in my app it needs to be a separate static resource for re-use.)

<tk:RadCartesianChart3D.ZAxis>
    <tk:LinearAxis3D
        x:Name="ZAxis"
        LabelFormat="0.00"
        SmartLabelsMode="SmartStep"
        Minimum="{Binding ZAxisMin}"
        Maximum="{Binding ZAxisMax}"
        Foreground="Yellow"
        >
        <tk:LinearAxis3D.Style>
            <Style TargetType="{x:Type tk:LinearAxis3D}">
                <Setter Property="LabelStyle">
                    <Setter.Value>
                        <Style TargetType="{x:Type TextBlock}">
                            <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type tk:LinearAxis3D}}, Path=Foreground}"/>
                        </Style>
                    </Setter.Value>
                </Setter>
                <Setter Property="LineStyle">
                    <Setter.Value>
                        <Style TargetType="{x:Type Path}">
                            <Setter Property="Stroke" Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type tk:LinearAxis3D}}, Path=Foreground}"/>
                            <Setter Property="StrokeThickness" Value="2"/>
                        </Style>
                    </Setter.Value>
                </Setter>
            </Style>
        </tk:LinearAxis3D.Style>
    </tk:LinearAxis3D>
</tk:RadCartesianChart3D.ZAxis>

Since I assigned "Yellow" to the LinearAxis3D.Foreground, my label text blocks manage to find the parent LinearAxis3D and bind to this property to show the correct label color.  But the axis lines never show up.  That binding never finds the LinearAxis3D and so never gets any color. 

If I change this setter to just use a hard coded color then it setter works fine.  But obviously, that's not going to work for me.

Surprisingly, when I tried -- just as a test -- to bind by ElementName to "ZAxis", that didn't work either.  It's not an option for me if I want this Style to be a StaticResource but still I was surprised it did not work.

So do I have any other option here?  Is the Path object used to draw the axis line a logical child of the LinearAxis3D?  And if not, is there any way to achieve what I want?  Or do I need to just  individually nest the line style for each axis?


 

Martin Ivanov
Telerik team
 answered on 26 Nov 2019
1 answer
170 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
270 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
653 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
310 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
188 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
276 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
229 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
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
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
PasswordBox
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?