C1Scheduler for Winforms:高亮选择项

C1Scheduler for Winforms 自发布之日起就受到广大用户的欢迎。它拥有众多用户友好性功能,其中之一就是实现了 Microsoft Office Styling Scheduling 主题样式。更改“事件”的外观为最受欢迎功能之一。可以通过BeforeAppointmentFormat 事件定制。该事件中我们可以灵活定制“事件”的文本、图表、背景色。更多信息可以参考在线帮助文档:Documentation 。在本博客中,使用该特性,我们将阐述如何实现高亮选择项。Download C# SampleDownload VB.Net Sample

发布于 2013/03/08 00:00

ComponentOne Enterprise

C1Scheduler for Winforms 自发布之日起就受到广大用户的欢迎。它拥有众多用户友好性功能,其中之一就是实现了 Microsoft Office Styling Scheduling 主题样式。

更改“事件”的外观为最受欢迎功能之一。可以通过BeforeAppointmentFormat 事件定制。该事件中我们可以灵活定制“事件”的文本、图表、背景色。更多信息可以参考在线帮助文档:http://helpcentral.componentone.com/nethelp/c1schedule/#!XMLDocuments/Ref/html/E_C1_Win_C1Schedule_C1Schedule_BeforeAppointmentFormat.htm 。

在本博客中,使用该特性,我们将阐述如何实现高亮选择项。

参考代码:

 

Private Sub C1Schedule1_BeforeAppointmentFormat(ByVal sender As Object, ByVal e As C1.Win.C1Schedule.BeforeAppointmentFormatEventArgs) Handles C1Schedule1.BeforeAppointmentFormat
   If C1Schedule1.SelectedAppointments.Contains(e.Appointment) Then
       e.BackColor = Color.Blue
   Else
       e.BackColor = e.Appointment.Label.Color
   End If
End Sub
 
Private Sub C1Schedule1_SelectedAppointmentsChanged(ByVal sender As Object, ByVal e As C1.Win.C1Schedule.SelectedAppointmentsChangedEventArgs) Handles C1Schedule1.SelectedAppointmentsChanged
   For Each app As Appointment In C1Schedule1.DataStorage.AppointmentStorage.Appointments
       If C1Schedule1.SelectedAppointments.Contains(app) Then
          app.Tag = "change"
       Else
          app.Tag = Nothing
       End If
   Next
End Sub

下载示例:

Download C# Sample
Download VB.Net Sample

ComponentOne Enterprise | 下载试用

ComponentOne 是一套专注于企业 .NET开发、支持 .NET Core 平台,并完美集成于 Visual Studio 的第三方控件集,包含 300 多种 .NET开发控件,提供表格数据管理、数据可视化、报表和文档、日程安排、输入和编辑、导航和布局、系统提升工具等七大功能,被誉为“.NET开发的‘瑞士军刀’”。

ComponentOne 为您提供专业的产品咨询服务,并由技术支持工程师为您1对1解答。>> 发帖提问

相关产品
推荐相关案例
关注微信
葡萄城社区二维码

关注“葡萄城社区”

加微信获取技术资讯

加微信获取技术资讯

想了解更多信息,请联系我们, 随时掌握技术资源和产品动态