Skip to content

BananaBytes/CSharpSnippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CSharpSnippets

Useful Snippets for Visual Studio - C#

MVVM Pattern Snippets

OpenMVVM

mprop snippet

Creates prop with backing field, also rising property changed event. Example:

private string customerFirstName;

public string CustomerFirstName
{
    get => this.customerFirstName;
    set => this.Set(ref this.customerFirstName, value);
}

mcomm snippet

Creates ICommand prop with backing field. Example:

private IMvvmCommand nextPageCommand;

public IMvvmCommand NextPageCommand => this.nextPageCommand ?? (this.nextPageCommand = new ActionCommand(() => { }));

Prism

pprop snippet

Creates prop with backing field, also rising property changed event. Example:

private string customerFirstName;

public string CustomerFirstName
{
    get => this.customerFirstName;
    set => this.SetProperty(ref this.customerFirstName, value);
}

pcomm snippet

Creates ICommand prop with backing field. Example:

private ICommand nextPageCommand;

public ICommand NextPageCommand => this.nextPageCommand ?? (this.nextPageCommand = new DelegateCommand(() => { }));

About

Useful Snippets for Visual Studio - C#

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published