基本信息
源码名称:wpf textbox Placeholder Demo
源码大小:0.16M
文件格式:.zip
开发语言:C#
更新时间:2016-08-07
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
<Window x:Class="NanQi.Test.TextBoxTest"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:nanqi="http://nanqi.info"
WindowStartupLocation="CenterScreen"
Title="TextBoxTest" Height="300" Width="300">
<Grid Margin="5">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.Resources>
<Style TargetType="Button">
<Setter Property="Width" Value="80" />
<Setter Property="Height" Value="23" />
</Style>
</Grid.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="10" />
<RowDefinition Height="23" />
<RowDefinition Height="10" />
<RowDefinition Height="23" />
<RowDefinition Height="10" />
<RowDefinition Height="23" />
<RowDefinition Height="10" />
<RowDefinition Height="23" />
<RowDefinition Height="10" />
<RowDefinition Height="23" />
<RowDefinition Height="10" />
<RowDefinition Height="23" />
<RowDefinition Height="10" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="382*" />
<ColumnDefinition Width="618*" />
</Grid.ColumnDefinitions>
<Grid.Resources>
<Style TargetType="TextBox">
<Setter Property="Width" Value="120" />
<Setter Property="Height" Value="23" />
<Setter Property="Margin" Value="5,0,0,0" />
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style TargetType="TextBlock">
<Setter Property="Margin" Value="0,0,5,0" />
<Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
</Grid.Resources>
<TextBlock Text="Placeholder1" Grid.Row="1" />
<TextBox Grid.Column="1" Grid.Row="1" nanqi:TextBoxHelper.Placeholder1="请输入筛选条件..." />
<TextBlock Text="Placeholder1Bug" Grid.Row="3" />
<TextBox x:Name="placeholder1BugTextBox" Grid.Column="1" Grid.Row="3" FontStyle="Italic" Foreground="Red" nanqi:TextBoxHelper.Placeholder1="请输入筛选条件..." />
<Button x:Name="placeholder1BugButton" Grid.Column="1" Grid.Row="3" Content="Bug" Width="40" HorizontalAlignment="Right" Click="placeholder1BugButton_Click" />
<TextBlock Text="Placeholder2" Grid.Row="5" />
<TextBox Grid.Column="1" Grid.Row="5" nanqi:TextBoxHelper.Placeholder2="请输入筛选条件..." />
<TextBlock Text="Placeholder2Bug" Grid.Row="7" />
<TextBox x:Name="placeholder2BugTextBox" Grid.Column="1" Grid.Row="7" nanqi:TextBoxHelper.Placeholder2="请输入筛选条件..." />
<Button x:Name="placeholder2BugButton" Grid.Column="1" Grid.Row="7" Content="Bug" Width="40" HorizontalAlignment="Right" Click="placeholder2BugButton_Click" />
<TextBlock Text="Placeholder3" Grid.Row="9" />
<TextBox Grid.Column="1" Grid.Row="9" nanqi:TextBoxHelper.Placeholder3="请输入筛选条件..." />
<TextBlock Text="Placeholder3Test" Grid.Row="11" />
<TextBox x:Name="placeholder3TestTextBox" Grid.Column="1" Grid.Row="11" nanqi:TextBoxHelper.Placeholder3="请输入筛选条件..." />
<Button x:Name="placeholder3TestButton" Grid.Column="1" Grid.Row="11" Content="Test" Width="40" HorizontalAlignment="Right" Click="placeholder3TestButton_Click" />
</Grid>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="1">
<Button Content="_Close" x:Name="btnClose" Click="btnClose_Click" />
</StackPanel>
</Grid>
</Window>