This is a migrated thread and some comments may be shown as answers.

IsEnabled property not inheriting parent control value

1 Answer 126 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 03 Nov 2010, 02:08 AM
I have a RadComboBox in a UserControl.
When I set the UserControl IsEnabled to false the combo box is still enabled.

Here's my XAML:

<cc:DesignTimeSafeControl x:Class="CustomControls.VendorCombo"
                          xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                        xmlns:cc="clr-namespace:CustomControls"
                          IsEnabled="False"
                        mc:Ignorable="d" Loaded="UserControl_Loaded">

    <telerik:RadComboBox x:Name="VendorsBox" DisplayMemberPath="Name" SelectionChanged="VendorsBox_SelectionChanged" />
</cc:DesignTimeSafeControl>

DesignTimeSafeControl is derived from UserControl and simply adds a IsDesignTime property.  It contains no other code.

If I put the IsEnabled onto the RadComboBox tag, it works fine.
I'm doing it this way because I want to set the IsEnabled on the UserControl's parent form.
Am I doing something wrong here?

Thank you
Michael Stone

1 Answer, 1 is accepted

Sort by
0
Accepted
Konstantina
Telerik team
answered on 05 Nov 2010, 10:33 AM
Hi Michael,

Thank you for contacting us.

I can suggest you to bind the IsEnabled property of the ComboBox to the UserControl. In that way when you set the IsEnabled property of the UserControl, it will be also set to the ComboBox.

Hope this information helps. If you have further questions please let us know.

Best wishes,
Konstantina
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ComboBox
Asked by
Michael
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or