Telerik Forums
UI for WPF Forum
1 answer
96 views

Hi,

I would like to customise the animation for the opening and navigate event/state of the radial menu. How can I do it? Thank you! 

Dinko | Tech Support Engineer
Telerik team
 answered on 08 Nov 2019
2 answers
191 views

I have an existing WPF application which uses Microsoft.Windows.controls.Datagrid. I want to add the RadDataPager to do the pagination, how can I do it? 

Here's my sample code. It displays the data but it doesn't do the pagination. All data is displayed in a single page.

<dg:DataGrid Name="dgRegistryDetails" FontSize="14" DockPanel.Dock="Bottom" Foreground="#FF07315B"

                         ItemsSource="{Binding}"   CanUserSortColumns="true"
IsReadOnly="True"    AutoGenerateColumns="False" >

 

<telerik:RadDataPager VerticalAlignment="Bottom" DisplayMode="FirstLastPreviousNextNumeric" Source="{Binding Items, ElementName=dgRegistryDetails}"  IsTotalItemCountFixed="True" x:Name="RadPager" PageSize="10" />

Niraja
Top achievements
Rank 1
 answered on 08 Nov 2019
9 answers
540 views

I have a C# WPF application using MVVM with a simple RadCartesianChart that shows a single ScatterLineSeries representing a surface profile.  It works well. 

Now I want to enable my user to mark out certain horizontal regions of the plot for use in my application.  The general idea is this

  1. User clicks a button that adds a visual indicator representing the region. 
  2. The indicator appears.  It looks like a big wide bar going from the bottom Y of the plot to the top Y and covering an arbitrary X width.
  3. The user can then use the mouse (or their finger) to made the bar wider/narrower or move it left or right across the plot

