IsEnabled property not inheriting parent control value

2 posts, 1 answers
  1. Michael
    Michael avatar
    4 posts
    Member since:
    Oct 2010

    Posted 02 Nov 2010 Link to this post

    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

  2. Answer
    Konstantina
    Admin
    Konstantina avatar
    2332 posts

    Posted 05 Nov 2010 Link to this post

    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
  3. DevCraft banner
Back to Top