How to add Miximize/Restore button to RadDocking (or to RadSplitContainer) ?

24 posts, 1 answers
  1. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 24 Sep Link to this post

    How to add Miximize/Restore button to RadDocking (or to RadSplitContainer) in addition to Close button that is already there? In particularly, it helps set the behavior of the RadDocking  (or RadSplitContainer) similar to the behavior of a Window instance of MS Windows OS.
  2. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 24 Sep in reply to Yaroslav Link to this post

    I am also willing to consider such a possibility for the RadPain class.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 24 Sep in reply to Yaroslav Link to this post

    I bag your pardon, but I in need of the ability to miximize/restor each chart VERY!!! In ChartsWindow.PNG file attached you can see the View containing the charts. I want to give ability to the user to select the chart he or she want to watch and zoom it in to all screen for good observing and examining. And after observing of the chart to restore it to its original size and locate it to its original place in the window. Is it possible to implement?
  5. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 27 Sep Link to this post

    Hello Yaroslav,

    The desired by you functionality is not support by RadDocking out of the box. However, based on your provided description what we could suggest you is to consider using out RadTileView control. It provides the desired minimizing and maximizing functionality out of the box - that we believe will suit your requirement.

    You could check the control in action from our Silverlight demos (they are the same for WPF):
    http://demos.telerik.com/silverlight/#TileView/FirstLook

    Hope this helps.

    Regards,
    Nasko
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  6. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 27 Sep in reply to Nasko Link to this post

    Whell, Nasco, I'll consider use of RadTileView. But I have a favour: please delete 'ChartWindow.png file attached from this my post, if this is possible of course. Thank you very much in advance. The post itself I'm not closing yet.
  7. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 27 Sep Link to this post

    Hello Yaroslav,

    The provided image has been deleted as requested.

    If you have any additional questions or concerns regarding Telerik controls, please do not hesitate to contact us.

    Regards,
    Nasko
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  8. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 27 Sep in reply to Nasko Link to this post

    I have RadPains in RadDocking as Prism regions. Please see below:

    <telerik:RadDocking Grid.Row="1" Grid.Column="0" x:Name="Docking">
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Скорость газа усреднённая" prism:RegionManager.RegionName="GasVelocityChartRegion"
                                         IsHidden="{Binding IsGasVelocityChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
                             
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Скорость звука усреднённая" prism:RegionManager.RegionName="SoundVelocityChartRegion"
                                         IsHidden="{Binding IsSoundVelocityChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
                 
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Объёмный расход при рабочих условиях" prism:RegionManager.RegionName="VolumeFlowRateAtWorkingRegion"
                                         IsHidden="{Binding IsWorkingVolumeFlowRateChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
                 
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Объёмный расход при стандартных условиях" prism:RegionManager.RegionName="VolumeFlowRateAtStandartRegion"
                                         IsHidden="{Binding IsStandartVolumeFlowRateChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
                 
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Скорость звука по каждому лучу" prism:RegionManager.RegionName="SoundVelocityPerBeamChartRegion"
                                         IsHidden="{Binding IsSoundVelocityPerBeamChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
                 
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Скорость газа по каждому лучу" prism:RegionManager.RegionName="GasVelocityPerBeamChartRegion"
                                         IsHidden="{Binding IsGasVelocityPerBeamChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
     
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Коэффициент усиления по каждому лучу (AGC)" prism:RegionManager.RegionName="AGCPerBeamChartRegion"
                                         IsHidden="{Binding IsAGCPerBeamChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
     
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Отношение 'Сигнал/Шум' по каждому лучу (SNR)" prism:RegionManager.RegionName="SNRPerBeamChartRegion"
                                         IsHidden="{Binding IsSNRPerBeamChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
                 
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Относительная турбулентность по каждому лучу" prism:RegionManager.RegionName="RelativeTurbulencePerBeamRegion"
                                         IsHidden="{Binding IsRelativeTurbulencePerBeamChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
     
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Производительность по каждому лучу" prism:RegionManager.RegionName="PerformancePerBeamRegion"
                                         IsHidden="{Binding IsPerformancePerBeamChartHiden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
            </telerik:RadDocking>

    So each Radpain is Prism region where specified chart view is. Can I do this way with RadTileView? Nasko, be a friend please, give me a similar example with RadTileView if possible.

  9. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 27 Sep in reply to Yaroslav Link to this post

    In the post called 'How to maximize the RadPane' on http://www.telerik.com/forums/how-to-maximize-the-radpane and there is an example of Maximize/Restore button on RadPain. This example is in 'MaximizeAndRestore.ZIP' file. It is for both floating and docked RadPains! I had downloaded it but it didn't work. (I have MS VS 2015 Propfessional and licenced Telerik with latest upgrades.) I'll be very grateful to you if you give me this example upgraded for latest Telerik for WPF. Please.
  10. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 28 Sep Link to this post

    Hello Yaroslav,

    The approach you have found in the forum post describes how to add Maximize and Restore buttons both when RadPane is floating and it is docked, but does not provide the described by you functionality of zooming in and out of the Panes. Also as stated in the forum post the provided approach for restoring the docked Pane might not work in same cases - as this is not a functionality provided out of the box but a custom implementation we could not guarantee you that it will work in all desired scenarios.

    I am attaching the sample from the post for WPF. Please. check it and let us know if that works for you or we should continue with the approach of the TileView and try to provide you with an example of Prism.

    Hope this helps.

    Regards,
    Nasko
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  11. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 28 Sep in reply to Nasko Link to this post

    Hello, Nasko. I've tryed to use this approach (Maximize and Restore buttons) in my Prism modular application and it works. I've located 'MaximizeExtensions' class in common class library accessable from all modules and also from Shell project. I've located template for the button in ResourceDictionary in 'App.xaml' class in Shell project (please see below):

    <Application x:Class="FlowmeterConfigurator.App" 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" xmlns:local="clr-namespace:FlowmeterConfigurator" xmlns:views="clr-namespace:FlowmeterConfigurator.Views">
        <Application.Resources>
            <ResourceDictionary>
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/System.Windows.xaml" />
                    <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.xaml" />
                    <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Chart.xaml" />
                    <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Input.xaml" />
                    <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Data.xaml" />
                    <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Navigation.xaml" />
                    <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.Docking.xaml" />
                    <ResourceDictionary Source="/Telerik.Windows.Themes.Office2013;component/Themes/Telerik.Windows.Controls.GridView.xaml" />
                </ResourceDictionary.MergedDictionaries>
                <Style TargetType="views:Shell" BasedOn="{StaticResource RadWindowStyle}" />
                <!--Шаблон для кнопки 'Maximize', которая будет находится на RadPain-->
                <DataTemplate x:Key="TitleTemplate">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="20" />
                        </Grid.ColumnDefinitions>
                        <ContentPresenter Content="{Binding}" Margin="0,0,75,0" />
                        <telerik:RadButton x:Name="PART_MaximizeButton" Grid.Column="1" Click="OnClicked">
                            <Path Stroke="Black" Width="14" Height="14" Data="M1.5,2.5 L12.5,2.5 12.5,11.5 1.5,11.5 Z M4.5,5.5 L9.5,5.5 9.5,8.5 4.5,8.5 Z" />
                        </telerik:RadButton>
                    </Grid>
                </DataTemplate>
                <Style TargetType="telerik:RadPane">
                    <Setter Property="TitleTemplate" Value="{StaticResource TitleTemplate}" />
                </Style>
            </ResourceDictionary>
        </Application.Resources>
    </Application>

    And 'OnClicked' event handler I've located in App.xaml.cs file. So all works. BUT there are a few hangnails. 1) RadPain header is not displayed. Please see 'ChartWithoutHeader.PNG' file attached. 2) Button is shown not completely. Please see 'ChartWithoutHeader.PNG' file attached. 3) Context  menu is not appeared and not displayed at all when I click with right mouse button. But in your example - 'RadDockingMaximizeRestore' all these things work perfectly well! I've run it and see it. On the off-chance, I show my preasent RadDocking XAML below:

    <telerik:RadDocking Grid.Row="1" Grid.Column="0" x:Name="Docking">
                 
                <telerik:RadSplitContainer Orientation="Vertical" telerik:DockingPanel.InitialSize="318,200">
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Скорость звука по каждому лучу" prism:RegionManager.RegionName="SoundVelocityPerBeamChartRegion"
                                         IsHidden="{Binding IsSoundVelocityPerBeamChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Скорость газа по каждому лучу" prism:RegionManager.RegionName="GasVelocityPerBeamChartRegion"
                                         IsHidden="{Binding IsGasVelocityPerBeamChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Производительность по каждому лучу" prism:RegionManager.RegionName="PerformancePerBeamRegion"
                                         IsHidden="{Binding IsPerformancePerBeamChartHiden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
                             
                <telerik:RadSplitContainer Orientation="Vertical"  telerik:DockingPanel.InitialSize="385,200">
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Коэффициент усиления по каждому лучу (AGC)" prism:RegionManager.RegionName="AGCPerBeamChartRegion"
                                         IsHidden="{Binding IsAGCPerBeamChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Отношение 'Сигнал/Шум' по каждому лучу (SNR)" prism:RegionManager.RegionName="SNRPerBeamChartRegion"
                                         IsHidden="{Binding IsSNRPerBeamChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                     
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Относительная турбулентность по каждому лучу" prism:RegionManager.RegionName="RelativeTurbulencePerBeamRegion"
                                         IsHidden="{Binding IsRelativeTurbulencePerBeamChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
     
                <telerik:RadSplitContainer Orientation="Vertical" telerik:DockingPanel.InitialSize="1190,200">
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Скорость газа усреднённая" prism:RegionManager.RegionName="GasVelocityChartRegion"
                                         IsHidden="{Binding IsGasVelocityChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Скорость звука усреднённая" prism:RegionManager.RegionName="SoundVelocityChartRegion"
                                         IsHidden="{Binding IsSoundVelocityChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Объёмный расход при рабочих условиях" prism:RegionManager.RegionName="VolumeFlowRateAtWorkingRegion"
                                         IsHidden="{Binding IsWorkingVolumeFlowRateChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                    <telerik:RadPaneGroup>
                        <telerik:RadPane DataContext="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type telerik:RadDocking}}, Path=DataContext}"
                                         Header="Объёмный расход при стандартных условиях" prism:RegionManager.RegionName="VolumeFlowRateAtStandartRegion"
                                         IsHidden="{Binding IsStandartVolumeFlowRateChartHidden, Mode=TwoWay}"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
                 
    </telerik:RadDocking>

    This XAML-markup is different from the one I used before and from the one in your example. May be this is the case of three abovementioned hangnails? In addition, I use in my application, 'Office 2013' theme. May be this is the case of the hangnails? Is it possible to correct 'Minimize/Restore' button definition for its perfectly working? I believe that in general, the approach with 'Maximize/Restore' button is not bad, but rather good. Plese help me to correct situation if possible.

  12. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 28 Sep in reply to Yaroslav Link to this post

    Nasko, by the way, I did the following XAML-markup in the main window of your application example (RadDockingMaximizeRestore), please see below:

    <Window x:Class="RadDockingMaximizeRestore.MainWindow"
            Title="MainWindow" Height="350" Width="525">
        <Grid x:Name="LayoutRoot">
            <telerik:RadDocking>
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup >
                        <telerik:RadPane Header="Pane" />
                    </telerik:RadPaneGroup>
                    <!--I ADDED THIS RadPainGroup HERE AND ALL WORKS PERFECTLY!-->
                    <telerik:RadPaneGroup>
                        <telerik:RadPane Header="Pane_2"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
                <telerik:RadSplitContainer InitialPosition="FloatingDockable">
                    <telerik:RadPaneGroup>
                        <telerik:RadPane Header="Floating Pane"/>
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
     
            </telerik:RadDocking>
        </Grid>
    </Window>

    As you can see, I added one more docable RadPainGroup in the first RadSplitContainer (in the manner of how it is done in my XAML-markup) and all continue to work perfectly well! So, why in my program are glitches?

  13. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 29 Sep in reply to Yaroslav Link to this post

    And another thing, the output of charts in my application is in a separate Prism Module called 'DeviceReading' but not in Shell project. So all Views and ViewModels relating to output of charts are in 'DeviceReading' module.
  14. Answer
    Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 29 Sep Link to this post

    Hello Yaroslav,

    As you are using the Office2013 theme the Style of the Pane that sets the Title Pane should be base on its default Style:
    <Style TargetType="telerik:RadPane" BasedOn="{StaticResource RadPaneStyle}">
        <Setter Property="TitleTemplate" Value="{StaticResource TitleTemplate}" />
    </Style>

    Thus the Header and the ContextMenu should be visualized as expected. For the size of the Button and in order to show it completely you might need to change the size of the Column inside which it is placed:
    <DataTemplate x:Key="TitleTemplate">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*" />
                <ColumnDefinition Width="25"/>
            </Grid.ColumnDefinitions>
    ...
        </Grid>
    </DataTemplate>

    Hope this helps.

    Regards,
    Nasko
    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  15. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 29 Sep in reply to Nasko Link to this post

    Thank you very much, Nasko. All works! You're a real wizard!
  16. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 27 Oct in reply to Yaroslav Link to this post

    Hello, Nasko. SOS-SOS-SOS! Yesterday I upgraded Dev.Craft Complete to the newest version and now the button for zooming/restoring of RadPain failures. When I press or click on it for RadPain zooming the following error occurs: System.IO.FileLoadException" in PresentationCore.dll. Additional information: Could not load file or assembly "Telerik.Windows.Controls.Docking, Version=2016.3.914.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7" or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040). Now (after upgrade) the version of the assembly is 2016.3.1024.45. When I run earlyer version of my application (with previouse version of DLLs) it runs perfectly. But there are many good updates in the current version of my application. So I'm interested to operate the current version of my application.

    Plese help me to correct and eliminate this error. This is for me a matter of life and death! Seriously, please help me.

  17. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 27 Oct in reply to Yaroslav Link to this post

    The exception is shown in ButtonBase.cs file in the OnClick method:
    protected virtual void OnClick()
     {
          RoutedEventArgs newEvent = new RoutedEventArgs(ButtonBase.ClickEvent, this);
          RaiseEvent(newEvent); // !!! HERE IS THE EXCEPTION OCCURS !!!
     
          MS.Internal.Commands.CommandHelpers.ExecuteCommandSource(this);
     }
  18. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 27 Oct in reply to Yaroslav Link to this post

    Also the exception occurs in Application.cs file in Run method.

    public int Run()
    {
         EEventTrace.EasyTraceEvent(EventTrace.Keyword.KeywordGeneral | EventTrace.Keyword.KeywordPerf, EventTrace.Event.WClientAppRun);
         return this.Run(null); // HERE THE EXCEPTION OCCURS!
    }
  19. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 28 Oct Link to this post

    Hi Yaroslav,

    We have checked the sample with our latest official released version R3 2016 SP1 and it seems everything is working as expected - please, check the attached video that demonstrates that.

    Mostly the observed by you error is caused due to assemblies mismatch. What you could try to do is to delete bin and obj folders in Windows Explorer and clean and rebuild the solution. If this doesn't help  you can also try removing the ShadowCache of the designer. In order to achieve this, you should do the following - check if all assemblies are the same version and you are referencing the right one (if they are Xaml or NoXaml binaries):
    1) Close all visual studio instances.
    2) Go to  C:\Users\<username>\AppData\Local\Microsoft\VisualStudio\<visual_studio_version,for_example_12.0>\Designer\ShadowCache and delete the folders there - this is the cache of VisualStudio's designer.

    I hope this will help you.

    Regards,
    Nasko
    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
  20. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 31 Oct in reply to Nasko Link to this post

    Both "delete bin and obj folders in Windows Explorer and clean and rebuild the solution" and "delete bin and obj folders in Windows Explorer and clean and rebuild the solution" didn't help unfortunately. I've tryed both of them as you wrote me. It doesn't help. What else can I do to eliminate the error?
  21. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 31 Oct in reply to Yaroslav Link to this post

    I've tryed both "delete bin and obj folders in Windows Explorer and clean and rebuild the solution" and "removing the ShadowCache of the designer". Each one of them doesn't help. The error remains.
  22. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 31 Oct Link to this post

    Hi Yaroslav,

    Could you please confirm if all binaries you are referencing are the same version and are NoXaml - as you are using Implicit Styles all binaries should be NoXaml?

    I am looking forward to hearing from you.

    Regards,
    Nasko
    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
  23. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 31 Oct in reply to Yaroslav Link to this post

    Probably I found the reason of the error. I have ClassLibrary project in my application solution and there is Telerik.Windows.Controls.Docking.DLL file there with the version of 2016.3.914.45. But your telerik:Upgrade Wizard doesn't see this project and doesn't display it in the list of projects which should be upgraded (all other projects in the solution it sees). So it can't upgrade this DLL from 2016.3.914.45 to 2016.3.1024.45 in this ClassLibrary project. How can I upgrade it in this case?
  24. Nasko
    Admin
    Nasko avatar
    588 posts

    Posted 31 Oct Link to this post

    Hello Yaroslav,

    That is definitely the reason for the observed by you issue - all Telerik binaries in the solution should be exact same version and should be referenced from the same folder.

    The Upgrade Wizard should be able to find the Class Library that references the Telerik assemblies - check the attached imaged.

    If the Upgrade Wizard is not able to find your Class Library reference the binaries by hand (delete the referenced binaries and use Add Reference to reference the right ones)  - as mentioned above be aware that the binaries should be referenced from the same folder and should be the same version.

    I really hope this will help you.

    Regards,
    Nasko
    Telerik by Progress
    Do you need help with upgrading your WPF project? Try the Telerik API Analyzer and share your thoughts!
  25. Yaroslav
    Yaroslav avatar
    123 posts
    Member since:
    Jan 2016

    Posted 31 Oct in reply to Yaroslav Link to this post

    I've moved MaximizeExtensions class from ClassLibrary project ti Shell (where upgraded to 2016.3.1024.45 version of Telerik.Windows.Controls.Docking.DLL and now Maximize/Restore button works perfectly. I bag your pardon for wasting your time. Thank you very much for your help and support. I close this post.
Back to Top
UI for WPF is Visual Studio 2017 Ready