LongListMultiSelector, items are clipped - windows-phone-8

In Windows Phone 8 have a LongListMultiSelector with a ItemTemplate that is a grid with 2 columns.
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
Each item has a TextBlock in the First Column and a Button in the Second Column
The problem is that when I run the application, the button in the second column gets cut. It appears clipped, so its rightmost border doesn't appear.
What's the problem here?
Thanks.

The most obvious solution would be overriding LongListMultiSelector's ItemContainerStyle and setting right padding and margins, but surprisingly this doesn't help. The workaround I came up with is to set right side margins on your elements inside each item (on Buttons in your case). Have you tried this?

Related

Material-ui 4.11.4 - Grid: items in column require container direction='row' to display correctly (??)

I want to have several div's in column, centered on the page axis and stretched in width as much as the div width allows it. I am using the <Grid> component (both container and item) of material-ui 4.11.4 (latest version):
In the previous image all Grid items have xs={12}, while "page body" has xs={10}.
I would expect that the following container would do the job:
<Grid container direction='column' justify='center' alignItems='stretch'>
....
</Grid>
However, if I want the effect shown in the previous image, I have to give the container a property direction='row'.
If I give direction='column', all grid items are aligned on the left side of the screen:
This seems wrong to me. I have also checked on the FlexyBoxes site, and it requires 'flex-direction:column':
What am I missing here? Why do I get a column ordering only if I specify direction='row'?
I had an issue like this a few months ago. Just add a <Grid item xs={1}/> above and below the Page Body grid item. Still you may find other solutions but this one should work fine.
I have opened this issue on github, which so far has gotten no comments.
I am systematically using direction='row' in this kind of column Grid's, which is weird but it works.

How can I create right-aligned items in the ui with Xamarin.Forms?

I try create this page with StackLayout and Grid, but I can't align rightы controls to right side. Maybe I should use RelativeLayout? But I don't know how align controls to right side
this is my page:
http://s9.postimg.org/z5ilck6hb/template.png
UPD.
I solved this problem by putting StackLayout with HorizontalOptions = LayoutOptions.EndAndExpand to each grid cell (in the right column)
If you want to align your controls to the right, try using
HorizontalOptions="EndAndExpand"
Using the grid control, you have more control over the alignment because you can create multiple columns (of varying width).
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100" />
<ColumnDefinition Width="100" />
<ColumnDefinition Width="80" />
</Grid.ColumnDefinitions>
You can find out more on My blog
Thanks.
-jesse
In your subsequent question about aligning the first column to the left and the second to the right, just use horizontal Alignment Start and End respectively (on your element (label) not on the grid).

float elements right and left independent size css

Just trying to do something like left and right floating, but independent of the height...
Here is my example the problem in this example 2 and 4 aren't near seems like have a space. Not sure how the best way to implement and without having issues in different browser (only was testing in chrome)
Thanks
Put the "float left" elements in one container, and the "float right" elements in another. Then float the containers instead of the elements.

Icon on left and Text on right HTML/CSS

I think this may sound pretty simple, but still I can not get it to work.
My design has different icons of same size and height and I need to display them one below another and at the same time I need to give a small description about the icon on the right side for every icon.
The text for every icon on the right side consists of two lines, the first line in bold(header) and the second line normal(description). The padding and margin is my call. But I need to display them in that way in my content.
you can simply left align your image and then devide 2 lines of your text with line break
<img src="image.jpg" style="float:left;" />
<strong>Header</strong><br />
<span>description</span>
this fiddle should set you in the right direction.
It basically floats both the <img> and <p>
Its not a finished artical, but it should point you in the right direction.
Check out this fiddle
Basically there is a container div with an unordered list inside it, each list item has a background image to the left and text to the right, no floats are used.

Centered elements separated by a line break don't align correctly in Firefox

I'm building a login box where all of the content is centered. I have a paragraph of text, two form fields stacked on top of each other, and a button. The form fields have the same width and I'm stacking them simply by putting a line break (<br />) between them.
Since the whole box has text-align: center; applied to it, you would think that the two form fields would line up exactly, right (one on top of the other with both edges aligned perfectly, since they're the same width)? However, in Firefox, the second form field is shifted over to the right by maybe 1 or 2 pixels.
What causes this? Does the line break itself take up a very small amount of space and therefore throw off the centering? If so, how do I prevent it?
First off, a line break does not create any spacing before or after content around it, so it is not the line break causing spacing issues. A full code sample would help but check the following because this does work and align them perfectly in firefox:
<div style="text-align: center;">
Some text<br />
<input type="text" style="width: 150px;"><br />
<input type="text" style="width: 150px;">
</div>
Check first the document type of your page. Be sure you're declaring it properly (xhtml given that you're closing your line break). Aside from that, given that I assue you line breaks aren't spacing things after them, you should try stripping your code down until you find the cause. You could have a non-breaking space before one of the input boxes ( see http://www.htmlbasictutor.ca/non-breaking-space.htm because i don't know how to make stackoverflow write that character), which would move it, or you could have some css giving one of them a margin. You could have a floated element above them that is encroaching on one and shifting it over.
If all else fails just put them in their own divs instead of using a line break. Wrapping something in a div will have the same effect. Also you can do clear: both; on the div to make sure nothing floated above it is affecting it.