I have a WPF app using MVVM design pattern.
as I am testing for memory growth, I have come across memory leak. I have been trying to fix for days without success. If possible someone can point out the issue.
01.<Grid>02. <Grid.RowDefinitions>03. <RowDefinition Height="5"></RowDefinition>04. <RowDefinition Height="*"></RowDefinition>05. </Grid.RowDefinitions>06. <!--Service Header Editable Data-->07. <StackPanel Grid.Row="0">08. </StackPanel>09. <telerik:RadGridView x:Name="grid"10. IsReadOnly="{Binding IsServiceReadOnly}"11. ItemsSource="{Binding DetailsModel.Collection}"12. SelectedItem="{Binding SelectedCharge, Mode=TwoWay}"13. CellEditEnded="grid_CellEditEnded"14. AutoGenerateColumns="False"15. ShowGroupPanel="False"16. RowIndicatorVisibility="Collapsed"17. ShowColumnFooters="True"18. CanUserFreezeColumns="False"19. behav:GridFoucsBehav.GridFocusPosition="{Binding GridViewChargesFocColPos, Mode=TwoWay}">20. <telerik:RadGridView.Columns>21. <telerik:GridViewDataColumn Header="{lp:Lp UI:ServiceCode}"22. DataMemberBinding="{Binding ServiceCode}">23. <telerik:GridViewDataColumn.AggregateFunctions>24. <telerik:CountFunction Caption="c: " />25. </telerik:GridViewDataColumn.AggregateFunctions>26. <telerik:GridViewDataColumn.CellEditTemplate>27. <DataTemplate>28. <CustomControl:MyControl SelectedIDPath="ID"29. SelectedID="{Binding ServiceID}"30. StringToSearch="{Binding ServiceCode}"31. SelectedItem="{Binding DataContext.SelectedService, Mode=TwoWay, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type v:MyView}}}"32. ExprQueryByString="{Binding DataContext.ServiceExprQueryByString, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType={x:Type v:MyView}}}">33. <CustomControl:Lookup.DisplayMemberPaths>34. <s:String>code</s:String>35. </CustomControl:Lookup.DisplayMemberPaths>36. <CustomControl:Lookup.ColumnHeaders>37. <s:String>Code</s:String>38. <s:String>Description</s:String>39. </CustomControl:Lookup.ColumnHeaders>40. </CustomControl:MyControl>41. </DataTemplate>42. </telerik:GridViewDataColumn.CellEditTemplate>43. </telerik:GridViewDataColumn>44. 45. <telerik:GridViewDataColumn Header="{lp:Lp UI:ReceiptView_NumberOfUnit}"46. DataMemberBinding="{Binding NumberOfUnit}">47. <telerik:GridViewDataColumn.CellEditTemplate>48. <DataTemplate>49. <telerik:RadNumericUpDown Value="{Binding NumberOfUnit, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"50. UpdateValueEvent="PropertyChanged"51. Minimum="0" />52. </DataTemplate>53. </telerik:GridViewDataColumn.CellEditTemplate>54. </telerik:GridViewDataColumn>55. <telerik:GridViewDataColumn Header="{lp:Lp UI:Code}"56. DataMemberBinding="{Binding Code, Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">57. <telerik:GridViewDataColumn.CellEditTemplate>58. <DataTemplate>59. <TextBox Text="{util:TwoWayBinding Code}" />60. </DataTemplate>61. </telerik:GridViewDataColumn.CellEditTemplate>62. </telerik:GridViewDataColumn>63. <telerik:GridViewDataColumn Header="{lp:lp UI:Remarks}"64. DataMemberBinding="{Binding Remarks,Mode=TwoWay}">65. <telerik:GridViewDataColumn.CellEditTemplate>66. <DataTemplate>67. <TextBox Text="{Binding Remarks, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />68. </DataTemplate>69. </telerik:GridViewDataColumn.CellEditTemplate>70. </telerik:GridViewDataColumn>71. </telerik:RadGridView.Columns>72. </telerik:RadGridView>73.</Grid>
after opening few windows and closing them, the memory grows, and the objects are still hanged in the memory.
this is for my windows:
MyWindow System.Windows.DataTemplate-> MyApp.MyWindow->(System.Windows.Controls.Border,System.Windows.EffectiveValueEntry [],System.Windows.Threading.Dispatcher,...): 12 MB (11.23%) (3 objects, 852 bytes (0.00%)) Previous allocations (newest to oldest): 11 MB (11.22%), 7.4 MB (7.19%), 7.4 MB(7.19%),Referred to by: 12 MB (11.23%) from System.Windows.DataTemplate System.Windows.EffectiveValueEntry []->System.Windows.DataTemplate->(MyWindow,System.Collections.Specialized.HybridDictionary,System.Windows.Threading.Dispatcher,...)Referring to: 668 kB (0.64%) to Telerik.Windows.Controls.RadTabControl MyWindow->Telerik.Windows.Controls.RadTabControl->(System.Windows.EffectiveValueEntry [],System.Windows.Style,System.Windows.Threading.Dispatcher,...) 93 kB (0.09%) to MyApp.ItemsNavigator MyApp.MyWindow->MyApp.ItemsNavigator->(System.Windows.Controls.DockPanel,System.Windows.Threading.Dispatcher,Telerik.Windows.Controls.RadTabItem,...) 24 kB (0.02%) to Telerik.Windows.Controls.RadContextMenu MyApp.MyWindow->Telerik.Windows.Controls.RadContextMenu->(System.Windows.Controls.ControlTemplate,System.Windows.EffectiveValueEntry [],System.Windows.Threading.Dispatcher,...) 2.8 kB (0.00%) to System.Windows.Controls.Border MyApp.MyWindow->System.Windows.Controls.Border->(MyApp.MyWindow, System.Windows.EffectiveValueEntry [],System.Windows.Threading.Dispatcher) 3.3 MB (3.26%) to MyApp.LocalizedValidationPanel MyApp.MyWindow->MyApp.LocalizedValidationPanel->(System.Windows.Controls.ContentPresenter,System.Windows.Controls.Grid,System.Windows.Threading.Dispatcher,...) 3.0 MB (2.97%) to MyApp.ExRadGridView MyApp.MyWindow ->MyApp.ExRadGridView->(System.Windows.EffectiveValueEntry [],System.Windows.Style,System.Windows.Threading.Dispatcher,...) 2.2 MB (2.14%) to Telerik.Windows.Controls.RadGridView MyApp.MyWindow->Telerik.Windows.Controls.RadGridView->(System.Windows.EffectiveValueEntry [],System.Windows.Style,System.Windows.Threading.Dispatcher,...) 1.1 MB (1.06%) to MyApp.MenuItem MyApp.MyWindow->MyApp.MenuItem->(System.Windows.EffectiveValueEntry [],System.Windows.Style,System.Windows.Threading.Dispatcher,...) 1.1 MB (1.04%) to System.Windows.EffectiveValueEntry [] MyApp.MyWindow->System.Windows.EffectiveValueEntry []->(System.Collections.Hashtable,System.Uri,System.Windows.EventHandlersStore,...)
I got this. if it can be helpful
Telerik.Windows.Controls.RadGridView System.Collections.Generic.Dictionary.Entry []->Telerik.Windows.Controls.RadGridView->(System.Windows.EffectiveValueEntry [],System.Windows.Style,System.Windows.Threading.Dispatcher,...): 12 MB (100.00%) (3 objects, 0.0 bytes (0.00%))Referred to by: 12 MB (100.00%) from System.Collections.Generic.Dictionary.Entry [] System.Collections.Generic.Dictionary->System.Collections.Generic.Dictionary.Entry []->(Telerik.Windows.Controls.RadGridView)Referring to: 12 kB (0.10%) to System.Windows.EffectiveValueEntry [] Telerik.Windows.Controls.RadGridView->System.Windows.EffectiveValueEntry []->(MS.Utility.FrugalMap,System.Boolean,System.Windows.EventHandlersStore,...) 8.0 kB (0.07%) to Telerik.Windows.Data.DataItemCollection Telerik.Windows.Controls.RadGridView->Telerik.Windows.Data.DataItemCollection->(Telerik.Windows.Data.CompositeFilterDescriptorCollection,Telerik.Windows.Data.GroupDescriptorCollection,Telerik.Windows.Data.ObservableCollectionManagerCollection,...) 3.5 kB (0.03%) to System.Windows.Controls.Grid Telerik.Windows.Controls.RadGridView->System.Windows.Controls.Grid->(System.Windows.Controls.UIElementCollection,System.Windows.EffectiveValueEntry [],System.Windows.Threading.Dispatcher) 1.0 kB (0.01%) to Telerik.Windows.Controls.GridView.Selection.GridViewItemSelectionHandler Telerik.Windows.Controls.RadGridView->Telerik.Windows.Controls.GridView.Selection.GridViewItemSelectionHandler->(Telerik.Windows.Controls.RadGridView,Telerik.Windows.Data.DataItemCollection,Telerik.Windows.Data.Selection.InternalSelectionItemsStorage) 912 bytes (0.01%) to Telerik.Windows.Controls.GridView.Selection.SelectionDrag Telerik.Windows.Controls.RadGridView->Telerik.Windows.Controls.GridView.Selection.SelectionDrag->(Telerik.Windows.Controls.GridView.Scrolling.ScrollViewerCoordinator,Telerik.Windows.Controls.GridView.Selection.DefaultMouseInfoProvider,Telerik.Windows.Controls.RadGridView) 564 bytes (0.00%) to Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator Telerik.Windows.Controls.RadGridView->Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator->(System.Collections.Generic.Queue,Telerik.Windows.Controls.GridView.GridViewItemContainerGenerator.ItemBlock,Telerik.Windows.Controls.RadGridView) 504 bytes (0.00%) to Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler Telerik.Windows.Controls.RadGridView->Telerik.Windows.Controls.GridView.Selection.CellSelectionHandler->(Telerik.Windows.Controls.GridView.Selection.CellInfoCollection,Telerik.Windows.Controls.RadGridView) 504 bytes (0.00%) to Telerik.Windows.Controls.GridView.DetailsProvider Telerik.Windows.Controls.RadGridView->Telerik.Windows.Controls.GridView.DetailsProvider->(System.Action,System.Func) 360 bytes (0.00%) to System.Globalization.CultureInfo Telerik.Windows.Controls.RadGridView->System.Globalization.CultureInfo->(System.Globalization.TextInfo,System.String) 288 bytes (0.00%) to Telerik.Windows.Data.AggregateResultCollection Telerik.Windows.Controls.RadGridView->Telerik.Windows.Data.AggregateResultCollection->(System.Collections.Generic.List) 288 bytes (0.00%) to System.Collections.ObjectModel.ObservableCollection Telerik.Windows.Controls.RadGridView->System.Collections.ObjectModel.ObservableCollection->(System.Collections.Generic.List,System.Collections.ObjectModel.ObservableCollection.SimpleMonitor) 240 bytes (0.00%) to System.Collections.Generic.HashSet Telerik.Windows.Controls.RadGridView->System.Collections.Generic.HashSet->(System.Collections.Generic.ObjectEqualityComparer) 228 bytes (0.00%) to System.EventHandler Telerik.Windows.Controls.RadGridView->System.EventHandler->(Behaviors.AlignGridViewCellBehav) 216 bytes (0.00%) to Telerik.Windows.Controls.GridView.ItemDataCellPresenterHeightStorage Telerik.Windows.Controls.RadGridView->Telerik.Windows.Controls.GridView.ItemDataCellPresenterHeightStorage->(System.Collections.Generic.Dictionary) 192 bytes (0.00%) to Telerik.Windows.Controls.GridView.Selection.CellAndRowSelectionDispatcher Telerik.Windows.Controls.RadGridView->Telerik.Windows.Controls.GridView.Selection.CellAndRowSelectionDispatcher->(System.Func,Telerik.Windows.Controls.GridView.KeyboardModifiersProvider) 192 bytes (0.00%) to System.Collections.ObjectModel.ObservableCollection Telerik.Windows.Controls.RadGridView->System.Collections.ObjectModel.ObservableCollection->(System.Collections.Generic.List) 180 bytes (0.00%) to Telerik.Windows.Controls.GridView.ItemAttachedStorage Telerik.Windows.Controls.RadGridView->Telerik.Windows.Controls.GridView.ItemAttachedStorage->(System.Collections.Generic.Dictionary) 72 bytes (0.00%) to System.Collections.Generic.List Telerik.Windows.Controls.RadGridView->System.Collections.Generic.List->(System.Action []) 36 bytes (0.00%) to Telerik.Windows.Controls.GridView.Selection.CompositeSelectionHandler Telerik.Windows.Controls.RadGridView->Telerik.Windows.Controls.GridView.Selection.CompositeSelectionHandler->(Telerik.Windows.Controls.RadGridView) 36 bytes (0.00%) to Telerik.Windows.Controls.GridView.DefaultCellLocator Telerik.Windows.Controls.RadGridView->Telerik.Windows.Controls.GridView.DefaultCellLocator->(Telerik.Windows.Controls.RadGridView) 12 MB (99.74%) to Telerik.Windows.Controls.GridViewColumnCollectionInternal Telerik.Windows.Controls.RadGridView->Telerik.Windows.Controls.GridViewColumnCollectionInternal->(System.Collections.Generic.List,System.Collections.Generic.List,System.Collections.ObjectModel.ObservableCollection.SimpleMonitor,...)
as you noticed in the last details, it says 3 objects after opening the window and closing for three times. I have spent quite long time trying to figure out what is going on, but I couldn't. I worked on different screens with RadGridView and pretty much same controls and there is no problem. Did I miss out anything?
If you need further details, let me know
FYI: when RadGridView is commented out, there is no problem
MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor System.Collections.Generic.Dictionary.Entry []->MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->(System.Object,System.String,System.Windows.DependencyProperty,...): 12 MB (100.00%)Referred to by: 12 MB (100.00%) fromReferring to: 12 MB (100.00%) to System.Collections.Generic.Dictionary MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Collections.Generic.Dictionary->(System.Collections.Generic.ObjectEqualityComparer,System.Int32 [])
MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor System.Collections.Generic.Dictionary<T,U>.Entry []->MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->(System.Object,System.String,System.Windows.DependencyProperty,...): 26 MB (13.68%) (168 objects, 32 kB (0.02%))Referred to by: 26 MB (13.68%) from System.Collections.Generic.Dictionary<T,U>.Entry [] System.Collections.Generic.Dictionary<T,U>->System.Collections.Generic.Dictionary<T,U>.Entry []->(MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor,System.ComponentModel.ReflectPropertyDescriptor)Referring to:3.9 kB (0.00%) to System.Object MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Object3.2 kB (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.PropertyChangedCallback)3.1 kB (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Boolean,System.Windows.FreezeValueCallback)1.2 kB (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Double,System.Windows.FreezeValueCallback)1.1 kB (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Boolean,System.Windows.FreezeValueCallback)784 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Boolean)600 bytes (0.00%) to System.Windows.UIPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.UIPropertyMetadata->(System.Windows.PropertyChangedCallback)480 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.PropertyChangedCallback)368 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,System.Windows.PropertyChangedCallback)368 bytes (0.00%) to System.Windows.UIPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.UIPropertyMetadata->(System.Boolean,System.Windows.CoerceValueCallback)336 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.FreezeValueCallback)240 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.Media.SolidColorBrush)240 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Int32,System.Windows.FreezeValueCallback)240 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,System.Windows.Media.SolidColorBrush)184 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.FreezeValueCallback,System.Windows.PropertyChangedCallback)168 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.Thickness)168 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback)144 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.FontWeight,System.Windows.FreezeValueCallback)144 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.FontStyle,System.Windows.FreezeValueCallback)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,Telerik.Windows.Controls.GridView.DataLoadMode)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,Telerik.Windows.Controls.GridView.GridViewNewRowPosition)120 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Int32,System.Windows.FreezeValueCallback)120 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.FreezeValueCallback,Telerik.Windows.Controls.GridView.GridViewSelectionUnit)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,Telerik.Windows.Controls.GridView.GridViewRowDetailsVisibilityMode)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,Telerik.Windows.Controls.GridView.GroupRenderMode)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.Controls.SelectionMode,System.Windows.FreezeValueCallback)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,Telerik.Windows.Controls.GridView.GridLinesVisibility)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,Telerik.Windows.Controls.GridView.ScrollUpdateMode)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,Telerik.Windows.Controls.GridView.FilteringMode)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,Telerik.Windows.Controls.GridView.MergedCellsDirection)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Double,System.Windows.FreezeValueCallback)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,Telerik.Windows.Controls.GridViewClipboardCopyMode)120 bytes (0.00%) to System.Windows.UIPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.UIPropertyMetadata->(System.Double,System.Windows.FreezeValueCallback)120 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.FreezeValueCallback,System.Windows.Media.MatrixTransform)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,System.Windows.Visibility)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,Telerik.Windows.Controls.GridViewClipboardPasteMode)120 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.FreezeValueCallback,System.Windows.Media.FontFamily)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,System.Windows.Point)120 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.FreezeValueCallback,System.Windows.Media.MatrixTransform)112 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.VerticalAlignment)112 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.Media.SolidColorBrush)112 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.HorizontalAlignment)112 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(System.Windows.Visibility)112 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Boolean) 56 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.String) 56 bytes (0.00%) to System.Windows.UIPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.UIPropertyMetadata->(System.String) 56 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(Telerik.Windows.Controls.GridView.GridViewEditTriggers) 56 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.FontStretch) 56 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(Telerik.Windows.Controls.GridViewValidationMode) 56 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(Telerik.Windows.Controls.ActionOnLostFocus) 56 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Windows.Style) 56 bytes (0.00%) to System.Windows.PropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.PropertyMetadata->(Telerik.Windows.Controls.GridView.ColumnReorderOptions) 56 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(Telerik.Windows.Controls.GridViewLength) 56 bytes (0.00%) to System.Windows.FrameworkPropertyMetadata MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Windows.FrameworkPropertyMetadata->(System.Double) 26 MB (13.65%) to System.Collections.Generic.Dictionary<T,U> MS.Internal.ComponentModel.DependencyObjectPropertyDescriptor->System.Collections.Generic.Dictionary<T,U>->(System.Collections.Generic.ObjectEqualityComparer<T>,System.Int32 [])
We're using Telerik.WPF.UIControl_2015Q2 for .NET Framework 4.0
Thank you
Hi,
If two unpinned panes are next to each other in our mainWindow like shown in this example:
https://github.com/telerik/xaml-sdk/tree/master/Docking/OrderedUnpinnedPanes
In this if pane1 and pane2 both are in unpinned state, and inside pane1 if some button activates the pane2 and tries to bring it to the front, it fails.
Because in the time during which pane2 tries to come in the view during that pane1 is just going back to inActive autohidden state due to whichpane2 couldn't come in the view.
Can you please suggest me a solution for this problem.
I need to fix this issue urgently.
Thanks

