Hi All,
I'm wondering is there any property such as MaxWidthProperty when you press the drop down menu?because what's happening is when the user is scrolling through the drop down, the size is changing while you are scrolling based on the size of the item. I would like to make it fixed. I've tried to use ItemsPanelProperty but it was unsuccessful. I really need to setup the style from the code behind since my column is generated dynamically
And this is how i do it from code behind
Cheers
I'm wondering is there any property such as MaxWidthProperty when you press the drop down menu?because what's happening is when the user is scrolling through the drop down, the size is changing while you are scrolling based on the size of the item. I would like to make it fixed. I've tried to use ItemsPanelProperty but it was unsuccessful. I really need to setup the style from the code behind since my column is generated dynamically
<
UserControl.Resources
>
<
ItemsPanelTemplate
x:Key
=
"BusinessLookUpTemplate"
>
<
StackPanel
Orientation
=
"Vertical"
MinWidth
=
"100"
MaxWidth
=
"100"
/>
</
ItemsPanelTemplate
>
</
UserControl.Resources
>
And this is how i do it from code behind
Dim
colBusinessSource
As
GridViewComboBoxColumn =
CType
(dgResults.Columns(e.Result.ColumnName), GridViewComboBoxColumn)
colBusinessSource.CellStyle =
New
Style()
With
{.TargetType =
GetType
(RadComboBox)}
colBusinessSource.CellStye.Setters.Add(
New
Setter(RadComboBox.ItemsPanelProperty,
CType
(Resources(
"BusinessLookUpTemplate"
), ItemsPanelTemplate)))
Cheers