src/Foundation/Presentation/Gimela.Presentation.Controls/Controls/Timeline/TimelineTick/TimelineTickDataTemplateSelector.cs
/// <summary>
/// When overridden in a derived class, returns a <see cref="T:System.Windows.DataTemplate"/> based on custom logic.
/// </summary>
/// <param name="item">The data object for which to select the template.</param>
/// <param name="container">The data-bound object.</param>
/// <returns>
/// Returns a <see cref="T:System.Windows.DataTemplate"/> or null. The default value is null.
/// </returns>
When overridden in a derived class, returns a  based on custom logic.
When overridden in a derived class returns a based on custom logic .
public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            var tick = item as TimelineTick;
            if (tick != null)
            {
                switch (tick.TickType)
                {
                    case TimelineTickType.Small:
                        return SmallTickDataTemplate;
                    case TimelineTickType.Medium:
                        return MediumTickDataTemplate;
                    case TimelineTickType.Big:
                        return BigTickDataTemplate;
                }
            }
            return null;
        }
public override DataTemplate SelectTemplate ( object item , DependencyObject container ) { var tick = item as TimelineTick ; if ( tick != null ) { switch ( tick . TickType ) { case TimelineTickType . Small : return SmallTickDataTemplate ; case TimelineTickType . Medium : return MediumTickDataTemplate ; case TimelineTickType . Big : return BigTickDataTemplate ; } } return null ; }
When overridden in a derived class, returns a  based on custom logic.
When overridden in a derived class returns a based on custom logic .
Returns a  or null. The default value is null.
Returns a or null . The default value is null .
item
object
The data object for which to select the template.
The data object for which to select the template .
container
DependencyObject
The data-bound object.
The data - bound object .