开发者

DatePicker day colors WPF 4

I have the following style for the text block in the dictionary

<Style TargetType="{x:Type TextBlock}">
    <Setter Property="HorizontalAlignment" Value="Left" />
    <Setter Property="VerticalAlignment" Value="Center" />
    <Setter Property="Margin" Value="5,0,0,0 "/>
    <Setter Property="Foreground" Value="White" />
</Style>

after setting this in the resource dictionary, all the text block i have used in my project have foreground color to white which I have set, now the problem is that the datepicker control when open only shows the selected date, as I have set the foreground color of white for the text block in the above style the date picker control dates are not开发者_StackOverflow中文版 showing. Please help me as soon as possible as I am stuck in this problem :(


You can use additional style for your DatePicker:

<DatePicker>
        <DatePicker.Resources>
            <Style TargetType="TextBlock">
                <Setter Property="Foreground" Value="Black"/>
            </Style>
        </DatePicker.Resources>
    </DatePicker>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