rizo​​ntalContentAlignment在Items

rizo​​ntalContentAlignment在Items

本文介绍了WPF Editable ComboBox Horizo​​ntalContentAlignment在ItemsControl问题中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ItemsControl中有一个具有iseditable属性为true的组合框.

我将组合框Horizo​​ntalContentAlignment设置为右".

下拉值显示在右侧.

但是选择之后,在左侧显示的值.

<

组合框 x : 名称 ="comboBoxCustomReadOnly"


              b ;

MinWidth ="150"


;

MaxWidth ="340"


              b ;

Horizo​​ntalAlignment =" Stretch"


              b ;

FlowDirection =&; { 绑定 路径 = Alignment}"


              b ;

AllowDrop =" True"


              b ;

DisplayMemberPath =" DisplayValue"


              b ;

GotFocus =" Field_GotFocus"


              b ;

IsEnabled =&; { 绑定 AreCorrectionFieldsEnabled }"


              b ;

IsReadOnly =" True"


              b ;

IsVisibleChanged =" Field_IsVisibleChanged"


              b ;

ItemsSource =&; { 绑定 路径 = CustomFieldValues}"


              b ;

SelectedValuePath =键"


              b ;

样式 =&; { DynamicResource SmallNormalTextStyle }"


              b ;

TabIndex ="32";>

请在这里帮助我.

解决方案


I have a combobox with iseditable property to true inside ItemsControl.

I set my combobox HorizontalContentAlignment to "Right".

The dropdown values are showing in right side.

But after selection the values shown in left side.

<

ComboBoxx:Name="comboBoxCustomReadOnly"


                        

MinWidth="150"


                        

MaxWidth="340"


                        

HorizontalAlignment="Stretch"


                        

FlowDirection="{BindingPath=Alignment}"


                        

AllowDrop="True"


                        

DisplayMemberPath="DisplayValue"


                        

GotFocus="Field_GotFocus"


                        

IsEnabled="{BindingAreCorrectionFieldsEnabled}"


                        

IsReadOnly="True"


                        

IsVisibleChanged="Field_IsVisibleChanged"


                        

ItemsSource="{BindingPath=CustomFieldValues}"


                        

SelectedValuePath="Key"


                        

Style="{DynamicResourceSmallNormalTextStyle}"


                        

TabIndex="32">

Please help me here.

解决方案


这篇关于WPF Editable ComboBox Horizo​​ntalContentAlignment在ItemsControl问题中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 05:15