Hi,
I'm following the example of RestoredTilesToSpanMultipleRowsAndColumns_WPF on the provided developer examples and i have stumbled upon 2 problems:
<telerik:RadTileView x:Name="MyRadTileView"> <telerik:RadTileView.ItemsPanel> <ItemsPanelTemplate> <local:MultipleRowsAndColumnsPanel ColumnsCount="3"/> </ItemsPanelTemplate> </telerik:RadTileView.ItemsPanel> <telerik:RadTileViewItem Content="test" local:TileViewAttachedProperties.Row="0" local:TileViewAttachedProperties.Column="0"/> <telerik:RadTileViewItem Content="test2" local:TileViewAttachedProperties.Row="0" local:TileViewAttachedProperties.Column="1"/> <telerik:RadTileViewItem Content="test3" local:TileViewAttachedProperties.Row="0" local:TileViewAttachedProperties.Column="2"/></telerik:RadTileView>
Error:
System.InvalidOperationException HResult=0x80131509 Message=Cannot call Arrange on a UIElement with infinite size or NaN. Parent of type 'RestoredTilesToSpanMultipleRowsAndColumns.MultipleRowsAndColumnsPanel' invokes the UIElement. Arrange called on element of type 'Telerik.Windows.Controls.RadTileViewItem'. Source=PresentationCore StackTrace: at System.Windows.UIElement.Arrange(Rect finalRect) at RestoredTilesToSpanMultipleRowsAndColumns.MultipleRowsAndColumnsPanel.ArrangeOverride(Size finalSize) in ...\RestoredTilesToSpanMultipleRowsAndColumns\MultipleRowsAndColumnsPanel.cs:line xx at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize) at System.Windows.Controls.ItemsPresenter.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.ScrollContentPresenter.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Border.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds) at System.Windows.Controls.ScrollViewer.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Border.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Control.ArrangeOverride(Size arrangeBounds) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Border.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Grid.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at MS.Internal.Helper.ArrangeElementWithSingleChild(UIElement element, Size arrangeSize) at System.Windows.Controls.ContentPresenter.ArrangeOverride(Size arrangeSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Documents.AdornerDecorator.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Controls.Border.ArrangeOverride(Size finalSize) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Window.ArrangeOverride(Size arrangeBounds) at System.Windows.FrameworkElement.ArrangeCore(Rect finalRect) at System.Windows.UIElement.Arrange(Rect finalRect) at System.Windows.Interop.HwndSource.SetLayoutSize() at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value) at System.Windows.Interop.HwndSource.set_RootVisual(Visual value) at System.Windows.Window.SetRootVisual() at System.Windows.Window.SetRootVisualAndUpdateSTC() at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight) at System.Windows.Window.CreateSourceWindow(Boolean duringShow) at System.Windows.Window.CreateSourceWindowDuringShow() at System.Windows.Window.SafeCreateWindowDuringShow() at System.Windows.Window.ShowHelper(Object booleanBox) at System.Windows.Window.Show() at System.Windows.Window.ShowDialog()
2. Using this template, doesn't allow loading on an Window_LoadedEvent:
public MainWindow() { InitializeComponent(); }private void Window_Loaded(object sender, RoutedEventArgs e) { GenerateTiles();
}Result:
When i remove the template from the radtileview, both problems disappear, but i cannot define the placement of items, i.e., Row, RowSpan, Column and ColumnSpan don't work anymore:
Example 1:
<telerik:RadTileView x:Name="MyRadTileView"> <telerik:RadTileViewItem Content="test" local:TileViewAttachedProperties.Row="0" local:TileViewAttachedProperties.Column="2"/> <telerik:RadTileViewItem Content="test2" local:TileViewAttachedProperties.Row="0" local:TileViewAttachedProperties.Column="0"/> <telerik:RadTileViewItem Content="test3" local:TileViewAttachedProperties.Row="0" local:TileViewAttachedProperties.Column="1"/></telerik:RadTileView>
Result:
I can surpass this problem by using Position property of radtileviewitem, but there is a problem when an item's size is bigger, i.e., when i want an item to either span more than 1 row/column.
In resume, i need a way to either use the Multicolumns template with infinite rows, or a way to continue without the template but being able to define the position of each item, even when an item occupies more than 1 row/column.
Can anyone help me?
Regards
I'm trying to enable or disable the whole menu based on a value of a variable (i.e., SomeVariable). However, when using Style (in the following xaml) with telerik:RadMenu, the whole menu disappears?
<telerik:RadMenu.Style>
<Style TargetType="telerik:RadMenu">
<Setter Property="IsEnabled" Value="False" />
<Style.Triggers>
<DataTrigger Binding="{Binding SomeVariable}" Value="Draft">
<Setter Property="IsEnabled" Value="True" />
</DataTrigger>
</Style.Triggers>
</Style>
</telerik:RadMenu.Style>
Thank you
If the map background is bound to a property that has no initial value, the map will ignore the mouse unless using a child control. I only found one mention of anything simliar to this: https://arstechnica.com/civis/viewtopic.php?t=83073
<Window x:Class="MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="MainWindow" Height="350" Width="525"> <telerik:RadMap Background="{Binding MapBackground}"> <telerik:RadMap.Provider> <telerik:OpenStreetMapProvider /> </telerik:RadMap.Provider> </telerik:RadMap></Window>
Class MainWindow Public Sub New() ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. DataContext = Me End Sub Public Property MapBackground As Media.BrushEnd Class
I have many columns in the GridView. It works fine. But when I apply the filters in each column, the headers are not showing.
The header cells seem to be wrapped(Vertical height becomes big)
I tried to set the column's width as star or a fixed value. The filter icons are showing. By the way I set the header text wrapping. It seems no space to place the headers unless I remove some columns.
Any idea?
Hi,
I've an error on a gridview when I try to filter column. This is my code:
private void SetFilter()
{
log.Debug("Start function SetFilter()");
rgvMain.FilterDescriptors.Clear();
CompositeFilterDescriptor compositeDescriptor = new CompositeFilterDescriptor();
compositeDescriptor.LogicalOperator = FilterCompositionLogicalOperator.And;
if (!string.IsNullOrEmpty(txtfilterCode.Text))
{
compositeDescriptor.FilterDescriptors.Add(new Telerik.Windows.Data.FilterDescriptor("LAB_CODE", Telerik.Windows.Data.FilterOperator.Contains, txtfilterCode.Text));
}
if (!string.IsNullOrEmpty(txtfilterDescr.Text))
{
compositeDescriptor.FilterDescriptors.Add(new Telerik.Windows.Data.FilterDescriptor("LAB_DESCR", Telerik.Windows.Data.FilterOperator.Contains, txtfilterDescr.Text));
}
//add all filter to radgrid
rgvMain.FilterDescriptors.Add(compositeDescriptor);
log.Debug("End function SetFilter()");
}
This is the StackTrace:
at Telerik.Windows.Data.Expressions.EnumerableFilterOperatorExpressionBuilder.GenerateContainsMethodCall(Expression source, Expression value, Boolean shouldNegate)
at Telerik.Windows.Data.Expressions.EnumerableFilterOperatorExpressionBuilder.GenerateContains(Expression left, Expression right)
at Telerik.Windows.Data.Expressions.FilterOperatorExpressionBuilderBase.CreateExpression(Expression left, Expression right)
at Telerik.Windows.Data.Expressions.OperatorValueFilterDescriptorExpressionBuilderBase.CreateBodyExpressionThreadSafe()
at Telerik.Windows.Data.Expressions.OperatorValueFilterDescriptorExpressionBuilderBase.CreateBodyExpression()
at Telerik.Windows.Data.FilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
at Telerik.Windows.Data.FilterDescriptorBase.CreateFilterExpression(Expression instance)
at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpressionThreadSafe()
at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
at Telerik.Windows.Data.CompositeFilterDescriptor.CreateFilterExpression(ParameterExpression parameterExpression)
at Telerik.Windows.Data.FilterDescriptorBase.CreateFilterExpression(Expression instance)
at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpressionThreadSafe()
at Telerik.Windows.Data.Expressions.FilterDescriptorCollectionExpressionBuilder.CreateBodyExpression()
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.QueryableCollectionView.get_IsEmpty()
at Telerik.Windows.Data.DataItemCollection.get_IsEmpty()
at Telerik.Windows.Controls.GridView.BaseItemsControl.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Controls.DataControl.OnItemsCollectionChangedDispatch(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.Listener`2.ReceiveWeakEvent(Object sender, TArgs args)
at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
at Telerik.Windows.Data.QueryableCollectionView.InvalidatePagingAndRefresh()
at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsChanged()
at Telerik.Windows.Data.QueryableCollectionView.OnFilterDescriptorsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
at Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
at Telerik.Windows.Data.FilterDescriptorCollection.InsertItem(Int32 index, IFilterDescriptor item)
at System.Collections.ObjectModel.Collection`1.Insert(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.System.Collections.IList.Insert(Int32 index, Object value)
at Telerik.Windows.Data.CollectionHelper.Insert(IList target, IEnumerable newItems, Int32 startingIndex, IEqualityComparer itemComparer)
at Telerik.Windows.Data.ObservableCollectionManager.HandleCollectionChanged(IList sender, NotifyCollectionChangedEventArgs args)
at Telerik.Windows.Data.ObservableCollectionManager.Telerik.Windows.Data.IWeakEventListener<System.Collections.Specialized.NotifyCollectionChangedEventArgs>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
at Telerik.Windows.Data.RadObservableCollection`1.InsertItem(Int32 index, T item)
at Telerik.Windows.Data.FilterDescriptorCollection.InsertItem(Int32 index, IFilterDescriptor item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at FOX.Module.CommonSearchModules.SupplierPopup.SetFilter() in D:\FOX\Amplifon Fox\New Zealand\Releases\0.16.0\FOX.Module.CommonSearchModules\PopUp\SupplierPopup.xaml.cs:line 274
at FOX.Module.CommonSearchModules.SupplierPopup.btnSearch_Click(Object sender, RoutedEventArgs e) in D:\FOX\Amplifon Fox\New Zealand\Releases\0.16.0\FOX.Module.CommonSearchModules\PopUp\SupplierPopup.xaml.cs:line 101



Hello,
is it possible to set different VerticalAlignment-Properties for RadPanelItems in a RadPanelBar?
I want to vertical align the first item to top (fixed height) and then the second item to stretch with the User Control.
I tried this solution, but it won't work:
<telerik:RadPanelBar ExpandMode="Multiple" ScrollViewer.HorizontalScrollBarVisibility="Disabled"> <telerik:RadPanelBarItem Header="Liveliste" IsExpanded="True" VerticalAlignment="Top"> <views:StationsLiveView /> </telerik:RadPanelBarItem> <telerik:RadPanelBarItem Header="Teilnehmerliste" IsExpanded="True" VerticalAlignment="Stretch"> <views:StationsUserView /> </telerik:RadPanelBarItem> </telerik:RadPanelBar>