I have control , which has navigation buttons . Please tell me how to navigate from a user control on the page.(The project with UserControl is separate from the project with pages).
I tried to use:
Frame.Navigate(typeof(SecondPage));
But project can have only one relationship.
Both Worked for me, to navigate from UserControl to Page:
1.
(Window.Current.Content as Frame).Navigate(typeof(MyUserControl));
2.
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => (Window.Current.Content as Frame).Navigate(typeof(MyUserControl)));
Related
How to put About us and fedback dialog in wp8 application. I want the user to click on an icon and see the about us descrption and able to give feedback also.
For review =>
MarketplaceReviewTask marketplaceReviewTask = new MarketplaceReviewTask();
marketplaceReviewTask.Show();
For the about page, create basic page and put what do you want in.
I need some help on a Windows Phone 8 app I am currently working on.
On the left side, I want a menu, if I click an item, I need to land on the corresponding page.
When the app opens, I see this menu and a bit of the next page.
I can switch between the menu and the full page with a button in the corner.
So far, so good.. I was able to build this and code a news page on the right to test this.
But then.. if I need to load another page, I'm in trouble, because my design at this moment
is a single XAML page that scrolls.
My question is this: Is there a way to load a XAML page in another XAML page?
Will this work with bindings?
Another option would be to put all the XAML for all menu items in place and only show
the things I need for a certain menu item (that feels quite wrong).
Or am I totally missing something?
All help would be very much appreciated, as I'm a new to developing for Windows Phone.
I added a simple drawing, which I hope can explain what I'm trying to.
You can add controls in c#.
namespace MyNamespace
{
public partial class SomePage: PhoneApplicationPage
{
public SomePage()
{
InitializeComponent();
LayoutRoot.Children.Add(new TextBlock()
{
Name = "MyTextBlock",
Text = App.ViewModel.Item[0].SomeProperty
});
}
}
}
I am working on my first Win 8.1 Store app and have some trouble understanding the SettingsFlyout.
Thanky to the docs creating Flyouts for my custom settings and adding them to the Settings Charm is not a problem.
However I have not been able to find out how navigate within the Flyout. I would like to create the following behavior as it can be seen in the Mail App:
Swipe from the right to show charms
Click on "Settings" to show the settings pane
Click on Account to show the "Accounts List Flyout"
On the "Accounts List Flyout" click on an account show its settings
The settings of the selected account are shown within the Flyout
Using the Back button brings you back to the accounts list
Steps 1-3 are no problem. But how do I manage the other steps? How can I navigate one lever deeper into the settings and use the Back button to go up again?
For Step 5 you can do something like
var newFlyout = new AccountFlyout(id);
newFlyout.ShowIndependent();
Now you are done with Step 5.
In the AccountFlyout.xaml.cs file hook on the BackClick event (in constructor) and then do something like:
void OnAccountFlyoutBackClick(object sender, BackClickEventArgs e)
{
// go back to the accounts list
var listFlyout = new AccountsListFlyout();
listFlyout.Show();
}
Clicking the Back button being on an Account will now go 'back' to the Accounts List flyout.
Yes, this is not very 'MVVM' friendly (if you perform the navigation in the VM you must know about the Flyouts and if you do it in the 'code-behind' you are not 100% MVVM conform) but it gets the job done without creating unnecessary complexity :)
I have created login screen using settings flyout control in Windows 8.1 store app. I need to navigate to Mainpage.xaml in case user successfully entered the login credentials.
How can handle parent Frame navigation from Settings Flyout.
Thanks in Advance.
You can hide the SettingsFlyout and Navigate to the MainPage using Frame Navigation, after the required validation.
[C#]:
new SettingsFlyout().Hide();
this.Hide();
(Window.Current.Content as Frame).Navigate(typeof(MainPage));
Guidance is not to preform navigation from a SettingsFlyout (see “Inappropriate Use of Settings” section). Generally, a Popup is a better option for a login dialog and a popup would allow you to easily navigate to the main page.
I try to add context menu item to my hosted app. When i add code like this, context menu appears in all pages:
chrome.contextMenus.create({
'title' : 'reload image',
'contexts' : ['image'],
'onclick' : function(info, tab) {
}, 'documentUrlPatterns' : ['<all_urls>']
});
But this item is not displayed in my app. When i change documentUrlPattern to:
['chrome-extension://extensionId/*']
Nothing happens. How can i add context menu item to my hosted app's local page?
You cannot inject context menu in any extension page. That is unfortunately limitation. The engineers state it is a security limitation. A search in crbug.com can give you some ideas why.