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

x64 designer preview problem #11

Open
guenterrudigier opened this issue Feb 27, 2019 · 6 comments
Open

x64 designer preview problem #11

guenterrudigier opened this issue Feb 27, 2019 · 6 comments

Comments

@guenterrudigier
Copy link

Hi there

I am using you library in my project and it is great how things get easier with it!

But now my problem: Our solution is configured as x64 platform. I noticed that the designer is not working correct and it shows all items in Column 0 and Row 0. I created a small Test app and noticed if I use AnyCpu or x86 everything is as expected.

Is this a known problem and if so, how can I solve it?

Thanks for you help and regards!

@kmcginnes
Copy link
Collaborator

That’s an interesting issue. Perhaps AutoGrid needs to be compiled as x64 as well to work.

Try grabbing the source code for AutoGrid and adding it to your sample project and remove the NuGet package references to AutoGrid.

@guenterrudigier
Copy link
Author

Tried you suggestion but the problem remains the same... I am afraid that this could be a VS Designer issue. I found similar problems regarding XAML designer and x64 only applications. Maybe you have an other idea how to solve?

@kmcginnes
Copy link
Collaborator

Here’s another thing you can try. I believe there’s another AutoGrid style control on NuGet. See if you can find that and if it has the same problem then we can probably chalk it up to a designer issue.

There’s also different versions of Visual Studio to try. Maybe VS 2019 Preview fixes this.

I’ll be honest, I don’t have a Windows VM setup easily accessible at the moment to test any of this out. Otherwise I could give some of these things a try myself. Sorry.

@guenterrudigier
Copy link
Author

Thanks for your help! Yesterday I tried other AutoGrid controls as well and the result was the same so I guess its really a designer problem :-( And I had the same idea and tried VS2019 as well but the designer has the same behavior.

So I think the only way is to switch to x86 or AnyCPU while using the designer, but that is not really possible in our project...

Anyway thanks again for you help!

@kmcginnes
Copy link
Collaborator

There’s more things you can try.

I think the designer calls in to the UserControl constructor. Try putting a call to the AutoGrid’s PerformLayout() function. You’ll have to name your AutoGrid something and use that reference. Also make sure to put it after the InitializeComponent() call.

Also, have you tried using the StackPanel control in this library instead? I found in my WPF time I hardly ever used an AutoGrid. I almost exclusively used StackPanels. If you are laying out forms, then you might want to consider creating a FormControl type that controls the width of the label. This helps keep all the fields in alignment.

@kmcginnes
Copy link
Collaborator

You might also be able to use Blend instead of VS for the designer functionality. It may or may not share the same designer under the covers.

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