Issue with DockingAndMVVM floating

24 posts, 0 answers
  1. Anand
    Anand avatar
    12 posts
    Member since:
    Dec 2011

    Posted 21 Dec 2011 Link to this post

    I'm trying to add floating panes on event. I modified <DockingAndMVVM.zip> published on another forum discussion.
    Want to add pane to PaneCollectionFloat on command/event. This works only if PaneCollectionFloat collection is not empty on start og application. Can you suggest any solution for this problem ?

       <telerik:RadDocking Grid.Row="1">
                <telerik:RadSplitContainer InitialPosition="DockedLeft">
                    <telerik:RadPaneGroup x:Name="group"
                            local:PaneGroupExtensions.ItemsSource="{Binding PaneCollectionLeft}"
                            local:PaneGroupExtensions.ItemTitleDisplayMemberPath="Header">
                        <local:PaneGroupExtensions.ItemContentTemplate>
                            <DataTemplate>
                                <Button Content="{Binding Content.SomeContent}" />
                            </DataTemplate>
                        </local:PaneGroupExtensions.ItemContentTemplate>
                        <local:PaneGroupExtensions.ItemHeaderTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Header}" />
                            </DataTemplate>
                        </local:PaneGroupExtensions.ItemHeaderTemplate>


                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
                <telerik:RadSplitContainer InitialPosition="FloatingDockable">
                    <telerik:RadPaneGroup 
                            local:PaneGroupExtensions.ItemsSource="{Binding PaneCollectionFloat}"
                            local:PaneGroupExtensions.ItemTitleDisplayMemberPath="Header">
                        <local:PaneGroupExtensions.ItemContentTemplate>
                            <DataTemplate>
                                <Button Content="{Binding Content.SomeContent}" />
                            </DataTemplate>
                        </local:PaneGroupExtensions.ItemContentTemplate>
                        <local:PaneGroupExtensions.ItemHeaderTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Header}" />
                            </DataTemplate>
                        </local:PaneGroupExtensions.ItemHeaderTemplate>


                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking>
  2. George
    Admin
    George avatar
    1332 posts

    Posted 23 Dec 2011 Link to this post

    Hello,

     

    We took some time to work around the problem, but to no avail. We can confirm that currently this is a limitation of the RadDocking control and what I would suggest is having a pane in the toolwindow. The problem is that when an empty group is placed in a toolwindow, the toolwindow is closed and the panegroup is not in the visual tree anymore. You can insert items in this group as well without any errors, but the group won't be displayed (because the toolwindow won't be opened). This is the reason why everything works fine when the panegroup is not empty - it is in the visual tree.


    Greetings,
    George
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. nettalk
    nettalk avatar
    5 posts
    Member since:
    Feb 2014

    Posted 26 Feb 2014 in reply to George Link to this post

    I am use : WPF Q3 2013

    Original DockingAndMVVM.zip has memory leak.

    repro :

    1.  'Insert' button  10 click  ->  Make 10 RadPane
    2.  10 Radpane make floating -> Make 10 ToolWindow
    3. 'Regenerate' button click - Remove 10 RadPane

    1~3 loop  => memory leark. ..  leark...

    Thank you.

  5. nettalk
    nettalk avatar
    5 posts
    Member since:
    Feb 2014

    Posted 26 Feb 2014 in reply to nettalk Link to this post

    I found memory leak two problems in source.
    I modify source.

    Please, I need your comment for more clear.
    Thank you.



    # howto modify

    1. OnLoaded() in Telerik.Windows.Controls.Docking.AutoHideArea class

           // Application.Current.Deactivated += (s, a) => OnApplicationDeactivated(reference);


    2. ResizeControl() in  Telerik.Windows.Controls.ResizeControl class

    #if !WPF35
                //var touchableElement = new TouchableResizeControl(new WeakReference(this), validator);
                //TouchManager.RegisterTouchableElement(touchableElement);
    #endif
  6. George
    Admin
    George avatar
    1332 posts

    Posted 28 Feb 2014 Link to this post

    Hello,

    Thank you for contacting us. We will need some time to investigate the reported memory leaks and we will write back with additional information soon. 

    Regards,
    George
    Telerik
  7. George
    Admin
    George avatar
    1332 posts

    Posted 03 Mar 2014 Link to this post

    Hello,

    Please, note that this example is old and we have already build-in functionality in RadDocking control which helps implementing MVVM scenarios:
     - online documentation - http://www.telerik.com/help/wpf/raddocking-features-panes-panesource.html
     - runnable example - https://github.com/telerik/xaml-sdk , the example is listed as Docking/CustomDockingPanesFactory.

    We do recommend using PanesSource property. Hope this helps.

    Regards,
    George
    Telerik
  8. nettalk
    nettalk avatar
    5 posts
    Member since:
    Feb 2014

    Posted 03 Mar 2014 in reply to George Link to this post

    Thank you for your answer.

    But, I alread use DokcingPanesFactory.
    Anyway, I more simple test appliction for memory leak

    1. CreateWindow(include RadDocking)
    2. CloseWindow

    1~2 loop

    I check ANTS Memory Profiler for leak.
  9. George
    Admin
    George avatar
    1332 posts

    Posted 06 Mar 2014 Link to this post

    Hi,

    We are not aware of such problems with RadDocking control. Please, refer to the attached video and example and let me know if I missed anything. I am glad to assist you further.

    Regards,
    George
    Telerik

    DevCraft Q1'14 is here! Join the free online conference to see how this release solves your top-5 .NET challenges. Reserve your seat now!

  10. nettalk
    nettalk avatar
    5 posts
    Member since:
    Feb 2014

    Posted 06 Mar 2014 Link to this post

    I check your SWF VideoFile.
    But, I'm think  more looping testing.

    Anyway, I make very simple raddocking application( http://user.chol.com/~nettalk/t.zip )
    also make video file ( ANTS memroy profiler check that application  ) avi file (http://user.chol.com/~nettalk/m.zip)

    finally, I modify source to resove memory leak. (ResolvedForMe.jpg)

    Thank you...




  11. nettalk
    nettalk avatar
    5 posts
    Member since:
    Feb 2014

    Posted 06 Mar 2014 Link to this post

    I check your SWF VideoFile.
    But, I'm think  more looping testing.


    Anyway, I make video for MemoryLeak (use ANTS memroy profiler)

    URL <= Current WebSite check my content as spam
    ----
    http
    user.chol.com
    ~nettalk
    m.zip
    ----

    finally, I modify source to resove memory leak. (ResolvedForMe.jpg)

     Thank you
  12. George
    Admin
    George avatar
    1332 posts

    Posted 12 Mar 2014 Link to this post

    Hi,

    We took some time to test the sample project and we can confirm that the AutoHideArea parts are leak, not the RadDocking control itself. Anyway, we logged the problem in our backlog system and we will fix it for one of our upcoming releases. You can track its progress here - http://feedback.telerik.com/Project/143/Feedback/Details/122606-memory-leak-in-autohidearea-parts.

    Your telerik points are updated as well. Hope this helps.


    Regards,
    George
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  13. yoochul
    yoochul avatar
    15 posts
    Member since:
    Feb 2014

    Posted 13 Mar 2014 in reply to George Link to this post

    Hi,

    Thank you to confirm AutoHideArea fix.

    And. My simple raddocking application (resolved AutoHideArea leak) has other memory leak in ResizeControl+ThouchableResizeControl .

    check attach file(1,2,3.jpg)
  14. yoochul
    yoochul avatar
    15 posts
    Member since:
    Feb 2014

    Posted 13 Mar 2014 in reply to George Link to this post

    attach file.
  15. George
    Admin
    George avatar
    1332 posts

    Posted 18 Mar 2014 Link to this post

    Hi,

    We confirm that the ResizeControl+ThouchableResizeControl memory leaks are resolved as well. The fix for AutoHideArea, ResizeControl and TouchableResizeControl leaks will be included in the following internal build next week.

    Hope this helps.

    Regards,
    George
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  16. yoochul
    yoochul avatar
    15 posts
    Member since:
    Feb 2014

    Posted 27 May 2014 in reply to George Link to this post

    HI,

    I am back.

    I check new wpf telerik controls(memory leak resolved -  ResizeControl+ThouchableResizeControl )

    Recently, I have another memory leak in MVVM Sample(http://www.telerik.com/clientsfiles/242725_DockingAndMVVM.zip?sfvrsn=0 )

    Step1) TabItem (Pane.0.1, Pane.0.2) change Tabbed Document
    Step2) Tabbed Document change Floatting Window through ContextMenu
    Step3) Flatting Window chang Tabbed Docuemnt through ContextMenu
    Step4) Step2 ~ Step 3 Loop ....

    Regards,






  17. George
    Admin
    George avatar
    1332 posts

    Posted 29 May 2014 Link to this post

    Hello,

    The provided example is an old one and not supported anymore. With our Q3 2013 SP release we introduced a new feature for RadDocking control - PanesSource property which helps binding to observable collection. You can find more information here:
    Hope this helps.

    Regards,
    George
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  18. yoochul
    yoochul avatar
    15 posts
    Member since:
    Feb 2014

    Posted 29 May 2014 in reply to George Link to this post

    OK...

    Very Simple application

    <Window x:Class="TelerikWpfAppLeak.MainWindow"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    Title="MainWindow" Height="350" Width="525">
            <Grid>
            <telerik:RadDocking PanesSource="{Binding Panes}">
                <telerik:RadDocking.DockingPanesFactory>
                    <telerik:DockingPanesFactory/>
                </telerik:RadDocking.DockingPanesFactory>
            </telerik:RadDocking>
        </Grid>
    </Window>


    ​/// <summary>
        /// Interaction logic for MainWindow.xaml
        /// </summary>
        public partial class MainWindow : Window
        {
            public MainWindow()
            {
                InitializeComponent();
                this.DataContext = new ViewModel();
            }
        }

        public class ViewModel : INotifyPropertyChanged
        {
            private ObservableCollection<RadPane> panes;

            public ViewModel()
            {
                this.Panes = new ObservableCollection<RadPane>()
            {
                new RadPane() { Header = "Pane 1" },
            };
            }

            public ObservableCollection<RadPane> Panes
            {
                get
                {
                    return this.panes;
                }

                set
                {
                    if (this.panes != value)
                    {
                        this.panes = value;
                        this.OnPropertyChanged("Panes");
                    }
                }
            }

            public event PropertyChangedEventHandler PropertyChanged;

            public void OnPropertyChanged(string propertyName)
            {
                if (PropertyChanged != null)
                {
                    PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
                }
            }
         }


    RadPane("Plan1)"  status: Floating <-> TabbedDoucment 

    1.jpg:  2 Loop
    2.jpg:  7 Loop
    3.jpg:  12 Looping

    Is Memory Leaking?








  19. George
    Admin
    George avatar
    1332 posts

    Posted 03 Jun 2014 Link to this post

    Hello,

    We can confirm that this is a memory issue in this scenario and I logged the bug here where you can track its progress. Please, note that if the pane is dragged and dropped, the memory issue doesn't appear. You could disable the context menu until the problem is resolved:
    new RadPane() { Header = "Pane 1", ContextMenuTemplate = null },

    I am glad to update your telerik points as well.

    Regards,
    George
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  20. yoochul
    yoochul avatar
    15 posts
    Member since:
    Feb 2014

    Posted 01 Jul 2014 in reply to George Link to this post

    [Q2 for 2014.]

    Memeory leak is resolved in RadPane with ContextMenuTemplate. Thank you.
    But RadPane has RadGridView is cause memory leak

    Step1) "TTTT title" mouse drag make toolwindow.
    Step2) Tool window make rollback.
    Step3) 1~2 Looping...

    ​<Window x:Class="WpfApplication1.MainWindow"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
            Title="MainWindow" Height="350" Width="525">
        <telerik:RadDocking>
            <telerik:RadSplitContainer >
                <telerik:RadPaneGroup   >
                    <telerik:RadPane Title="TTTT">
                        <telerik:RadGridView />
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
    </Window>
  21. George
    Admin
    George avatar
    1332 posts

    Posted 03 Jul 2014 Link to this post

    Hello,

    Can you share more information about what is leaking? If you provide us with a screenshot or a report will be very helpful to find the leak you mentioned.

    Regards,
    George
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  22. yoochul
    yoochul avatar
    15 posts
    Member since:
    Feb 2014

    Posted 03 Jul 2014 in reply to George Link to this post

    OK... I am attach file.

    I am use JustTrace trial version...
  23. Nick
    Admin
    Nick avatar
    593 posts

    Posted 08 Jul 2014 Link to this post

    Hello Anand,

    The GridView problem with TouchableElements was resolved a while ago, and we were not able to reproduce it on our side. Would it be possible to open a support ticket with a small sample where we can observe the problem? This will greatly help in our efforts to pin point the exact cause of the issue and provide a solution. 

    Thank you in advance. 

    Regards,
    Nik
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  24. yoochul
    yoochul avatar
    15 posts
    Member since:
    Feb 2014

    Posted 08 Jul 2014 in reply to Nick Link to this post

    Hi,

    Step1) I create 'TelerikWpfAppGridLeak' WPF application By Wizard  . (makeapp.jpg )
    Step2) Modify MainWindow.xaml

    <Window x:Class="TelerikWpfAppGridLeak.MainWindow"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                    Title="MainWindow" Height="350" Width="525">
        <telerik:RadDocking>
            <telerik:RadSplitContainer >
                <telerik:RadPaneGroup   >
                    <telerik:RadPane Title="TTTT">
                        <telerik:RadGridView />
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
    </Window>

    Step3) Run Application (initstatus.jpg)
    Step4)  'TT' RadPane make toolwindow (MakeToolWindowByMouseDrag.jpg)
    Step5) Rollback (rollbacking.jpg)
    Step6) 3~5 looping...

    Memroy Leak Capture - (1, 2, 3.jpg)



  25. Nick
    Admin
    Nick avatar
    593 posts

    Posted 10 Jul 2014 Link to this post

    Hello Yoochul,

    We were able to reproduce the problem and have logged it in our system. You can track the progess of the item in our feedback portal.

    Regards,
    Nik
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
UI for WPF is Visual Studio 2017 Ready