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

Resharper compatibility #13

Closed
arteny opened this issue Apr 2, 2015 · 9 comments
Closed

Resharper compatibility #13

arteny opened this issue Apr 2, 2015 · 9 comments
Milestone

Comments

@arteny
Copy link

arteny commented Apr 2, 2015

Such 'complex' property access shown as error in Resharper:
<Setter Property="IsEnabled" Value="{c:Binding !DataContext.IsRemoved}"/>
! pointed as not expected token.
And I can not ignore this line something like
<!-- ReSharper disable Xaml.BindingWithContextNotResolved -->
Only was is Disable Resharper Daemon for all file, but i don't like it much.

Is there some workaround?

@Alex141
Copy link
Owner

Alex141 commented Apr 2, 2015

Hi, arteny!

I'm surprised for such problem with resharper. Some workaround for this doesn't exists yet, but I think it will be possible to add for operator '!' alias 'not' like it was made for '&&' and '||' operators. In principle, it is quick to do and write tests. In the near future I will do it.

So, for examle, your xaml code will be:

<Setter Property="IsEnabled" Value="{c:Binding not DataContext.IsRemoved}"/>

Just do not forget to comment on the issues you have already created

@arteny
Copy link
Author

arteny commented Apr 2, 2015

Thank you for kind support!
Yes, I saw those issues have updates and will check them ASAP.

@Alex141 Alex141 added this to the 2.1.1.0 next milestone Jun 9, 2015
Alex141 added a commit that referenced this issue Jun 9, 2015
@Alex141
Copy link
Owner

Alex141 commented Jun 9, 2015

version 2.2.3.0 with that feature is released

@Alex141 Alex141 closed this as completed Jun 9, 2015
@arteny
Copy link
Author

arteny commented Jun 27, 2015

It doesn't solve this issue. If change ! for not, Resharper error message changed to:
No constructor with 2 parameters found

@arteny
Copy link
Author

arteny commented Jun 27, 2015

And it is not related "complex" field, but anyone:

 <Setter Property="ShowCloseButton" Value="{c:Binding !IsAddButton}" />

or

<Setter Property="ShowCloseButton" Value="{c:Binding not IsAddButton}" />

@Alex141
Copy link
Owner

Alex141 commented Jun 27, 2015

Arteny, unfortunately I don't use Resharper, so as I undestand from your issue description, Resharper doesn't like special symbol '!' and that is the reason of error. Therefore I have added operator 'not' in a hope that resharper will not show error.

As I know resharper can't affect on compilation process, so even if you have that "resharper error" you can still compile and launch your project. Can you just turn off messages about these kinds of errors in resharper options?

If you other good solutions, please write about it.

@arteny
Copy link
Author

arteny commented Jun 30, 2015

Seems I found workaround, it is necessary to include path to single quotes like

 <Setter Property="ShowCloseButton" Value="{c:Binding '!IsAddButton'}" />

@Alex141
Copy link
Owner

Alex141 commented Jun 30, 2015

And resharper don't show error?

@arteny
Copy link
Author

arteny commented Jun 30, 2015

yes, it is

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants