快过年了,回家心情急切呀。今天,明天,后天一上午。就可以回家啦,高兴,再记点小东西吧。
好像web项目都是从登陆开始的吧,这个也一样。
1.
<Canvas>
<Canvas.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</Canvas.Background>
<ToggleButton x:Name="button" Width="75" Canvas.Left="196" Canvas.Top="185" Content="Login" Click="ToggleButton_Click"/>
<TextBox Canvas.Left="196" Canvas.Top="64" TextWrapping="Wrap" Width="198"/>
<TextBox Width="198" Canvas.Left="196" Canvas.Top="122" TextWrapping="Wrap"/>
<dataInput:Label Canvas.Left="74" Canvas.Top="64" Content="用户名" Width="72" Height="24">
<dataInput:Label.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</dataInput:Label.Background>
</dataInput:Label>
<dataInput:Label Canvas.Left="74" Canvas.Top="122" Width="72" Height="24" Content="密 码">
<dataInput:Label.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</dataInput:Label.Background>
</dataInput:Label>
</Canvas>
<Canvas.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</Canvas.Background>
<ToggleButton x:Name="button" Width="75" Canvas.Left="196" Canvas.Top="185" Content="Login" Click="ToggleButton_Click"/>
<TextBox Canvas.Left="196" Canvas.Top="64" TextWrapping="Wrap" Width="198"/>
<TextBox Width="198" Canvas.Left="196" Canvas.Top="122" TextWrapping="Wrap"/>
<dataInput:Label Canvas.Left="74" Canvas.Top="64" Content="用户名" Width="72" Height="24">
<dataInput:Label.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</dataInput:Label.Background>
</dataInput:Label>
<dataInput:Label Canvas.Left="74" Canvas.Top="122" Width="72" Height="24" Content="密 码">
<dataInput:Label.Background>
<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
<GradientStop Color="Black" Offset="0"/>
<GradientStop Color="White" Offset="1"/>
</LinearGradientBrush>
</dataInput:Label.Background>
</dataInput:Label>
</Canvas>
用Blend3画了个登陆,不过发现自己的美术功底实在差,自己都觉得难看。
2.
private void ToggleButton_Click(object sender, RoutedEventArgs e)
{
this.button.Content = "登陆成功";
}
{
this.button.Content = "登陆成功";
}
后台就简单的很啦,发现自己实在是太懒了。。。
PS:
控件的名字是ToggleButton x:Name="button" 这种格式,不是ID=。。。。的。
这个写的实在是没什么内容呀,鄙视自己,懒死了,快过年吧。年后新气象,会有新的环境,新的Money!
同时兄弟们也发财啊!