XAML: Can I refer to a Grid row or column by name?
问题 If I name each row and column in a grid, can I set a control's grid.row="Row_Top"? I have defined StaticResources to refer to it but is there a converter or some other method to accomplish this without the resource? 回答1: As far as I know there's no built-in way to do it... however, you could use markup extensions to retrieve a row or column by its name : [MarkupExtensionReturnType(typeof(int))] public abstract class GridBandExtensionBase : MarkupExtension { public override object ProvideValue