如何使用MonthCalendar突出显示特定日期? [英] How can I highlight a specific date using MonthCalendar?

查看:87
本文介绍了如何使用MonthCalendar突出显示特定日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当用户在ComboBox上选择一个项目(selectedIndexchanged)时,MonthCalendar将突出显示(绿色背景)数据库的可用日期。 I
正在搜索,我发现 
this
但 
DayRenderEventArgs  是
用于WebControls,而不是W indowsForms。



这是可能的吗?




When the user select an item on ComboBox (selectedIndexchanged) the MonthCalendar will highlight (green background) the avaliable dates of database. I was searching and I found this, but the DayRenderEventArgs is used on WebControls, not in WindowsForms.

It would be possible?

 private void cboArquivo2_SelectedIndexChanged(object sender, EventArgs e)
    {
        MontaCalendario(cboArquivo2.SelectedItem);
    }


private void MontaCalendario(object item)
{
    ComboItem ItemComboSecundario = (ComboItem)cboArquivo2.SelectedItem;
    arquivoSecundario = repositorioarquivo.ConsultaPorGrupoRelacionamento(ItemComboSecundario);
    List<Arquivo> listaAuxiliar = new List<Arquivo>();

    listaAuxiliar.AddRange(repositorioarquivo.Consultar());

    foreach (Arquivo arquivo in listaAuxiliar)
    {
        //highlight the dates
    }

}




$

推荐答案

嗨Leonardo RS Lima,

Hi Leonardo R. S. Lima,

感谢您在此发帖。

根据你的问题与Winform有关,我会把它移到
Windows Forms General
论坛以获得合适的支持。

According to your question is more related to Winform, I will move it to Windows Forms General forum for suitable support.

此论坛讨论并询问C#编程语言,IDE,库,示例和工具。如果您有一些语法或代码错误,请随时与我们联系。我们会尽力为您提供解决方案。

This forum discuss and ask the C# programming language, IDE, libraries, samples and tools. If you have some grammar or code errors, please feel free to contact us. We will try our best to give you a solution.

最好的问候,

Wendy


这篇关于如何使用MonthCalendar突出显示特定日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