2
下載並安裝擴展WPF工具包 - 2.1.0
添加引用
我可以看到對象資源管理器
我得到錯誤下方AutoSelectTextBox沒有找到。WPF擴展工具包入門
<Window x:Class="ComboBoxDynamic.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
Title="MainWindow" Height="350" Width="525">
<Grid>
<StackPanel>
<StackPanel.Resources>
<Style TargetType="{x:Type xctk:AutoSelectTextBox}">
<Setter Property="Margin" Value="5"/>
<Setter Property="AutoSelectBehavior" Value="{Binding SelectedItem, ElementName=_autoSelectBehavior}"/>
<Setter Property="AutoMoveFocus" Value="{Binding IsChecked, ElementName=_autoMoveFocus}"/>
</Style>
</StackPanel.Resources>
</StackPanel>
</Grid>
</Window>
但在代碼後面我可以訪問。
Xceed.Wpf.Toolkit.AutoSelectTextBox astb = new AutoSelectTextBox();
晚,但今天我會看看明天。謝謝 – Paparazzi