(I have attached an image showing roughly what this should look like.  It is from a much older version of this application that doesn't use C#, WPF or Telerik.)

My problem is not in writing interaction/manipulation code.  It is in determining exactly what Telerik entity I should interact with.  That is I don't know how best to achieve this with the tools Telerik gives me.   

I can think of several approaches. 

  • For example, I looked into using Chart Annotations.   They seem perfect for marking out chart regions and your examples are good.  But I can't find any examples that show me how the user might *interact* with them.    How do I add a mouse/touch handler for an annotation?   Is it possible?  Is that the best way?
  • Or maybe I should add mouse/touch handlers for the RadCartesianChart object.  Then in code-behind I could try to figure out what annotation my mouse/finger is over and go from there, is that the way?  
  • Or should I instead try to create my own buttons, completely separate from the cahrt that overlay the whole plot and match up exactly with chart plot area.  Is that the way to go?
  • Is there some other, cleaner way to achieve this?

 

My Chart in XAML is like this:

   

<tk:RadCartesianChart x:Name="Chart"
                         HorizontalAlignment="Stretch"
                         VerticalAlignment="Stretch"
                         Background="{StaticResource GsBackgroundDark}"
                         Foreground="{StaticResource GsForegroundLight}"
                         Height="300"
                         HoverMode="FadeOtherSeries"     
                         SelectionPalette="FlowerSelected"
                         ga:ChartUtilities.IsDragToSelectEnabled="True"
                         ga:ChartUtilities.SelectionRectangleStyle="{StaticResource SelectionRectangleStyle}"
                          
                         >
       <tk:RadCartesianChart.Resources>
           <Style x:Key="LabelStyle" TargetType="TextBlock">
               <Setter Property="Foreground" Value="{StaticResource GsForegroundLight}"/>
           </Style>
       </tk:RadCartesianChart.Resources>
       <tk:RadCartesianChart.HorizontalAxis>
           <tk:LinearAxis Title="{Binding Path=XAxisTitle}"
                          Foreground="{StaticResource GsForegroundLight}"
                          LabelStyle="{StaticResource LabelStyle}"
                          LabelFormat="0.00"
                          />
       </tk:RadCartesianChart.HorizontalAxis>
       <tk:RadCartesianChart.VerticalAxis>
           <tk:LinearAxis  x:Name="YAxis"
                           Title="{Binding Path=YAxisTitle}"
                           Foreground="{StaticResource GsForegroundLight}"
                           LabelStyle="{StaticResource LabelStyle}"
                           LabelFormat="0.00"   
                           />
       </tk:RadCartesianChart.VerticalAxis>
 
           <tk:RadCartesianChart.AnnotationsProvider>
               <tk:ChartAnnotationsProvider Source="{Binding Regions}">
                   <tk:ChartAnnotationDescriptor
                       d:DataContext="{d:DesignInstance gavm:ProfileRegionVm}">
                       <tk:ChartAnnotationDescriptor.Style>
                           <Style TargetType="tk:CartesianMarkedZoneAnnotation">
                               <Setter Property="VerticalFrom" Value="-1000" />
                               <Setter Property="VerticalTo" Value="1000" />
                               <Setter Property="HorizontalFrom" Value="{Binding HorizontalFrom}"/>
                               <Setter Property="HorizontalTo" Value="{Binding HorizontalTo}"/>
                               <Setter Property="Stroke" Value="Yellow"/>
                           </Style>
                       </tk:ChartAnnotationDescriptor.Style>
                   </tk:ChartAnnotationDescriptor>
               </tk:ChartAnnotationsProvider>
           </tk:RadCartesianChart.AnnotationsProvider>
            
       <tk:RadCartesianChart.Series>
           <tk:ScatterLineSeries ItemsSource="{Binding Path=ProfilePointsConverted}"
                                 XValueBinding="X"
                                 YValueBinding="Y"                          
                                 >
               <tk:ScatterLineSeries.LegendSettings>
                   <tk:SeriesLegendSettings Title="Profile"/>
               </tk:ScatterLineSeries.LegendSettings>
           </tk:ScatterLineSeries>
       </tk:RadCartesianChart.Series>
   </tk:RadCartesianChart>

My ProfileRegionVm class -- which represents an instance of this horizontal reagion is like this:

using System.Collections.Generic;
using GApp.Core.ViewModels;
using SWPoint = System.Windows.Point;
 
namespace GApp.Analyze.ViewModels
{
    public class ProfileRegionVm : BaseVm
    {
 
        public ProfileRegionVm()
        {
        }
 
        private List<SWPoint> _profilePoints;
 
        private List<SWPoint> Points
        {
            get => _profilePoints;
            set => SetProperty(ref _profilePoints, value);
        }
 
        private Sdk.Line _line;
 
        private Sdk.Line Line
        {
            get => _line;
            set => SetProperty(ref _line, value);
        }
 
        private string _name;
        public string Name
        {
            get => _name;
            set => SetProperty(ref _name, value);
        }
 
        private double _verticalFrom;
        public double VerticalFrom
        {
            get => _verticalFrom;
            set => SetProperty(ref _verticalFrom, value);
        }
 
 
        private double _verticalTo;
 
        public double VerticalTo
        {
            get => _verticalTo;
            set => SetProperty(ref _verticalTo, value);
        }
 
        private double _horizontalFrom;
 
        public double HorizontalFrom
        {
            get => _horizontalFrom;
            set => SetProperty(ref _horizontalFrom, value);
        }
 
 
        private double _horizontalTo;
 
        public double HorizontalTo
        {
            get => _horizontalTo;
            set => SetProperty(ref _horizontalTo, value);
        }
 
    }
}




Joe
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 07 Nov 2019
2 answers
123 views

Hi:

    I recently encountered a problem when using Edit Collections. I want to save the database immediately after editing Edit Collections.Is it possible to customize the Edit Collections template and add save buttons other than add and remove to achieve this?

Dilyan Traykov
Telerik team
 answered on 07 Nov 2019
5 answers
391 views

Hi Telerik-team,

Is it possible to select what columns should be shown in the dropdown from the GridViewMultiColumnComboBoxColumn, like it is possible in the RadMultiColumnComboBox? I could not find any documentation on that.

Thank you in advance!

 

Greetings, Mats

Dilyan Traykov
Telerik team
 answered on 06 Nov 2019
10 answers
159 views
Is there property I can bind to similar to SearchText in RadAutoCompleteBox?  I want the user to be able to add new item to the collection bound to the gird view.  Thanks.
Dilyan Traykov
Telerik team
 answered on 06 Nov 2019
3 answers
148 views
I am trying to use multiple series with ChartSeriesProvider in a bubble chart ScatterBubbleSeries. The examples I found show only one series binding. The code I wrote does not work but I am not sure ScatterBubbleSeries supports this mode at all... Is there any example of ScatterBubbleSeries binding multiple series with ChartSeriesProvider?
Martin Ivanov
Telerik team
 answered on 06 Nov 2019
1 answer
80 views

There are currently issues with RadWindow minimization after the latest version of the 2019 R3 SP1.

It works correctly when minimized by the Minimize button.
But, Click the icon on the Task Bar in Windows to minimize it, and then press the same button again to return it to its original state.
Almost the entire area behaves like a transparent state.

Test)
Set to RadWindowInteropHelper.AllowTransparency="False"

