Locator.xaml
上传用户:huazai0421
上传日期:2008-05-30
资源大小:405k
文件大小:2k
- <UserControl x:Class="ESRI.ArcGIS.Samples.LocatorControl"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:esriConverters="clr-namespace:ESRI.ArcGIS.Client.ValueConverters;assembly=ESRI.ArcGIS.Client"
- >
- <UserControl.Resources>
- <esriConverters:DictionaryConverter x:Name="MyDictionaryConverter" />
- </UserControl.Resources>
- <Grid>
- <StackPanel Orientation="Horizontal">
-
- <TextBlock Text="Search:" Margin="0,0,5,0" Foreground="White" FontWeight="Bold" VerticalAlignment="Center" />
- <TextBox Width="150" Height="22" Foreground="Gray"
- x:Name="locationTextBox" SelectionBackground="#999999"
- GotFocus="TextBox_GotFocus"
- LostFocus="TextBox_LostFocus"
- Text="Enter a location..."
- KeyDown="SearchLocation_KeyDown"
- Background="Transparent" VerticalAlignment="Center" />
- </StackPanel>
- <Popup x:Name="locationResultsPopUp" IsOpen="True" HorizontalAlignment="Left" VerticalAlignment="Top">
- <ListBox x:Name="locationResults" Background="#333333" SizeChanged="locationResults_SizeChanged"
- SelectionChanged="locationResults_SelectionChanged"
- Visibility="Collapsed"
- LostFocus="locationResults_LostFocus">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <TextBlock
- Foreground="White" FontSize="9"
- Text="{Binding Path=Attributes, Converter={StaticResource MyDictionaryConverter}, ConverterParameter=Descr, Mode=OneWay}" />
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Popup>
- </Grid>
- </UserControl>