Questions tagged [fody-propertychanged]

Fody add-in for injecting INotifyPropertyChanged code into properties

Fody add-in for injecting INotifyPropertyChanged code into properties.

79 questions
3
votes
1 answer

Why Can i Not call OnPropertyChanged when using [ImplementPropertyChanged]

I am implementing a class using fody ImplementPropertyChanged: [ImplementPropertyChanged] public class Translator { public string this[string Text] { get { ... } } public void Invalidate() { …
Nathan
  • 7,099
  • 14
  • 61
  • 125
3
votes
1 answer

Fody, propertychanged and setting same value?

Is there any way to configure fody to not check the value which is set to property - I have situations when value is the same and I want property to be set because I have additional logic in property setter that is not invoked.
dnf
  • 1,659
  • 2
  • 16
  • 29
2
votes
1 answer

Is there any way to "tell" IntelliSense and compiler that class implements the interface without actually implementing it?

I use Fody.PropertyChanged and Fody.Validar in my C# project to avoid writing boilerplate code. Let's presume I've got some class A: [AddINotifyPropertyChanged] [InjectValidation] public class A { } I have to use objects of type A in other parts of…
K. Voroncov
  • 189
  • 1
  • 11
2
votes
1 answer

Using propertychanged.fody with WPF databinding and EF 6.0 database first

Can someone please advise me how I can get PropertyChanged.Fody to work with WPF databinding and EF 6.0 Database first? I am not using MVVM. I have an EF generated class called "Test" as…
Joe
  • 1,304
  • 1
  • 10
  • 22
2
votes
2 answers

Fody PropertyChanged setter logic

Is there a way in Fody (MvvmCross app) to change this: private double _subTotal; public double SubTotal { get => _subTotal; set { _subTotal = value; Recalculate(); } } into something more elegant like:…
lukaszn
  • 83
  • 1
  • 7
2
votes
0 answers

xamarin prism forms property changed not firing

I have a problem with prism.forms and propertychanged. I have settingsmodel,settingsviewmodel and settingspage that shown code below, SettingsModel public class SettingsModel: BindableBase { public string Url { get; set; } public bool…
muhammetsahin
  • 181
  • 4
  • 14
2
votes
1 answer

How to subscribe to PropertyChange event with Fody-propertychanged

Create winform project targeting .net 4.5.1 Install-Package PropertyChanged.Fody [ImplementPropertyChanged] public class PersonFody { public string Name { get; set; } } PersonFody _fod = new PersonFody(); _fod. //Name is the only property and…
Watson
  • 1,385
  • 1
  • 15
  • 36
2
votes
1 answer

MVVM: Trigger method on property changed with Fody.PropertyChanged

I'd like to run a method on property changed. I'd like my code to compile to something like this: public string Property { get { return _property; } set { _property= value; IWantToCallFromHere();…
user963935
  • 493
  • 4
  • 20
2
votes
3 answers

Is it safe to use Fody.PropertyChanged with MVVMCross Or it is down the performance of app?

Today I read about new plugin on net which Fody.PropertyChanged which is very simple and easy to use. Currently I am using MVVMCross where we have to call RaisePropertyChange(()=>Property) again and again. Is it safe to use Fody.PropertyChanged…
Waqas Idrees
  • 1,443
  • 2
  • 17
  • 36
2
votes
2 answers

Change brushes based on ViewModel property

I have an application which has CarViewModel + view (UserControl). What I want to achieve is to change the style of brushes when the bound DataContext Car.Status changes. I found out how to change the brushes (in code behind of the view): private…
RvdK
  • 19,580
  • 4
  • 64
  • 107
2
votes
0 answers

How can I listen for changes to sub-property using PropertyChanged.Fody?

I use the awesome weaver PropertyChanged.Fody for avoiding INotifyPropertyChanged boilerplate. I define dependent properties like this: public string FirstName { get; set; } public string LastName { get; set; } public string FullName { get { return…
Geir Sagberg
  • 9,632
  • 8
  • 45
  • 60
2
votes
1 answer

Error during building application with PropertyChanged.Fody

I have very simple project in WPF (PropertyChanged)- one view, one view model and one model. In this project I use package PropertyChanged.Fody. When I want to build this project after 10 second I get two error message: Could not copy…
wopi
  • 329
  • 4
  • 16
2
votes
1 answer

Fody PropertyChanged interfering with FxCop

I am currently working on a project where we would like to use the Fody PropertyChanged IL weaver. It appears to work fantastically, but it is doing strange things to our FxCop analysis built into visual studio. We have CA1062 and CA2214 enabled:…
1
vote
2 answers

NotifyPropertyChanged not firing in derived class

I have these 3 classes [AddINotifyPropertyChangedInterface] public abstract class BaseViewModel { } public abstract class XXXViewModelBase : BaseViewModel { public int SelectedAreaId { get; set; } } public class XXXSelectorViewModel :…
Neil
  • 11,059
  • 3
  • 31
  • 56
1
vote
2 answers

Can Fody and its plugins be used with .NET Core (3.0)?

As the title says, I'm having trouble getting Fody, and the plugin Fody.PropertyChanged, to work in .NET Core 3.0, or any .NET Core version. Reading the issues on the respective GitHub pages doesn't answer my question, nor am I able to find any…