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

object reference not set to an instance of an object #69

Open
LucaFagan opened this issue Oct 27, 2020 · 4 comments
Open

object reference not set to an instance of an object #69

LucaFagan opened this issue Oct 27, 2020 · 4 comments

Comments

@LucaFagan
Copy link

I keep getting "object reference not set to an instance of an object" worning in xaml designer even if the application works fine.

If I replace win:Visibility.Visible and win:Visibility.Collapsed with numeric values the error goes away so I thing the error is related to the name space. Any solution ?

xmlns:win="clr-namespace:System.Windows;assembly=PresentationCore"

Visibility="{c:Binding '(JobParamsOtt.MULTIPLY_RIP_TYPE == 1) ? win:Visibility.Visible : win:Visibility.Collapsed'}">
@keytrap-x86
Copy link

keytrap-x86 commented Dec 13, 2020

Try this :

xmlns:win="clr-namespace:System.Windows;assembly=PresentationCore"

Visibility="{c:Binding '(JobParamsOtt.MULTIPLY_RIP_TYPE == 1)'}">

If the condition is met, it wil be visible by default

@LucaFagan
Copy link
Author

LucaFagan commented Dec 13, 2020

I've tried the suggested approach, if condition is met the field is visible, otherwise it is collapsed.

@keytrap-x86
Copy link

keytrap-x86 commented Dec 13, 2020

I've tried the suggested approach, if condition is met the field is visible, otherwise it is collapsed.

I've edited my answer. I meant visible by default

@LucaFagan
Copy link
Author

Ah ok.

Thanks for the explanation.

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