We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Not Able to Create A Navigation Drawer

Thread ID:

Created:

Updated:

Platform:

Replies:

132445 Sep 2,2017 05:56 AM Sep 7,2017 08:31 AM Windows Forms 8
loading
Tags: NavigationDrawer
ronak
Asked On September 2, 2017 05:56 AM

The Sample provided is very difficult to understand, and please also me with how can i display my windows form page in navigation drawer when some one click on menus,

i have 4 pages and that should be displayed as per menu selected, also my navigation bar is not coming proper i have attached the screen shot, 

.and when i select the property fill, navigationdrawer does allow me to do branding in title , 

please help me with it


Attachment: se_435b7a57.zip

Kannan R [Syncfusion]
Replied On September 4, 2017 04:48 AM

Hi Ronak,      
      
Thank you for contacting Syncfusion support.       
      
 Please follow the steps below to configure NavigationDrawer control in your application.    
      
Step 1: Add the following listed assemblies to your application.       
      
·         Syncfusion.Grid.Base      
·         Syncfusion.Grid.Windows      
·         Syncfusion.Shared.Base      
·         Syncfusion.Shared.Windows      
·         Syncfusion.Tools.Base      
·         Syncfusion.Tools.Windows      
      
Step 2:  Set the NavigationDrawer settings.      
      
You have to set the NavigationDrawer Panel Width and Height. Make use of the below Code example.       
      
Code Example: [C#]      
     
    
this.navigationDrawer1.DrawerWidth = this.Width / 4;      
this.navigationDrawer1.DrawerHeight = this.Height;      
    
  
         
Step 3: Populate the DrawerMenuItems.       
      
You have to populate the DrawerMenuItems in it. Refer to the below Code example.      
      
Code example: [C#]      
       
this.navigationDrawer1.Items.Add(drawerMenuItem1);      
this.navigationDrawer1.Items.Add(drawerMenuItem2);      
this.navigationDrawer1.Items.Add(drawerMenuItem3);      
this.navigationDrawer1.Items.Add(drawerMenuItem4);      
this.navigationDrawer1.Items.Add(drawerMenuItem5);      
  
      
Step 4: Show/Hide the Sliding Drawer panel.       
      
In NavigationDrawer, ToggleDrawer function is available to show/hide the Drawer panel.       
      
Code example: [C#]      
      
this.navigationDrawer1.ToggleDrawer();      
  
     
We have also prepared a sample for your reference and it can be downloaded from following link.  
 
      
Please check the above solution and let us know if it helps.       
      
Regards,     
Kannan      
 


ronak
Replied On September 4, 2017 05:27 AM

i have a forms with different field 

when i try to add a form ie    form1 f = new form();

 this.navigationDrawer1.Container.Add(f); 

the following code gives me an error   

also tried 

 this.navigationDrawer1.ContentViewContainer.Container.Add(f);


gives the same error 

System.NullReferenceException: 'Object reference not set to an instance of an object.'


its difficult to write code for each control so i am drawing my control on other form and want to show them in in navigation container 


Mallika Kannan [Syncfusion]
Replied On September 6, 2017 12:01 AM

Hi Ronak 
 
Thanks for your update. 
 
Yes, this reported requirement can be achieved by using the below Code snippet.  
 
Please make use of the below Code snippet. 
 
Code Snippet 
 
//Create Object for different Forms  
Home home = new Home(); 
People people = new People(); 
Photos photos = new Photos(); 
Profile profile = new Profile(); 
About_us aboutus = new About_us(); 
 
            home.TopLevel = false; 
            home.AutoScroll = true; 
            home.Text = "Home"; 
            home.Show(); 
            home.Dock = DockStyle.Fill; 
            home.MinimumSize = this.Size; 
 
            people.TopLevel = false; 
            people.AutoScroll = true; 
            people.Text = "People"; 
            people.Show(); 
            people.Dock = DockStyle.Fill; 
            people.MinimumSize = this.Size; 
 
            photos.TopLevel = false; 
            photos.AutoScroll = true; 
            photos.Text = "Photos"; 
            photos.Show(); 
            photos.Dock = DockStyle.Fill; 
            photos.MinimumSize = this.Size; 
 
            profile.TopLevel = false; 
            profile.AutoScroll = true; 
            profile.Text = "Profile"; 
            profile.Show(); 
            profile.Dock = DockStyle.Fill; 
            profile.MinimumSize = this.Size; 
 
            aboutus.TopLevel = false; 
            aboutus.AutoScroll = true; 
            aboutus.Text = "About us"; 
            aboutus.Show(); 
            aboutus.Dock = DockStyle.Fill; 
            aboutus.MinimumSize = this.Size; 
 
 
Screenshot 
 
 
 
 
Kindly please check the above solution and let us know if it is helpful. 
 
Regards, 
Mallika 


ronak
Replied On September 6, 2017 01:09 AM

A Navigation Drawer is used to navigate the pages and show the page inside the navigation drawer container,

the below solution you provide it opens a new form and once the forms are closed the navigation drawer stop working, and he is not able to open the forms again, 

my query was i want to keep navigation drawer a parent and forms as a child pages and they should be added to navigation drawer space 




Attachment: syncfusionProblem_e1c6da29.zip

ronak
Replied On September 6, 2017 01:51 AM

i did few manipulations and my problem is solved, thankyou for the support


Mallika Kannan [Syncfusion]
Replied On September 6, 2017 02:03 AM

  
Hi Ronak 
 
Thanks for your update. 
 
We are glad to hear that we have helped you on this. 
 
Please let us know if you need have any other assistance. 
 
Regards, 
Mallika 


ronak
Replied On September 6, 2017 02:16 AM

i get the below error whenever i close the form which have navigation drawer, 

can you please help over it


Attachment: erro_4693ba41.zip

Kannan R [Syncfusion]
Replied On September 7, 2017 08:31 AM

Hi Ronak,  
  
Yes, we have checked the reason for this reported exception from various technical sites. Based on the information we found, the reported problem mostly occurs when trying to access the disposed items. Since it is not happening in the sample provided in our side, please confirm if you are accessing disposed items in your modified sample project.    
  
Also refer to the MSDN Forum link for further reference, and if this does not help, please send us the issue reproducing modified sample to check and provide a prompt solution at the earliest.    
  
Regards,   
Kannan   


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;