Is there a way to automatically change the selected menu page in a master detail project when the detail changes? - xaml

Background:
My project uses the "Master Detail" project from Xamarin.Forms, so it comes equipped with the hamburger menu button in the top left which is supposed to be the main source of navigation throughout the app. However, my app requires the user to go through multiple of those screens without the use of the hamburger menu. But when a user uses my own buttons to change the detail, the hamburger menu still says the user is on the previous page.
For example, a user is on Page A. They click a button outside of the menu which sends them to Page B. The menu will still show Page A.
My Attempt:
I really didn't know where to start, so I tried taking the MenuItemType and passing it through the following function:
// This changes the screen without changing the menu and it works.
((MasterDetailPage)Application.Current.MainPage).Detail = new NavigationPage(new PageB());
// This was my attempt to change the menu.
(Application.Current.MainPage as MenuPage).RootPage.NavigateFromMenu((id)MenuItemType.PageB);
But that returned a Null Reference Exception when run.
I've also tried manually calling the list view associated with the hamburger menu and changing the selectedItem property, but that didn't work either. Is there any way to change the selected menu?
For Clarity:
Since StackOverflow won't let me post a video, here's a link to how the app acts. As you can see, I use the Menu to go to the "About" Page. I click a button on the screen which takes me back to the "Browse" Page. However, when I open the menu, it still says "About" is selected. I can't reselect "About" until the menu moves away, meaning I have to reopen "Browse" despite already being on that screen.
What I'm looking for is a function which will automatically change the selected menu item to "Browse" when I press that button on the "About" Page. The app is currently using a Master Detail Page which has the "Detail" component changing from the About Page to the Browse Page. The menu page is a Content Page which came built with the app beforehand.

Related

Finding it difficult in Qt creator to create a button to navigate pages.#qt5

help me in creating a button in Qt where the button navigate the user to a specific page and also the button is highlighted when the user is navigated to the specific page

I am having trouble while clicking a "Submit An App" button on my application which is present on the Menu bar

I am using the below code for this, this is present inside a frame and this also clicks the button but after button is clicked the control is lost. The possible reason i see is the page lands on same page which extra options after the "Submit An App" button is clicked.
I am using c# to code it. The first line finds the button the second line clicks but go for a timeout. I have seen this behavior fist time not sure how to work it out.
IWebElement field = VelocityDriver.FindElement(By.Id("AppSub"));
SeleniumExtensions.ClickElementAndContinue(field);

Making a VB form noninteractive in the background

I want my current "home form" to stay in the background when I click on a button which in turn opens another form on top of it.
I want something like this:
Home -> Click Button -> open new form -> New form becomes the focus of the app
-> Home form stays in the background
The home form should still be there, but I can't click on it or anything. When I click on the app, only the new form opened should be interactive.
If I understand correctly, you can use Form.ShowDialog method to show the form as a modal dialog box.

Impossible to solve Sharepoint dropdown behavior

I am currently experiencing some very weird dropdown menu behavior in Sharepoint.
Summary of the issue
Dropdowns do not appear if I Ctrl+R to refresh the page. Dropdown items do appear if I click into the address bar and click enter. Also, if I make the page hit a breakpoint in developer tools while loading, the dropdown will work even when I hit Ctrl+R.
How to reproduce the issue:
Go to the website: http://www.jdaihelpdesk.org/default.aspx
Mouse over one of the menu items at the top, dropdown items will appear.
However, if you hit Ctrl+R to reload the page, when you mouse over one of the menu items, the dropdown will no longer appear.
Even weirder, if you open up developer tools and put a breakpoint on line 5 of the resource file titled http://www.jdaihelpdesk.org/ScriptResource.axd?d=mp6tevUL8oeNESOYJzVjF4zt3gpf2XdWLbE3BbLBQDYBVZVAQp00gRgopkUa1x9lC9s-iuzbDatvYvVbz7xnHLXzyr_vbt6Y91YZqrMVq_6N-PshJk3rZnu9fGlYq2Z8x9XfJo4ZhLF5WQffpPe1KcOEZvI1&t=2e2045e2
, hit Ctrl+R to refresh the page, after hitting continue, the menu item will work.
So it's like there's something to do with when resources are getting loaded or something but that's just a guess after hours of looking at this issue.
What's also weird to me is that hitting Ctrl+R will cause the dropdowns to not appear but clicking in the address bar and hitting Enter to load the page, the dropdowns will appear.
If anybody has any insights that would be awesome!

How to create a nice add button to list view like in the Weather app?

Following these steps:
Open the Weather app.
Right click
Click on places
See that little item with the + symbol? I want to do something exactly like that, the looks and behaviour.
Assuming you are just trying to get some basic ideas about metro-ui controls and you are on Release Preview.
When you do right click, the control that's being triggered is called App Bar. The "place" button is a App Bar Command. Clicking on the button will take you to another page (HTML or XAML). This page contains a ListView control with GridLayout. You can dynamically change the ListView Template and assign different actions to the itemInvoke event.
Here is a quick tutorial for App Bar and commands:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465309.aspx
Here is a quick tutorial for List View control:
http://msdn.microsoft.com/en-us/library/windows/apps/hh465496.aspx