固定添豪雅对SL3&放EditableComboBox;最新的SL工具包 [英] Fixing Tim Heuer's EditableComboBox for SL3 & latest SL Toolkit

查看:107
本文介绍了固定添豪雅对SL3&放EditableComboBox;最新的SL工具包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是蒂姆·豪雅的风格,从这里得到一个可编辑的组合框:
http://timheuer.com/blog/archive/2008/11/05/silverlight-editable-combobox-using-styles.aspx

I'm using Tim Heuer's style to get an editable combo box from here: http://timheuer.com/blog/archive/2008/11/05/silverlight-editable-combobox-using-styles.aspx

这是在我的项目大约Silverlight工具包的previous发行运作良好。不幸的是,尝试使用这种风格SL3 RTM和最新的SL工具包不起作用。我怀疑问题与此有关:重大更改:将DropDownToggle式的模板部件切换按钮已被删除。我不知道如何解决它得到下拉部分重新工作,任何想法?

This is working well in my project circa the previous release of the Silverlight Toolkit. Unfortunately, attempting to use this style with SL3 RTM and the latest SL Toolkit doesn't work. I suspect that the problem has to do with this: "Breaking Change: The "DropDownToggle" template part of type ToggleButton has been removed." I'm not sure how to fix it to get the drop down part to work again, any ideas?

推荐答案

对于我现在的工作。我在EditableComboStyle模板添加了此行来切换按钮声明:

For me it works now. I added this line to ToggleButton declaration in EditableComboStyle template:

IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsDropDownOpen, Mode=TwoWay}"

在同一EditableComboStyle模板名称=选择像杰夫说:

另外要列表框名称更改为x是很重要的。然后,控制被用作

Also it is important to change the ListBox name to x:Name="Selector" in the same EditableComboStyle template like Jeff said. Then the control is used as:

<toolkit:AutoCompleteBox MinimumPrefixLength="0" 
                                 MinimumPopulateDelay="200" 
                                 x:Name="editableCombo"
                                 Style="{StaticResource EditableComboStyle}"
                                 Text="{Binding MyProperty, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnExceptions=True}" />

但不幸的是,当所需的可编辑的ComboBox的行为作品,出现的其他问题:

But unfortunately when the desired editable combobox behavior works, other issues appears:


  1. 我有对的toogle按钮直接结合,当用户点击的问题被选中的文本或书面的任何项目之前,这会造成直接的验证。

  1. I have problem with immediate binding when user click on toogle button which causes immediate validation before any item is selected or text written.

用户必须preSS标签两次转会到其他控制。

User have to press tab twice for move to other control.

这篇关于固定添豪雅对SL3&放EditableComboBox;最新的SL工具包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