Skip to content

Snippets for Xamarin.Android and Xamarin.iOS

License

Notifications You must be signed in to change notification settings

wcoder/XToolkit.Snippets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XToolkit.Snippets

Snippets for Xamarin.Android and Xamarin.iOS.

Importing snippets

Visual Studio for Mac

You can import snippets by putting the files from the VS4Mac folder into ~/Library/VisualStudio/8.0/Snippets/

Rider

To import Snippets in Rider go to Preferences > Manage Layers > Import from file, select the Live templates checkbox and click OK. For more documentation see the Rider documentation about Sharing Live Templates.

Snippets

xprop

private string _name;
public string Name
{
    get => _name;
    private set => Set(ref _name, value);
}

xcom

GoNextCommand = new RelayCommand(GoNext);

public ICommand GoNextCommand { get; }

private void GoNext()
{
}

xcomt

FindCommand = new RelayCommand<string>(Find);

public ICommand<string> FindCommand { get; }

private void Find(string arg)
{
}

xcoma

GoNextCommand = new AsyncCommand(GoNextAsync);

public IAsyncCommand GoNextCommand { get; }

private Task GoNextAsync()
{
}

xcomat

FindCommand = new AsyncCommand<string>(FindAsync);

public IAsyncCommand<string> FindCommand { get; }

private Task FindAsync(string arg)
{
}

xvm

public class HomePageViewModel : ViewModelBase
{
    public HomePageViewModel()
    {
    }

    public override void OnInitialize()
    {
        base.OnInitialize();
    }

    public override void OnAppearing()
    {
        base.OnAppearing();
    }

    public override void OnDisappearing()
    {
        base.OnDisappearing();
    }
}

xbind

this.Bind(() => ViewModel.Title, () => TitleLabel.Text);

xtest

[Fact]
public void UnitUnderTest_StateUnderTest_ExpectedResult()
{
}

© 2020 | MIT

Releases

No releases published

Packages

No packages published