public static IFluentItem <Grid> DefaultCellSize(this IFluentItem <Grid> item, double width, double height) { GridFluentItem gridFluentItem = new GridFluentItem(item); gridFluentItem.DefaultWidth = new GridLength(width, GridUnitType.Pixel); gridFluentItem.DefaultHeight = new GridLength(height, GridUnitType.Pixel); return(gridFluentItem); }
public static IFluentItem <Grid> DefaultCellSize(this IFluentItem <Grid> item, string width, string height) { GridFluentItem gridFluentItem = new GridFluentItem(item); GridLength gridLength; if (GridCell.TryGetGridLength(width, out gridLength)) { gridFluentItem.DefaultWidth = gridLength; } if (GridCell.TryGetGridLength(height, out gridLength)) { gridFluentItem.DefaultHeight = gridLength; } return(gridFluentItem); }