silverlight - WP7 ListBoxItem child does not stretch to parent width -


The following code works to pull the child grid inside ListBoxItem in Silverlight 3, but is not in Windows Phone 7 . What is this bug or am I doing something wrong? No matter what I put in ListBoxItem, this list never increases in the size of the box, just for the size of your content. My ultimate goal is to get the text to align left and right within the listbox item. In the process of trying to do this, I went on this issue.

Note: Horizontal content works fine for values ​​other than alignment segments.

  & lt; ListBox & gt; & Lt; ListBoxItem Horizontal ContentElement = "Stretch" & gt; & Lt; Grid & gt; & Lt; Grid.ColumnDefinitions & gt; & Lt; Column width = "0.5 *" /> & Lt; Column width = "0.5 *" /> & Lt; /Grid.ColumnDefinitions> & Lt; Grid.RowDefinitions & gt; & Lt; RowDefinition / & gt; & Lt; /Grid.RowDefinitions> & Lt; TextBlock Grid.Row = "0" grid. Column = "0" & ​​gt; Left text & lt; / TextBlock & gt; & Lt; Text block grid Rows = "0" grid. Column = "1" text alignment = "right" & gt; Correct Text & lt; / Textblocks & gt; & Lt; / Grid & gt; & Lt; / ListBoxItem & gt; & Lt; / ListBox & gt; Peter Torr refers to the current release (seems to mean beta is) and provides an alternative solution, obviously it has already been fixed in internal construction. 


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -