Wpf datepicker shows truncated month

This is not always the case, but often the datepicker month label is truncated when expanding to select dates: screenshot (while the datepicker is pasted into the grid with space "*"). Has anyone come across this too? If so, how can we solve this problem?

EDIT 07/13/2011: xaml sample

<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> 

EDIT 07/21/2011: I tested your comments, indeed, the problem is related to the topic that I applied. Since I did not change the DatePicker myself, I think I need to find the dependency and understand the DatePicker building blocks.

EDIT 5 minutes later: this actually comes from the default width of my Button template. If I increase it, that's fine. Therefore, I think that generosity comes to Mamta Dalal, thank you very much.

+4
source share
1 answer

Fabienne

I don’t think there is an error in the code, but you could try increasing the size of the container in the template that contains part of the month, and I hope this works ...

+2
source

All Articles