XtraSchedule 显示自定义约会标题

发布于 2024-10-30 19:07:18 字数 641 浏览 1 评论 0原文

我想更改每个约会标题,而不是显示应用的时间
我尝试了 InitAppointmentDisplayText 事件,但它只更改了应用程序的工具提示

private void schedulerControl1_InitAppointmentDisplayText(object sender, AppointmentDisplayTextEventArgs e)
        {
            e.Text = string.Format("Schedule: {0}, Time: {1}", e.Appointment.Description, e.Appointment.Start.ToShortTimeString());
            e.Description = string.Format("Schedule: {0}, Time: {1}", e.Appointment.Description, e.Appointment.Start.ToShortTimeString());
        }

在此处输入图像描述

I want to change the caption of every appointment i have instead of displaying the time of the app
I tried InitAppointmentDisplayText event but it only changes the toolTip of the app

private void schedulerControl1_InitAppointmentDisplayText(object sender, AppointmentDisplayTextEventArgs e)
        {
            e.Text = string.Format("Schedule: {0}, Time: {1}", e.Appointment.Description, e.Appointment.Start.ToShortTimeString());
            e.Description = string.Format("Schedule: {0}, Time: {1}", e.Appointment.Description, e.Appointment.Start.ToShortTimeString());
        }

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情话难免假 2024-11-06 19:07:18

您应该处理 InitAppointmentDisplayText 事件,并设置 Scheduler.Views.MonthView 属性,如下所示:

schedulerControl1.Views.MonthView.AppointmentDisplayOptions.EndTimeVisibility = DevExpress.XtraScheduler.AppointmentTimeVisibility.Never;

schedulerControl1.Views.MonthView.AppointmentDisplayOptions.StartTimeVisibility = DevExpress.XtraScheduler.AppointmentTimeVisibility.Never;

schedulerControl1.Views.MonthView.AppointmentDisplayOptions.TimeDisplayType = DevExpress.XtraScheduler.AppointmentTimeDisplayType.Text;

        private void schedulerControl1_InitAppointmentDisplayText(object sender, DevExpress.XtraScheduler.AppointmentDisplayTextEventArgs e) {
            e.Text = "test";
        }        

更新

请参阅我们文档中的以下主题,了解如何实现自定义编辑表单:

如何:使用自定义字段创建自定义 EditAppointment 表单

如何:创建自定义约会重复表单

You should handle the InitAppointmentDisplayText event and also set the Scheduler.Views.MonthView properties as shown below:

schedulerControl1.Views.MonthView.AppointmentDisplayOptions.EndTimeVisibility = DevExpress.XtraScheduler.AppointmentTimeVisibility.Never;

schedulerControl1.Views.MonthView.AppointmentDisplayOptions.StartTimeVisibility = DevExpress.XtraScheduler.AppointmentTimeVisibility.Never;

schedulerControl1.Views.MonthView.AppointmentDisplayOptions.TimeDisplayType = DevExpress.XtraScheduler.AppointmentTimeDisplayType.Text;

        private void schedulerControl1_InitAppointmentDisplayText(object sender, DevExpress.XtraScheduler.AppointmentDisplayTextEventArgs e) {
            e.Text = "test";
        }        

UPDATE

Please refer to the following topics in our documentation to learn how to implement custom edit forms:

How to: Create a Custom EditAppointment Form with Custom Fields

How to: Create a Custom Appointment Recurrence Form

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文