Thursday 15 July 2010

c# - StackPanel - Confine to the width of the parent ListBox -


I have a listbox that I want to do within the layout items. I am struggling to get a stackpanel, only parents as detailed objects. That is, there is a text block in my list, which can contain a lot of information, and I want to wrap or trim it based on the parent's width (which is not yet scheduled).

The list box item is a datatymelet, however for the purposes of this post I have copied it as a list box inside the listbox.

This is all within one page. & lt; Grid & gt; & Lt; List Box Name = "ListBox ManagementMedia" Horizontal Connection Alignment = "Statch" Margin = "10,52,10,41" Scrollwire. VerticalScrollBarVility = "Visual" & gt; & Lt; ListBoxItem Height = "70" name = "ListBoxItem" Preview MouseDown = "ListBoxItem_OnMouseDown" & gt; & Lt; StackPanel Height = "65" Orientation = "Horizontal" & gt; & Lt; StackPanel name = "Video dimension 2" height = "65" width = "102" /> & Lt; StackPanel name = "VideoData 2" horizontal alignment = "statch" height = "65" & gt; & Lt; Text block text = "title" font vect = "bold" fontism = "18" & gt; & Lt; / TextBlock & gt; & Lt; TextBlock TextTrimming = "None" Text = "I'm about to describe longstanding description issues about long test lessons about nothing or nothing. I want the test text to be something or something. Can be taught about something, I "wrap it up" TextWrapping = "wrap" FontSize = "13" margin = "0,0,0,0" /> gt; & lt; StackPanel Orientation = "horizontal" & gt; ; & Lt; TextBlock Text = "Cat" font seices = "12" fontTitle = "Italic" /> & lt; boundary width I = "50"> & Lt; / stackPanel & gt; / ListBoxItem & gt; & lt; / ListBox & gt; & lt; / grid & gt;

How can I get a long with a long text, can only be as broad as list of tabs? (Which 'engages' on the right edges of the page)

I have already answered this without success , And many others like it.

Edit:

Even here That even my long text page closes as a grid. What am I doing wrong here? List "& gt; Grid height =" 65 "margin =" 0,0,0,0 "> gt; Grid.ColumnDefinitions & gt; & lt; Column Definition Width = "50 *" /> Definition Width = "3 *" /> & lt; /Grid.ColumnDefinitions> & Lt; Grid.RowDefinitions & gt; RowDefinition Height = "23" & gt; & Rt; / RowDefinition & gt; Rodefinition Height = "23" /> & lt; RowDefinition Height = "19 "/> & Lt; /Grid.RowDefinitions>online; TextBlock Grid.Column =" 1 "grid.Row =" 0 "Text =" Title "FontWeight =" Bold "FontSize =" 18 "& gt; Lt; / TextBlock>
TextBlock Grid.Column = "Grid". Row = "1" DockPanel.Dock = "Top" TextTrimming = "CharacterElipsis" Text = "Perpendicular I am able to display long description details about the test text from time to time or nothing. I want to write this test text about something or something, which I have highlighted the issues I've been told for a long time. I call it "TextWrapping =" NoWrap "FontSize =" 13 "margin =" 0,0,0,0 "> gt; StackPlanel Grid.column =" 1 "grid.Row =" 2 "Dock Panel.DOC = "Top" orientation = "horizontal"> & lt; border width = "50"> class = "1" width = "{binding real-world,

  & gt; text block grid.column =" 1 " L Dmitry = Listbox ManagementMedia} "Grid.Row =" 1 "Dock Panel.Doc =" Top "TextTerming =" Character Types "Text =" Long-Term Test Text, Nothing or Anything that Displays Long-Term Issues I have to show some or some of the test text to prevent issues described in this long time. I want it to be "TextWrapping =" NoWrap "FontSize =" 13 "margin =" 0,0,0,0 "/>   

if you want TextBlock to take its parent's width For this, you can tie the width like the above, but make sure that its parents say that its width is defined in this case. Similarly, for height, height = {binding is actual Hi, element name = listbox Managed Media}

No comments:

Post a Comment