Skip to content

Alias for Grid‘s RowDefinition and ColumnDefinition #2844

Open
@TruePluto

Description

@TruePluto

I don't know if there is a way to make a alias for Grid‘s cell. But I want to how to implement the following feature:

    <Grid x:Name="OuterGird">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" alias="id"/>
            <ColumnDefinition Width="*" alias="name"/>
            <ColumnDefinition Width="Auto" alias="birthday"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" alias="title"/>
            <RowDefinition Height="auto" alias="Address Bar"/>
            <RowDefinition Height="auto" alias="document "/>
            <RowDefinition Height="auto" alias="status bar "/>
        </Grid.RowDefinitions>

        <Grid x:Name="InnerGrid" Grid.Column="id" Grid.Row="title"/>
        <TextBlock x:Name="Address" Grid.Column="id" Grid.Row="Address Bar"/>
        ...
    </Grid>

so when I Change the OuterGrid' columns defintion or rows difinition I don’t need to change the InnerGrid's properties of Grid.Column or Grid.Row
Thank you for your attention

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement RequestedProduct code improvement that does NOT require public API changes/additions

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions