Posted 15 years ago
by wpf.acp
Version: 9.1.0507
Platform: .NET 3.5
Environment: Windows Vista (32-bit)
I have found this forum post with a similar issue but I am unsure of its status.
It appears as if IsReadOnly property of a ribbon ComboBox has no effect. I have created a sample to reproduce this issue. I would expect IsReadOnly to allow drop list to be displayed but prevent SelectedItem from changing.
It appears as if IsReadOnly property of a ribbon ComboBox has no effect. I have created a sample to reproduce this issue. I would expect IsReadOnly to allow drop list to be displayed but prevent SelectedItem from changing.
<Ribbon:RibbonWindow x:Class="RibbonComboxReadOnlyProblem.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Ribbon="clr-namespace:ActiproSoftware.Windows.Controls.Ribbon;assembly=ActiproSoftware.Ribbon.Wpf30"
xmlns:System="clr-namespace:System;assembly=mscorlib"
xmlns:ribbon="clr-namespace:ActiproSoftware.Windows.Controls.Ribbon.Controls;assembly=ActiproSoftware.Ribbon.Wpf30"
Title="Window1"
Height="600"
Width="800">
<Ribbon:Ribbon>
<Ribbon:Ribbon.Tabs>
<ribbon:Tab Label="Test">
<ribbon:Group Label="Test">
<ribbon:StackPanel ItemVariantBehavior="MediumThenSmallWhenSmall">
<ribbon:ComboBox Width="150"
SelectedIndex="0"
SelectedItem="{Binding Text,ElementName=name,Mode=OneWayToSource}"
IsReadOnly="{Binding IsChecked,ElementName=checkbox}">
<ribbon:ComboBox.Items>
<System:String>#1</System:String>
<System:String>#2</System:String>
<System:String>#3</System:String>
</ribbon:ComboBox.Items>
</ribbon:ComboBox>
<ribbon:CheckBox Label="IsReadOnly"
x:Name="checkbox" />
<ribbon:TextBox x:Name="name"
Width="150"/>
</ribbon:StackPanel>
</ribbon:Group>
</ribbon:Tab>
</Ribbon:Ribbon.Tabs>
</Ribbon:Ribbon>
</Ribbon:RibbonWindow>