Hy DevExpress Team,
we have one CheckEdit and one Button within a LayoutGroup. The Button "IsEnabled" Property is bound to the "IsChecked" Property from the CheckEdit-Control.
When we first collapse and then expand this LayoutGroup, we get the following exception:
"ArgumentException was unhandled.
Cannot set Expression. It is marked as 'NonShareable' and has already been used"
Code:
<lc:LayoutControl>
<lc:LayoutGroup
Header="LayoutGroup"
View="GroupBox"
IsCollapsible="True"
Orientation="Vertical">
<dxe:CheckEdit
HorizontalAlignment="Left"
VerticalAlignment="Top"
x:Name="_checkbox"
Content="Example Checkbox" />
<Button
Content="Button"
IsEnabled="{Binding IsChecked, ElementName=_checkbox}"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
/>
</lc:LayoutGroup>
</lc:LayoutControl>
Thanks Stefan