Exemplo n.º 1
0
 /// <summary>
 /// Sets style for binding.
 /// </summary>
 /// <typeparam name="T">The type of the binding.</typeparam>
 /// <param name="binding">The binding.</param>
 /// <param name="value">The style id.</param>
 /// <returns>The binding for fluent coding.</returns>
 public static T WithStyle <T>(this T binding, StyleId value)
     where T : Binding
 {
     if (value == null)
     {
         throw new ArgumentNullException(nameof(value));
     }
     return(binding.WithStyle <T>(value.GetOrLoad()));
 }
Exemplo n.º 2
0
            /// <summary>
            /// Customizes row view.
            /// </summary>
            /// <typeparam name="T">Type of row view.</typeparam>
            /// <param name="styleId">The style applied to the row view.</param>
            /// <returns>This template builder for fluent coding.</returns>
            public TemplateBuilder RowView <T>(StyleId styleId)
                where T : RowView, new()
            {
                if (_inherited)
                {
                    return(this);
                }

                if (styleId == null)
                {
                    throw new ArgumentNullException(nameof(styleId));
                }
                return(RowView <T>(styleId.GetOrLoad()));
            }