Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JamesGrid Element Arrangement Issue #4

Open
ErickWei opened this issue May 8, 2024 · 1 comment
Open

JamesGrid Element Arrangement Issue #4

ErickWei opened this issue May 8, 2024 · 1 comment

Comments

@ErickWei
Copy link

ErickWei commented May 8, 2024

How do I add placeholders if some cells don't need to contain any elements when using JamesGrid?

<james:JamesGrid ColumnCount="3" Columns="Auto,*,*" RowCount="3" Rows="Auto,Auto,Auto"> <TextBlock Text="R1C1" /> <TextBlock Grid.Column="1" Text="R1C2" /> <TextBlock Grid.Row="1" Grid.Column="0" Text="How do I get it to display in R2C1" /> </james:JamesGrid>

@ErickWei ErickWei closed this as not planned Won't fix, can't repro, duplicate, stale May 8, 2024
@jamesnet214
Copy link
Collaborator

jamesnet214 commented May 10, 2024

I also frequently face this situation. Typically, I resolve it in the following manner.

public class EmptyArea : Control 
{

}

As shown above, I define an empty control class to fill unnecessary spaces.

<james:JamesGrid Rows="*" Columns="*, *, *">
    <units:EmptyArea/>
    <TextBlock Text="asdf1"/>
    <TextBlock Text="asdf2"/>
</james:JamesGrid>

This method, by explicitly defining specific controls, can effectively enhance readability.

@ErickWei I will consider more fundamental solutions to this issue and provide updates in the future. Thank you for your insightful feedback!

@jamesnet214 jamesnet214 reopened this May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants