SfNavigationDrawer does not work with ContentControl and Caliburn.Micro

Hello Team,

Please find attached sample solution and answer the following queries.

I've attached ItemClicked event with ViewModel and it is getting triggered properly but the content control is not showing the loaded View, I've used same code in my other app and I am sure that it is working fine but with SfND it is not working.

Also I am having few more questions as follow : 

1) Change the bg color of Drawer itself.
2) Sub-Menu behaviour is not proper when the drawer is collapsed.




Attachment: Demo2_480a91f3.7z

8 Replies 1 reply marked as answer

SS Suganya Sethuraman Syncfusion Team April 26, 2021 10:46 AM UTC

Hi Dhairya,

Greetings from Syncfusion.

We have analyzed the reported issues.

Query 1: “
The content control is not showing the loaded View”

We have checked the attached sample. In that example, the ContentControl's content is not set. So, in the ItemClicked event, we set content to the ContentControl. The view has been correctly loaded. Please see the sample below.

Query 2: “Change the bg color of Drawer itself.”

To change the background color of a drawer, we recommend using the DrawerBackground API.

Please have a modified sample for your reference,

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Demo21363072659

Query 3: “Sub-Menu behaviour is not proper when the drawer is collapsed.”

We have analyzed your query and checked the reported issue. We were able to reproduce the same and we have logged bug report on this, please find the bug report from below.
 

Link: https://www.syncfusion.com/feedback/24697

The provided feedback link is private, and you need to login to view this feedback.

The fix for the reported issue will be available on May 7, 2021.

If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.

 
Regards,
Suganya Sethuraman.



 
 
 


Marked as answer

DJ Dhairya Joshi April 26, 2021 12:31 PM UTC

Hello Team,

Thank you for your quick response.

My concern is still the same for Query 1:

Query 1: “The content control is not showing the loaded View”

We have checked the attached sample. In that example, the ContentControl's content is not set. So, in the ItemClicked event, we set content to the ContentControl. The view has been correctly loaded. Please see the sample below.

--HomeView.xaml

<ContentControl
                    x:Name="ActiveItem"
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Center"
                    Content="ContentView" />

--HomeView.xaml.cs

private void navigationDrawer_ItemClicked(object sender, Syncfusion.UI.Xaml.NavigationDrawer.NavigationItemClickedEventArgs e)
        {
            ActiveItem.Content = new TextInputView();
        }

This is not MVVM way, this is code behind, please take a look at the file HomeViewModel.cs following method is linked with ItemClicked event of drawer into ViewModel and it works. ActivateItem() function is used to load the VM into content content control (MVVM Framework :  Caliburn.Micro).  My only problem is my ContentView is placed inside the SfNavigationDrawer.ContentView due to this it is not placing the new VM. If I take out my ContentView out of your SFND it works.
So basically it is not getting triggered if its inside content view.

public void MessageFromView(object s,Syncfusion.UI.Xaml.NavigationDrawer.NavigationItemClickedEventArgs e)
        {
            ActivateItem(new DashboardViewModel());
        }

For query 2 and query 3, I will check from my end.

Thank you,
Dhairya Joshi



SS Suganya Sethuraman Syncfusion Team April 27, 2021 09:18 AM UTC

Hi Dhairya,

Query 1: “The content control is not showing the loaded View”

We have analyzed your query and checked the reported issue. We were able to reproduce the same and we have logged bug report on this, please find the bug report from below.

Link: https://www.syncfusion.com/feedback/24743

The provided feedback link is private, and you need to login to view this feedback.

The fix for the reported issue will be available on May 11, 2021.

If you have any more specification/precise replication procedure or a scenario to be tested, you can add it as a comment in the portal.

Regards,
Suganya Sethuraman.
 



SP Sakthivel Palaniyappan Syncfusion Team May 7, 2021 12:37 PM UTC

Hi Dhairya,

Thanks for the patience.

Query 3: “Sub-Menu behaviour is not proper when the drawer is collapsed.”

We have fixed the reported issue “Sub-Menu behaviour is not proper when the drawer is collapsed” and please download the path from the following location.

Please find the patch setup from below location:
https://syncfusion.com/Installs/support/patch/19.1.0.54/943973/F164853/SyncfusionPatch_19.1.0.54_943973_5072021063429525_F164853.exe

(OR)

Please find the patch assemblies alone from below location:
https://syncfusion.com/Installs/support/patch/19.1.0.54/943973/F164853/SyncfusionPatch_19.1.0.54_943973_5072021063429525_F164853.zip

(OR)

Please find the NuGet from below location:
https://syncfusion.com/Installs/support/patch/19.1.0.54/943973/F164853/SyncfusionNuget_19.1.0.54_943973_5072021063429525_F164853.zip

Assembly Version: 19.1.0.54

We can take NuGet only using Main release and SP1 release versions, so we have taken the NuGet in 19.1.0.54.

Disclaimer:
Please note that we have created this patch for version 19.1.0.54 specifically to resolve the following issue reported in this incident. If you have received other patches for the same version for other products, please apply all patches in the order received.

Note: Please clear the cache, before the apply the provided patch
https://www.syncfusion.com/kb/6987/how-to-clear-nuget-cache

This fix will be included in our upcoming weekly NuGet release, which will be available on May 18, 2021.

Regards,
Sakthivel P.



SS Suganya Sethuraman Syncfusion Team May 11, 2021 12:16 PM UTC

Hi Dhairya,

Thanks for your patience.

Query 1: “The content control is not showing the loaded View”

The reported issue occurred because the DataContext was not set to the ContentControl. We have fixed this issue as shown in the below code snippet,

Code snippet
 
<sf:SfNavigationDrawer.ContentView> 
    <Grid Background="DarkBlue"> 
        <ContentControl 
                    x:Name="ActiveItem" 
                    Grid.Column="1" 
                    cal:Bind.Model="{​​​​​​​​Binding}​​​​​​​​" /> 
    </Grid> 
</sf:SfNavigationDrawer.ContentView> 
 

Reference Link: https://stackoverflow.com/questions/45404985/wpf-caliburn-micro-and-tabcontrol-changing-tab-not-changing-model

Please have a modified sample for your reference,

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Demo2-1996284646

Please let us know if you have any concerns.

Regards,
Suganya Sethuraman.



SS Suganya Sethuraman Syncfusion Team May 19, 2021 05:24 AM UTC

Hi Dhairya,

Thanks for your patience.

Query 3: “Sub-Menu behaviour is not proper when the drawer is collapsed.”

We have included the fix in our latest Weekly NuGet release v19.1.0.64 which is available for download (https://www.nuget.org/ ). We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you would require any further assistance.

Regards,
Suganya Sethuraman.
 



DJ Dhairya Joshi May 19, 2021 06:04 AM UTC

Thank you Suganya,

Appreciate your help and fixes.

You can close this incident.

Thank you,
Dhairya Joshi


SS Suganya Sethuraman Syncfusion Team May 20, 2021 04:46 AM UTC

Hi Dhairya,

Thanks for the update.

We glad that the issue has been resolved and please get back to us if you need any other assistance.

Regards,
Suganya Sethuraman.
 


Loader.
Up arrow icon