110,538
社区成员
发帖
与我相关
我的任务
分享
<Window x:Class="WPF1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WPF1"
Title="MainWindow" Height="350" Width="525">
<Grid>
<DatePicker Name="datepicker" Margin="0,0,407,266"/>
<Button Content="Button" HorizontalAlignment="Left" Height="100" Margin="176,84,-100,-139" VerticalAlignment="Top" Width="75" Click="Button_Click"/>
</Grid>
</Window>
private void Button_Click(object sender, RoutedEventArgs e)
{
datepicker.Text = "dfdfdfd";
}