Sliverlight学习日志(陈立东)

当你停下脚步的时候,想想有很多人还在继续奔跑~!Sliverlight
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

SearchBox

Posted on 2009-07-21 22:03  陈立东  阅读(372)  评论(0)    收藏  举报

<UserControl
 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 xmlns:LiveSearch="clr-namespace:LiveSearch"
 x:Class="LiveSearch.SearchBox"
 x:Name="UserControl"
 Width="479" Height="62" RenderTransformOrigin="0.5,0.5" Background="{x:Null}" xmlns:d="http://schemas.microsoft.com/expression/blend/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">

 <UserControl.Resources>
 </UserControl.Resources>
 <UserControl.RenderTransform>
  <TransformGroup>
   <ScaleTransform ScaleX="1" ScaleY="1"/>
   <SkewTransform AngleX="0" AngleY="0"/>
   <RotateTransform Angle="0"/>
   <TranslateTransform X="0" Y="0"/>
  </TransformGroup>
 </UserControl.RenderTransform>
 <UserControl.Triggers>
 </UserControl.Triggers>

 <Grid x:Name="LayoutRoot">
  <Grid HorizontalAlignment="Stretch" x:Name="SearchGrid" VerticalAlignment="Stretch">
   <Grid Margin="5,10,5,13" Background="{x:Null}">
    <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="7" RadiusY="7" Opacity="0.08" Margin="-3,-3,-3,-3"/>
    <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="6" RadiusY="6" Opacity="0.08" Margin="-2,-2,-2,-2"/>
    <Rectangle HorizontalAlignment="Stretch" Fill="#FF000000" Stroke="{x:Null}" RadiusX="5" RadiusY="5" Opacity="0.08" Margin="-1,-1,-1,-1"/>
    <Rectangle HorizontalAlignment="Stretch" Fill="{DynamicResource WebSearch_SearchBoxBackground}" Stroke="{x:Null}" RadiusX="4" RadiusY="4"/>
   </Grid>
   <StackPanel HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="Auto" Height="Auto">
    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Stretch" Height="41" Orientation="Horizontal">
     <TextBox Width="302" Text="Search the Internet..." TextWrapping="Wrap" HorizontalAlignment="Stretch" x:Name="SearchTextBox" VerticalAlignment="Bottom" Height="22" FontStyle="Normal" Foreground="#FF5E5E5E"  GotKeyboardFocus="OnGotKeyboardFocus" PreviewMouseLeftButtonDown="OnPreviewMouseLeftButtonDown" LostFocus="OnLostFocus" />
     <Button HorizontalAlignment="Stretch" x:Name="SearchButton" Style="{DynamicResource ButtonSearch}" VerticalAlignment="Bottom" Width="22" Height="22" Content="Button" Click="OnClick" BorderThickness="0,0,0,0"/>
     <CheckBox Margin="16,0,0,4" Style="{DynamicResource CheckBox}" VerticalAlignment="Bottom" FontFamily="Tahoma" FontSize="10" Content="Web" IsChecked="True" Width="45.81" x:Name="SearchWeb" Foreground="#FFFFFFFF"/>
     <CheckBox Content="Images" Margin="6,0,0,4" Style="{DynamicResource CheckBox}" VerticalAlignment="Bottom" Width="57" FontFamily="Tahoma" FontSize="10" x:Name="SearchImages" IsChecked="True" Foreground="#FFFFFFFF"/>
    </StackPanel>
   </StackPanel>
   <Grid Margin="5,10,5,13" Background="{x:Null}" IsHitTestVisible="False" d:IsLocked="True">
    <Rectangle HorizontalAlignment="Stretch" Stroke="{x:Null}" RadiusX="3" RadiusY="3" Margin="1,1,1,1">
     <Rectangle.Fill>
      <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
       <GradientStop Color="#37FFFFFF" Offset="0.478"/>
       <GradientStop Color="#00FFFFFF" Offset="0.49"/>
      </LinearGradientBrush>
     </Rectangle.Fill>
    </Rectangle>
   </Grid>
  </Grid>
 </Grid>
</UserControl>