I have a medium sized project with around 50-100 ContentPages.
I've created an CustomContentPage class which inherits from ContentPage and I want to change all my content pages to CustomContentPage.
I can do a simple find and replace of ": ContentPage" to ": CustomContentPage", but having trouble with the XAML side, especially on the opening tags "<ContentPage"
Any tips on how to do this?
Related
I'd like to have a NavigationPage using xamarin forms (iOS and Android), with a footer (footer would be static when the pages move inside the NavigationPage), this footer is NOT a toolbar, I'd like it to be fuly customisable (StackPanel).
On a higher stand point, it means having a Page inside an other page.
I see several approachs, that all needs custom renderer :
Create a custom "ContentPage", with stacked in it a NavigationPage and a StackLayout for the footer...
Customize the NavigationPage itself to display the footer...
Something else ?
Is it even possible ? What would be the best approach ? Did someone succeded to do that ?
PS : I came acrosse this thread that almost achieve this : http://forums.xamarin.com/discussion/36897/put-a-page-inside-another-page#latest
Thx
This can definitely be done, but not by putting a ContentPage in a ContentPage. You never really want to have a ContentPage inside a ContentPage unless it's a Navigation/MasterDetail/Tabbed page, eg A ContentPage can go in TabbedPage. It might be possible but it's not standard probably come back to bite you in the future.
There's a few options:
Have the footer on every content page, you could do this via
inheritance which you could do with a Grid or other various layouts.
The good part about this is that you don't need a custom renderer
but it might not look the best when moving between pages.
Rethink you UI so you don't need to do it exactly this way, is there
an easier way to get the same affect but staying within the
Xamarin.Forms controls? - 'Dont fight the framework'.
Build a custom Navigation Renderer which has the view at the bottom with this you could have the footer be static between page transitions. But it wouldn't be as easy to implement as you would need a Custom Renderer, you would also need to know Xamarin.Forms, Xamarin.iOS and Xamarin.Android fairly well. *note you might also be able to do this with MessageCentre.
All those are possible, it's up to you in which to implement, depending on your personal time/knowledge/budget etc.
Thanks
I'm modifying a website, built with AngularJS, and in one page I have a WYSIWYG editor.
The whole widget that includes the editor, is a div that has 'ng-controller="TextsController"'.
In this div I have a button, clicking on it displays the editor. And the initializing of the editor happens in a directive - "richTextEditor".
So - I'm making a popup in this editor, that has to show some images from the server. I put the code for pulling the images in the controller ... and there I set
$http.get('/url/to/files').success(function(data) {
$scope.imagesFromServer = data;
});
and in the view I have
'ng-repeat="image in imagesFromServer"'
And the problem is that the ngRepeat doesn't see any items.
I have two ideas:
The view, containing the ngRepeat (the HTML for the editor, and the popup with the images as well) loads with AJAX, and at that very moment the scope variable is not set.
I'm initializing the scope variable in the wrong place. (Eventually has to be in the directive instead of the controller? ... but all examples I've seen and done so far - pull every data in the controller, and the view sees it directly.)
Hope I've described the situation clearly.
Thanks in advance.
I’m trying to display the menu title text (example “Home”) in the header area of my Joomla 2.5 website.
Joomla’s default (when activated) is to place it in the Component area.
I’m not sure the best way to accomplish this. By default Joomla wraps the menu title with an H1 tag but doesn’t wrap it with a div and class.
The ways I’ve thought might be best to do this are:
Somehow wrap all menu titles with a div and class so I could reposition them up into the header with css .
Add some php code to my template. Something like:
php
$menuTitle = $this->params->get(‘fieldNameOfMenuTitle’);
php
echo = $menuTitle;
Any ideas, suggestions, or answers would greatly appreciated
Thanks
Never found an exact answer but found a work around.
Used a modified version of the below demo/plug-in to create a custom field (named it: "Title that displays on the Web Page") in the articles menu. By default, the table that is created and displayed in the web page is in the component area and is wrapped in a w/ a class. Repositioned the with CSS up into the header/banner area.
http://docs.joomla.org/Adding_custom_fields_to_the_article_component
I am working on my first Windows 8 Metro app. I have worked a LOT with Silverlight and I am familiar with the Metro concepts. My challenge is, I know I want to create a "Section" page as defined here: http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh761500.aspx. Or, to put it another way, like the sample "Finance" app where "TODAY", "INDICES", "NEWS", etc. represent sections. But, I can't figure out how a "Section" page is defined in XAML.
I was expecting it to be similar to a tab control where each section is defined as a child of the parent control in the "Items" collection. However, I can't seem to find a solid example. Does anyone know an example they can point me to? Or a walkthrough online?
Thank you!
Try using a frame in your "master" page, and then adding other pages to that frame. A section in this paradigm is just a normal page. Most of the samples here in MSDN uses this type of design, with a master page displaying different sections, based on a selected item in a listview.
Context: I am building a portfolio index where I can sort the individual project links in my sidebar by priority of appearance. I've successfully done this using the wp_nav_menu(), where each project is represented by the text name, and then I can move each Page's priority of appearance. What I get is something like this:
I'd like to extend this feature by outputting the featured image associated with every individual project page so that it looks something like this:
Is this possible with the wp_nav_menu() call? If so, any clues on how to extend it further? Thanks!