I am creating an App in which I have a menu that will display on every page. The menu contains navigation to another page, so I can avoid repeating the same code on every page and in XAML. How can I change the view of a page without navigating to another page?
Xaml allows you to handle Frames, which are quite like html's iframes :
http://msdn.microsoft.com/fr-fr/library/cc838245(v=vs.95).aspx
some frameworks, like caliburn micro, ease the use of such frames.
Hey Dont know exactly What you want,but according to my understanding you can use Pivot and Panorama control.
This is the best control according to your requirement.
Here is the sample code and description.
http://code.msdn.microsoft.com/wpapps/PanoramaPivot-Sample-332a7e06
Related
I have 19 buttons on a page when I click on a button it opens a new page with a view, Every button has a different view. But the problem is that I don't want to create a new page for every button I want to simply create one view and navigate data of every button on that view page. Is there any approach that I can use in Xamarin Forms?
You can either use the ControlTemplate features in Xamarin.Forms. Take a look at the documentation here for more details.
Otherwise, you can write style for your view and use it using the Key wherever you want.
Xamarin has a clear documentation on Styling here.
I hope that helps.
I apologize if this is a simple question. I'm very new to XAML, and I'm trying to understand app development more.
Basically, I have a section on the bottom of the display reserved for a pop-up AppBar. From what I understand, this pops up on an edge swipe, but I'd like to use some sort of a call to bring it up. This way I can have various varieties of the AppBar pop-up when the situation calls for it.
How would I go about accomplishing this?
OR, is there another approach that might work better?
Thanks for your time!
The page has a BottomAppBar property (<Page.BottomAppBar>). Here you can enter a AppBar control and inside of it any XAML you want. Then you can show and hide anything through the Visiblity property from code. So - you can for example add two Gridcontrols in the AppBar and always display one of them.
If you're looking to create multiple AppBars for use on the same page, you'll have to do so in the code behind. See this link:
http://msdn.microsoft.com/en-us/library/windowsphone/develop/ff431786(v=vs.105).aspx
Once you've created them, set the IsVisible property to true/false to show/hide them.
I've got a ListView which contains, among other things, a WebView. When a ListViewItem on this list is selected, I'd like to bind HTML to the WebView via the NavigateToString method.
The WebView needs be in the bound list (as it's tied to a list of items), and must use NavigateToString (as the HTML content is coming from code, and is not on the web)
Is there anyway to do this? If so, what's the best way?
Of course, you can add an attached behavior using either an attached dependency property or a Behavior that you could bind a string to that will navigate to that string when the value changes (e.g. when it is first assigned).
The other problem could be though with how it performs. I would think of the WebView control as a browser window, so if you have a hundred items in your ListView you might not want to create a hundred IE windows for all of them. Even assuming you use the default VirtualizingStackPanel as the ItemsPanel of your ListView - this sounds like a source of many issues. I haven't tried that, so I might be wrong, but I would rather try parsing the html and formatting it for use in regular TextBlocks. For very basic html you could use the LinkedHtmlFragment extension of the WinRT XAML Toolkit with a RichTextBlock if all you have is plain text and links. For something more fancy you might need to do some coding yourself or use something like the HTML Agility Pack (though I am not sure if it supports WinRT yet).
I would like to change the listview template on a button click event. for example if your in edittemplate i would like to switch to ItemTemplate.
i am trying to do this because im writing my own custom update function for the list view. so after i successfully update the row, it doesn't switch back to the default view.
Rgds
Adrian
Adrian,
As you have tagged this as an asp.net question I would direct your attention to jquery (jquery.com). If you use a vanilla template (wrapping your elements in simple "div" tags) and use the jquery tools to do addClass/removeClass and toggleClass and apply various css styles to achieve the visual effect you desire you should be able to land just were you wish.
Using page methods you can leverage your custom update on a partial postback from jquery and reduce the server impact.
If you would rather do this server side you are probable looking to leverage the item databound event to set your template.
A more complete answer would require more information about what you are trying to accomplish.
Cheers,
CEC
i want to implement this
(this application is made in flex)type of application using silverlight, how can i do this? basically i want is to divide xaml page in 3 parts.., on tree view selection change right parts of page should change dynamically.
You could accomplish the loading of multiple xaml files by having multiple navigation frames on a page.
You should be more specific if you want to get answers that fit your needs.
One way to divide the page is using a dockpanel and you get the behaviour that you describe implementing the TreeView SelectedItemChanged event.
Hope hepls!
How to make items in a DockPanel expand to fit all available space in WPF?