WinComboBox.xaml 1.2 KB

123456789101112131415161718192021222324
  1. <Window x:Class="Test.SearchControl.WinComboBox"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:Test.SearchControl"
  7. xmlns:controls="http://schemas.FWind/xaml"
  8. mc:Ignorable="d"
  9. Title="WinComboBox" Height="300" Width="300">
  10. <Grid>
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="Auto"></RowDefinition>
  13. <RowDefinition></RowDefinition>
  14. <RowDefinition></RowDefinition>
  15. <RowDefinition></RowDefinition>
  16. </Grid.RowDefinitions>
  17. <controls:SearchComboBox FontSize="18" ItemsSource="{Binding ItemsStr}" SelectedItem="{Binding Selected,Mode=TwoWay}">
  18. </controls:SearchComboBox>
  19. <Button Name="Button" Grid.Row="1" Content="选中项" Click="Button_Click"></Button>
  20. <ListBox Grid.Row="2" ItemsSource="{Binding ItemsStr}"></ListBox>
  21. <TextBox Name="Text" Grid.Row="3" ></TextBox>
  22. </Grid>
  23. </Window>