0
我想设计我的WPF窗口的布局来添加一些代码列表项,我需要使用DatePicker,但日历按钮在文本框中不可见。Datepicker按钮不出现
这是我的网格:
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="35"></RowDefinition>
<RowDefinition Height="35"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
<ColumnDefinition Width="auto"></ColumnDefinition>
<ColumnDefinition Width="*"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Label Content="Code" Grid.Column="0" Grid.Row="0" />
<TextBox Text="{Binding Path=Code}" Grid.Column="1" Grid.Row="0" MinWidth="160" MaxLength="30" MaxWidth="160" />
<Label Content="Description" Grid.Column="0" Grid.Row="1" />
<TextBox Text="{Binding Path=Description}" Grid.Column="1" Grid.Row="1" MinWidth="160" MaxLength="120" MaxWidth="160" />
<Label Content="Valid from" Grid.Column="2" Grid.Row="0" />
<DatePicker Name="dpValidFrom" VerticalAlignment="Top" Grid.Column="3" Grid.Row="0" />
<Label Content="Valid to" Grid.Column="2" Grid.Row="1" />
<DatePicker Name="dpValidTo" VerticalAlignment="Top" Grid.Column="3" Grid.Row="1" />
</Grid>
在设计模式中看到这一点:
有人知道为什么? 感谢您的建议