C# Class PocketCampus.IsAcademia.Controls.DayDisplay

Displays one or multiple days.
Inheritance: System.Windows.Controls.Panel
Show file Open project: accandme/pocketcampus

Public Properties

Property Type Description
ContainerStyleProperty System.Windows.DependencyProperty
DayProperty System.Windows.DependencyProperty
DaysProperty System.Windows.DependencyProperty
EmptyContainerStyleProperty System.Windows.DependencyProperty
HourIncrementProperty System.Windows.DependencyProperty
PeriodTemplateProperty System.Windows.DependencyProperty

Public Methods

Method Description
DayDisplay ( ) : System

Creates a new DayDisplay.

Protected Methods

Method Description
ArrangeOverride ( Size finalSize ) : Size

Arranges the elements inside the control.

MeasureOverride ( Size availableSize ) : Size

Creates all required elements and measures them.

Private Methods

Method Description
AddPeriodsToCanvas ( System.Windows.Controls.Canvas canvas, Size size, StudyDay day ) : void

Adds the periods of the specified day to the specified canvas with the specified size.

AddPlaceholdersToCanvas ( System.Windows.Controls.Canvas canvas, Size size ) : void

Adds placeholders to the specified canvas with the specified size.

CreateHoursGrid ( ) : Grid

Creates a vertical grid with hours.

GetHourBoundaries ( StudyDay days ) : int>.Tuple

Gets the hour boundaries for the specified days' periods.

HourCeiling ( System.TimeSpan time ) : int

Gets the hour ceiling for the specified time. The result is between 0 and 24 inclusive, and the method assumes the date is not 0:00.

Method Details

ArrangeOverride() protected method

Arranges the elements inside the control.
protected ArrangeOverride ( Size finalSize ) : Size
finalSize System.Windows.Size
return System.Windows.Size

DayDisplay() public method

Creates a new DayDisplay.
public DayDisplay ( ) : System
return System

MeasureOverride() protected method

Creates all required elements and measures them.
protected MeasureOverride ( Size availableSize ) : Size
availableSize System.Windows.Size
return System.Windows.Size

Property Details

ContainerStyleProperty public static property

public static DependencyProperty,System.Windows ContainerStyleProperty
return System.Windows.DependencyProperty

DayProperty public static property

public static DependencyProperty,System.Windows DayProperty
return System.Windows.DependencyProperty

DaysProperty public static property

public static DependencyProperty,System.Windows DaysProperty
return System.Windows.DependencyProperty

EmptyContainerStyleProperty public static property

public static DependencyProperty,System.Windows EmptyContainerStyleProperty
return System.Windows.DependencyProperty

HourIncrementProperty public static property

public static DependencyProperty,System.Windows HourIncrementProperty
return System.Windows.DependencyProperty

PeriodTemplateProperty public static property

public static DependencyProperty,System.Windows PeriodTemplateProperty
return System.Windows.DependencyProperty