31 using Microsoft.Xna.Framework;
33 using Microsoft.Xna.Framework.Graphics;
56 for (
int i = 0; i < Content.ItemCount; i++ )
57 Content[i].
Font = value;
64 public Color TextColor
66 get {
return _textColor; }
70 for (
int i = 0; i < Content.ItemCount; i++ )
71 Content[i].TextColor = value;
80 get {
return _hAlignment; }
84 for (
int i = 0; i < Content.ItemCount; i++ )
96 StringBuilder result =
new StringBuilder();
98 foreach ( var item
in Items )
100 result.Append( item ).Append(
"\n" );
103 return result.RemoveLast( 2 ).ToString();
108 throw new InvalidOperationException(
"You must set the list width before assigning text!" );
110 SpriteFont xnaFont = this.
Font.XnaFont;
111 Vector2 textDims = xnaFont.MeasureString( value );
113 string wrapped =
Font.
WrapText( value, softWidth, Width );
116 this.Bind( newList );
136 SizingByLayout =
false;
141 return new Label( item )
143 HorizontalSizing =
Sizing.Expanding,
145 Color = Color.Transparent,
147 TextColor = TextColor,
HorizontalAlignment
Asemointi vaakasuunnassa.
static readonly Color Black
Musta.
string WrapText(string text, double softLineWidth, double hardLineWidth)
Rivittää tekstin.
double CharacterWidth
Merkin leveys.
Sizing
Olion koon asettaminen asettelijan sisällä.
static readonly Font Default
OletusFontti.
Järjestetty lista merkkijonoja.