All but the left-top part of the title bar will be invisible to the screen.

 

The above issue is the same for WPF Demo Application.
With SP1 in place, is there a temporary solution to this issue?

Dimitar Dinev
Telerik team
 answered on 05 Nov 2019
4 answers
128 views

Good day! 

I have a problem with determination of selected items when IsVirtualizing="True". In attached project I used two different ways to counting selected items: 1. With binding IsSelected property, 2. Just counting of treeview SelectedItems. And both are incorrect in situation when selecting some number of treeview items by clicking with Shift button (SelectionMode="Extended"). For example, I select more than 8000 items but received next: items with IsSelected = true property: 37, selected tree view items: 980

Link to download project sample: click

Vladimir Stoyanov
Telerik team
 answered on 05 Nov 2019
7 answers
1.1K+ views

I have a exception when i try to filter the null value for the column, when having Null descriptor and other values as well.  The binding is a dynamic object, i am setting the column type as expected.

I am using the version 2019.2.618.45 of telerik dll

Argument types do not match
   at System.Linq.Expressions.Expression.Constant(Object value, Type type)
   at Telerik.Windows.Data.Expressions.OperatorValueFilterDescriptorExpressionBuilderBase.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpressionThreadSafe()
   at Telerik.Windows.Data.Expressions.FilterExpressionBuilder.CreateFilterExpression()
   at Telerik.Windows.Data.QueryableExtensions.Where(IQueryable source, CompositeFilterDescriptorCollection filterDescriptors)
   at Telerik.Windows.Data.QueryableCollectionView.CreateView()
   at Telerik.Windows.Data.QueryableCollectionView.CreateInternalList()
   at Telerik.Windows.Data.QueryableCollectionView.get_InternalList()
   at Telerik.Windows.Data.QueryableCollectionView.get_InternalCount()
   at Telerik.Windows.Data.DataItemCollection.get_Count()
   at Telerik.Windows.Controls.DataControl.ItemCoerce(DependencyObject d, Object baseValue)
   at System.Windows.DependencyObject.ProcessCoerceValue(DependencyProperty dp, PropertyMetadata metadata, EntryIndex& entryIndex, Int32& targetIndex, EffectiveValueEntry& newEntry, EffectiveValueEntry& oldEntry, Object& oldValue, Object baseValue, Object controlValue, CoerceValueCallback coerceValueCallback, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, Boolean skipBaseValueChecks)
   at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
   at System.Windows.DependencyObject.SetValueCommon(DependencyProperty dp, Object value, PropertyMetadata metadata, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType, Boolean isInternal)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.DataControl.Telerik.Windows.Data.Selection.ISelectorInternal.set_SelectedItem(Object value)
   at Telerik.Windows.Data.Selection.ItemSelectionHandler.SynchronizePublicSelectedItem()
   at Telerik.Windows.Data.Selection.ItemSelectionHandler.SynchronizePublicPropertiesAndCleanUp()
   at Telerik.Windows.Data.Selection.ItemSelectionHandler.EndAllowedSelection(ItemSelectionChange selectionChange)
   at Telerik.Windows.Controls.GridView.Selection.CompositeSelectionHandler.PerformRowSelection(Object dataItem, SelectionModificationOptions modificationOptions)
   at Telerik.Windows.Controls.GridView.Selection.CellAndRowSelectionDispatcher.HandleSelectionForCellInput(GridViewCell cell, SelectionModificationOptions allowedModifications)
   at Telerik.Windows.Controls.GridView.GridViewDataControl.HandleMouseDownSelection(GridViewCell cell, Boolean allowDrag, Point mousePosition)
   at Telerik.Windows.Controls.GridView.GridViewCell.OnMouseLeftButtonDown(MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseDownThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

 

Dilyan Traykov
Telerik team
 answered on 05 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
Slider
Expander
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
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Andrey
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?