ComboBox Style Incorrect

Ribbon for WPF Forum

Posted 14 years ago by Andy Ver Murlen
Version: 10.1.0523
Platform: .NET 4.0
Environment: Windows 7 (32-bit)
Avatar
When using the ribbon combo box, if the IsEditable attribute is set to true, then the combobox does not properly render when IsEnabled is set to false. Under these conditions, the combobox still appears to be enabled, which is not consistent with a combobox that is not set as editable.

Consider the following. In the first combobox, "I am greyed out" will be appropriately greyed out, however in the second combobox, "I appear enabled" appears normal.

<ribbon:RibbonWindow 
    x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:ribbon="http://schemas.actiprosoftware.com/winfx/xaml/ribbon"
    Title="Window1" 
    Height="300" 
    Width="300"
    >
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <ribbon:ComboBox
            Margin="3"
            IsEnabled="False"
            >
            <ComboBoxItem IsSelected="True">I am greyed out</ComboBoxItem>
        </ribbon:ComboBox>

        <ribbon:ComboBox
            Margin="3"
            Grid.Row="1"
            IsEnabled="False"
            IsEditable="True"
            Text="I appear enabled"
            />
    </Grid>
</ribbon:RibbonWindow>
[Modified at 07/06/2010 11:52 AM]

[Modified at 07/06/2010 12:59 PM]

Comments (3)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Andy,

Are you sure you have the latest build? When I ran your window it looked correct to me (disabled-looking).


Actipro Software Support

Posted 14 years ago by Andy Ver Murlen
Avatar
I ran my test window again, and it looked correct, and it had me scratching my head. Then I remembered that in my original test app that I whipped up for you, I had 2 lines that I took out, deeming them unnecessary. Turns out they were very relevant.

Add the following to the opening window tag...

http://schemas.actiprosoftware.com/winfx/xaml/ribbon
themes:ThemeManager.Theme="Office2007Black"
It appears it is when using a theme (any theme) that the issue becomes apparent.

Thanks
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Andy,

That did the trick. I've found the problem and fixed it for the next version.


Actipro Software Support

The latest build of this product (v24.1.3) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.