Windows Phone creates a sidebar menu such as facebook

I am new to developing Windows Phone 7 trying to create a sidebar menu like Facebook

I created one user control and placed several buttons for different screens as well as the PhoneApplicationPage box and put button, when I click on this button, try to exit the upper right, like a menu.

show on the right side, and if you click this top right button again, which you want to hide, if anyone has an idea about this, please share the code or examples

Thanks.

+6
source share
4 answers

I just wrote a complete solution for you ... and you need visual states! http://depblog.weblogs.us/2013/07/22/facebook-like-settings-pane-windows-phone/

+9
source

Check out SlideView , described as "... a navigation box based on the official Facebook application on Windows Phone." https://slideview.codeplex.com/

Edit After you installed SlideView via nuget install-package SlideView

Create a UserControl that will be the SlideView you want, say, LeftView.xaml. You can create another user control for the other side, say RightView.xaml

Then, in your App.xaml file, define SlideView as a resource,

 xmlns:slideView="using:SlideView.Library" xmlns:views="using:SideNav.Views" xmlns:local="using:SideNav"> <Application.Resources> <slideView:SlideApplicationFrame Header="SlideView" Background="White" x:Key="RootFrame" > <slideView:SlideApplicationFrame.LeftContent> <views:LeftView/> </slideView:SlideApplicationFrame.LeftContent> <slideView:SlideApplicationFrame.RightContent> <views:RightView/> </slideView:SlideApplicationFrame.RightContent> </slideView:SlideApplicationFrame> </Application.Resources> 

After that, edit your App.xaml.cs to change the default RootFrame and OnLaunchedMethod

 public sealed partial class App : Application { private TransitionCollection transitions; public static SlideApplicationFrame RootFrame { get; private set; } protected override void OnLaunched(LaunchActivatedEventArgs e) { RootFrame = Window.Current.Content as SlideApplicationFrame; // Do not repeat app initialization when the Window already has content, // just ensure that the window is active if (RootFrame == null) { // Create a Frame to act as the navigation context and navigate to the first page RootFrame = this.Resources["RootFrame"] as SlideApplicationFrame; // TODO: change this value to a cache size that is appropriate for your application RootFrame.CacheSize = 1; // Set the default language RootFrame.Language = Windows.Globalization.ApplicationLanguages.Languages[0]; if (e.PreviousExecutionState == ApplicationExecutionState.Terminated) { // TODO: Load state from previously suspended application } // Place the frame in the current Window Window.Current.Content = RootFrame; } if (RootFrame.Content == null) { // Removes the turnstile navigation for startup. if (RootFrame.ContentTransitions != null) { this.transitions = new TransitionCollection(); foreach (var c in RootFrame.ContentTransitions) { this.transitions.Add(c); } } RootFrame.ContentTransitions = null; RootFrame.Navigated += this.RootFrame_FirstNavigated; // When the navigation stack isn't restored navigate to the first page, // configuring the new page by passing required information as a navigation // parameter if (!RootFrame.Navigate(typeof(MainPage), e.Arguments)) { throw new Exception("Failed to create initial page"); } } // Ensure the current window is active Window.Current.Activate(); } } 

That should work. Just add content to Rightview.xaml and LeftView.xaml. For some reason, my WindowsPhone 8.1 xaml crashed when I started it. But it worked when I used the Zumicts Slide Slide widget, which is available here as a nuget package.

 Install-Package SlideView.Library.WP81.Zumicts 

Has anyone experienced the same issue?

+1
source

Well, there is no easy way to do this, like iOS. But you can use Visual State Manager .

Basically, create a larger screen than your scene. Then you need to create a state that moves the screen a little on the stage, and you can use the button. You need to call the state by pressing a button using the click method.

PS: Do not use the storyboard. Use the States, this is the easiest way to do this.

0
source

try the sidebar menu, for example facebook, also with gesture support. try the link below.

http://developer.nokia.com/community/wiki/Control_animation_while_navigating_between_panes_inside_a_Windows_Phone_page

0
source

All Articles