Margin on all content pages in Template10 XAML - xaml

I am using Template10 with the Hamburger starting project template. I'd like to have a margin between the hamburger area on the left and all content. I tried changing the shared Shell.xaml page (by adding a margin, etc.) but couldn't figure out the best way to sort it out. Conceptually, that makes sense, but it's the specific detail of how to make it work that I'm missing.
Is there an easy way to do it without changing each content page?
Regarding the questions in the comments: I want it in the closed case of a wide view; the question doesn't make any sense in any other case.  As far as what I tried, it doesn't really ultimately matter, since none of what I tried worked - I'm asking what the right way is to do it, which I never figured out.
Here's what the default looks like, without a margin:
Here's what it looks like with a margin added to the content area, which is also how the sample template contents handle this:
I don't want to have to mark up every content page with left margins to get the offset in the second picture.
  1: https://i.stack.imgur.com/jUIuO.png

Okay, now I have enough information. You have a few options here. The first is just bite the bullet like the rest of the developer community and format your pages like normal. But if you simply must, you can create an implicit Page style with a setter setting Margin="16,16,16,16" but, listen, and I am not kidding, you will ultimately regret it unless your app is super-simple. The biggest problem will be the spacing will be OUTSIDE the containing ScrollViewer.
Thanks for using Template 10.

Related

What's the ideal size of a Vue component?

I find the concept of atoms and molecules very interesting, but I can't imagin ending up with thousands of atom components, scattered all over the place. Another way of putting the question would be: when is a Vue component getting too big ? Thank you for your input.
Well it depends of a lot things, but if you see the code you're writing will be re-use more than twice i guess, it's a good idea to make as a component.
Additionnally you could think of the fact of clarity, if you're having a lot of html in your component, for readability purpose you could split this component in few pieces.
For example this component i've made, it's a Job offer,
in the blue rectangle we have the acronym of the company hiring
in the dark gray rectangle, the percentage of the the job,
a button to toggle the "card" and show the full job content,
a title of the offer and the deadline for the postulation.
When it's closed
Then when it's toggled
It was kind of a lot of html in the code so beside aving a Job offer component with everything in it, i've splitted it for readibility,
In total there is 5 component inside JobOffers
A button that i re-use everywhere in my website
The JobAcronym (blue rectangle)
The JobMeta (title + deadline + button), the middle of it
The JobPercentage (dark gray rectangle)
The JobContent, (arichtext component),visible when its toggled
Doing so, it could easily be more readable in my code, people knew which part was represented by what just reading the code.
For sure it creates more atoms and molecules, but if you create a directory named JobOffer and you put all your components required intside (appart from the button that is kind of global), it doesn't make your application difficult to read.
Even some component doesn't have a logic behind, like the JobAcronym and JobPercentage, they do contains a lot of html that could make your JobOffer component hard to read if they were inside of it.
To conclude, you really need to choose with your guts, if you see you're having trouble finding where to apply your edit to change some ui, beceause there is a lot of html code, then split it.Even if you won't re-use that component anywhere else.
What's important is the readability of your code, and it's really more easier to maintain.
So when you, or someone else come back in few months to do some updates on it, they won't loose time trying to guess which part belongs where.
I hope it answered your question and cleared some doubts you had :)

Layout messed up when using AdmPanel in TYPO3

When I active AdmPanel and trying to use the edit functions like >Display edit icons< and/or >Display edit panels< the layout messes up. The Edit Icons are huge shown all over the entire page.
Back in the days there was bug that the CSS wasn't included, but that's not the case. adminpanel.css is present. But beside it looks like all the elements doesn't have any css definition at all.
I couldn't find anyone experiencing the same issue and also tried other installation, but it's everywhere the same. Does anyone have an idea what am I missing here?

Aurelia: router without losing state

Here is my problem:
I typically have a paginated datagrid with a lot of rows. I want to be able to edit the data for each row of course but I have 2 constraints on this:
I need the edition form to replace the content of the page (I don't want a popup, modal dialog or side panel)
I don't want to lose the state of the datagrid: maybe I navigated down 5 pages in the datagrid and I don't want to be reloaded on the first page. And actually, I'd rather not reload the data I already had (the edited data will be updated automatically by my persistence layer anyway).
Ideally, I would have liked to have some kind of subrouter but I'm not sure how it would fit the first requirement. Otherwise, I could have a component that would be hidden by default and positions itself on top of the datagrid view when necessary but that feels quite hacky and forces me to have everything in the same template. And I will have to handle a stack of these components if I have several different 'full-screen panel'...
Any idea on a correct way to implement this?
Thanks!
I tried different solutions to no avail unfortunately. I had a long discussion with #Kukks on gitter and we agreed that using subrouters and viewports might be a bit overkill for my use case.
I reverted to my original idea of using absolutely positioned components to hide the previous one in a kind of "deck layout". This is not ideal as I would have liked completely separated views and using components forces me to declare them in the main view but it works well and is very easy to implement...
So: not as clean as I would have liked but much easier to implement and less convoluted.
Consider using Router View Ports
http://aurelia.io/hub.html#/doc/article/aurelia/router/latest/router-configuration/9

bootstrap switch without text-label

I wanted to use bootstrap switch without having the white space (data-text-label) between both data-on-label and data-off-label options. And I could probably sort this out but I must move on to other stuff due to dead-lines for the project i'm working on.
I would apreciate a lot if anyone knows how to achive this and shares it whith me.
I am pulling the answer out of your question and putting it here to help future visitors.
This can be accomplished with a few changes to the switch CSS
label width:0 the main child div width:200% and the options spans with width:50%.

Listview column header names, stackable?

I'm just curious as to if the column names are stackable on top of each other, in other words:
ORIGINAL
|test|testing test1|testing test32|test3|
NEW
|test|testing|testing|test
test1 test32
I know it's possible to do in a gridview but I like to stay away from them when i have the chance. I've currently got around 10 columns and would love to not have to implement a horizontal scroll bar if I don't have to.
It is not possible with the default ListView,
I found another post where Grammarian shared a link to a custom listview control you could use for your purposes. As i look thru the screenshots it might fit into your requirements, check it out :
http://www.codeproject.com/Articles/16009/A-Much-Easier-to-Use-ListView
The post i got it from is :
https://stackoverflow.com/questions/2461601/setting-height-of-listview-row
Good Luck !