这似乎并非总是如此,但通常情况下,当展开以选择日期时,日期选择器的月份标签会被截断:
(同时,日期选择器插入了一个带有“*”空格的网格中)。
是否有人也遇到过这个问题?如果是,我们该如何解决?
编辑于13/07/2011:示例XAML。
![screenshot](https://istack.dev59.com/NKg9G.webp)
<UserControl x:Class="Module.View.ConfigView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<Expander Header="Options"
ExpandDirection="Down"
IsExpanded="True">
<Grid>
<StackPanel Orientation="Horizontal" Margin="5,5,5,5">
<Label Width="50" HorizontalAlignment="Left">From :</Label>
<DatePicker HorizontalAlignment="Left"/>
</StackPanel>
</Grid>
</Expander>
</Grid>
编辑于2011年7月21日:根据您的评论,我进行了测试,的确问题出在我应用的主题上。由于我没有改变DatePicker本身,我想我需要找到依赖项并了解DatePicker的构建块。
5分钟后编辑:实际上,这是由于我的按钮模板默认宽度太小了。如果我增加它,就好了。所以我想奖励应该授予Mamta Dalal,非常感谢。