I need to display a list of radio button elements, for that I did is created a rad panel, inside the rad panel I added a WrapLayoutpanel, Inside that I added the list of RadRadioButtonElement, The problem I am facing is if the court of the RadRadioButtonElement increases the text are truncated, It works in bigger resolution but not in smaller one, I kind of figure out if the width of the RadRadioButtonElement is greater than the text are not rendered right.
Sample code
Private _WindowsControl As Control
Private _RadioButtonPanel As RadElement
Public Overrides Sub SetupUIElements()
Me.TitlePanel.Margin = New Padding(0, 0, 0, 5)
Dim minSize As New Size(50, 50)
Dim radPanel = New RadPanel() With
{
.AutoSize = True,
.MinimumSize = minSize
}
radPanel.PanelElement.PanelBorder.Visibility = ElementVisibility.Collapsed
Me.Controls.Add(radPanel)
_RadioButtonPanel = New WrapLayoutPanel() With
{
.AutoSize = True,
.AutoSizeMode = RadAutoSizeMode.WrapAroundChildren,
.Orientation = Orientation.Vertical,
.StretchHorizontally = False,
.StretchVertically = False
}
radPanel.RootElement.Children.Add(_RadioButtonPanel)
_WindowsControl = radPanel
For Each attrValue As StudyAttributeValue In Attribute.Values
Dim radioButton = New RadRadioButtonElement() With
{
.Padding = New Padding(20, 0, 0, 0),
.Text = attrValue.Description,
.IsChecked = attrValue.Selected,
.AutoSize = True
}
AddHandler radioButton.Click, AddressOf ValueChangedEventHandler
_RadioButtonPanel.Children.Add(radioButton)
Next
End Sub
Private Sub Parent_SizeChanged(sender As Object, e As EventArgs)
Dim parent As Control = DirectCast(sender, Control)
If _WindowsControl IsNot Nothing Then
Dim minSize = parent.Size
minSize.Height -= TitlePanel.Size.Height
minSize -= New Size(100, 100)
_WindowsControl.MinimumSize = minSize
End If
End Sub
This is an issue in production, and I need help resolving this, Please advise
Thanks