This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ICommand $myCommand$; | |
public ICommand $MyCommand$ => $myCommand$ ?? ($myCommand$ = new Command(() => | |
{ | |
})); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows.Input; | |
using Xamarin.Forms; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private $type$ $myVar$; | |
public $type$ $MyProperty$ | |
{ | |
get => $myVar$; | |
set => SetValue(ref $myVar$, value); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.ComponentModel; | |
using System.Collections.Generic; | |
using System.Runtime.CompilerServices; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BaseViewModel : INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
protected void OnPropertyChanged([CallerMemberName] string propertyName = "") | |
{ | |
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); | |
} | |
protected void SetValue<T>(ref T field, T value, [CallerMemberName] string propertyName = null) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task SaveAndView(string fileName, String contentType, MemoryStream stream) | |
{ | |
//... | |
if (file.Exists()) | |
{ | |
var path = Android.Net.Uri.FromFile(file); | |
var extension = MimeTypeMap.GetFileExtensionFromUrl(Android.Net.Uri.FromFile(file).ToString()); | |
var mimeType = MimeTypeMap.Singleton.GetMimeTypeFromExtension(extension); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected override void OnAppearing() | |
{ | |
base.OnAppearing(); | |
badge.BadgeView = new Image() | |
{ | |
Source = ImageSource.FromResource("DemoEliteKit.Images.box.png"), | |
HeightRequest = 50, | |
WidthRequest = 50 | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Xamarin.Forms; | |
namespace DemoEliteKit | |
{ | |
public partial class App : Application | |
{ | |
public App() | |
{ | |
InitializeComponent(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:ek="clr-namespace:eliteKit.eliteElements;assembly=eliteKit" | |
xmlns:converters="clr-namespace:DemoEliteKit.Converters" | |
xmlns:vm="clr-namespace:DemoEliteKit.ViewModels" | |
x:Class="DemoEliteKit.Views.ProductView" | |
mc:Ignorable="d"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows.Input; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
using Acr.UserDialogs; | |
namespace DemoEliteKit.ViewModels | |
{ | |
public class ProductViewModel : BaseViewModel |