How to Use the MindFusion. Scheduling for WPF control to customize the appearance of the WPF resource view

Source: Internet
Author: User

Use MindFusion. Scheduling for WPF to customize the appearance of the resource view for better presentation. You can customize the view appearance by setting various attributes of the Calendar. ResourceViewSettings object. We will create our demo on a silver theme to make the font even across the entire view by reducing the definition and contrast of the color. The custom process consists of the following steps:

Custom view Background:

1 calendar.ResourceViewSettings.CalendarStyle. Brushes.White;< /code>

Custom line title:

1234567 calendar.ResourceViewSettings.ExpandableRows = false;calendar.ResourceViewSettings.HeaderStyle.FontFamily = headerFont;calendar.ResourceViewSettings.HeaderStyle.FontSize = 13;calendar.ResourceViewSettings.HeaderStyle.Foreground = newSolidColorBrush(Color.FromArgb(255, 64, 64, 64));calendar.ResourceViewSettings.HeaderStyle. Brushes.White;< /code>calendar.ResourceViewSettings.HeaderStyle.BorderBrush = borderBrush;calendar.ResourceViewSettings.HeaderStyle.BorderThickness = newThickness(0, 0, 0, 1);

Custom view cell:

1234 calendar.ResourceViewSettings.CellStyle. Brushes.White;< /code>calendar.ResourceViewSettings.CellStyle.BorderBrush = borderBrush;calendar.ResourceViewSettings.WeekendStyle.Background = newSolidColorBrush(Color.FromArgb(255, 250, 250, 250));calendar.ResourceViewSettings.WeekendStyle.BorderBrush = borderBrush;


Custom view timeline:

123456789101112 calendar.ResourceViewSettings.BottomTimelineSettings.CalendarStyle. Brushes.White;< /code>calendar.ResourceViewSettings.BottomTimelineSettings.CalendarStyle.BorderBrush = borderBrush;calendar.ResourceViewSettings.BottomTimelineSettings.CalendarStyle.FontFamily = headerFont;calendar.ResourceViewSettings.BottomTimelineSettings.CalendarStyle.FontSize = 13;calendar.ResourceViewSettings.BottomTimelineSettings.CalendarStyle.FontWeight = FontWeights.Normal;calendar.ResourceViewSettings.BottomTimelineSettings.NowFillBrush = Brushes.Transparent;calendar.ResourceViewSettings.MiddleTimelineSettings.CalendarStyle. Brushes.White;< /code>calendar.ResourceViewSettings.MiddleTimelineSettings.CalendarStyle.BorderBrush = borderBrush;calendar.ResourceViewSettings.MiddleTimelineSettings.CalendarStyle.FontFamily = headerFont;calendar.ResourceViewSettings.MiddleTimelineSettings.CalendarStyle.FontSize = 13;calendar.ResourceViewSettings.MiddleTimelineSettings.CalendarStyle.FontWeight = FontWeights.Normal;calendar.ResourceViewSettings.MiddleTimelineSettings.NowFillBrush = Brushes.Transparent;

The font, headerFont, and borderBrush variables are defined as follows:

123 FontFamily font = newFontFamily("Segoe UI");FontFamily headerFont = newFontFamily("Segoe UI Light");Brush borderBrush = newSolidColorBrush(Color.FromArgb(255, 224, 224, 224));

The final result is shown below.

650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/19462J534-0.jpg "width =" 670 "height =" 410 "style =" margin: 0px; padding: 0px; border: 0px; "alt =" WPF-Sample.jpg "/>


This article is from the "sellen technology follow" blog, please be sure to keep this source http://sellen018.blog.51cto.com/7935886/1300704

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.