This question is locked. New answers and comments are not allowed.
Hi,
I'm adding a RadButtonElement to a RadListBoxItem and would like it to be right aligned, but can't seem to do it.
Here is my code. The button is there, but stays on the left side.
I'm adding a RadButtonElement to a RadListBoxItem and would like it to be right aligned, but can't seem to do it.
Here is my code. The button is there, but stays on the left side.
privatevoid lbConnections_ItemDataBound(object sender, Telerik.WinControls.UI.ItemDataBoundEventArgs e) |
{ |
RadListBoxItem listBoxItem = (RadListBoxItem)e.DataBoundItem; |
// Add button |
RadButtonElement btn = new RadButtonElement(); |
btn.Alignment = ContentAlignment.MiddleRight; |
btn.StretchHorizontally = false; |
btn.StretchVertically = false; |
btn.AutoSize = false; |
btn.Size = new Size(15, 15);; |
btn.Click += new EventHandler(btn_Click); |
listBoxItem.Children.Add(btn); |
} |