This file contains hidden or 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:local="clr-namespace:DataTriggersFormsSample" | |
x:Class="DataTriggersFormsSample.MainPage"> | |
<StackLayout VerticalOptions="StartAndExpand" | |
Padding="20,60,20,20"> | |
<Entry x:Name="user" | |
Text="" |
This file contains hidden or 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 ImageEntry : Entry | |
{ | |
public ImageEntry(){ | |
this.HeightRequest = 50; | |
} | |
public static readonly BindableProperty ImageProperty = | |
BindableProperty.Create(nameof(Image), typeof(string), typeof(ImageEntry), string.Empty); | |
public static readonly BindableProperty LineColorProperty = | |
BindableProperty.Create(nameof(LineColor), typeof(Xamarin.Forms.Color), typeof(ImageEntry), Color.White); |
This file contains hidden or 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
namespace UISampleApp.Droid.Renderers | |
{ | |
public class ImageEntryRenderer : EntryRenderer | |
{ | |
ImageEntry element; | |
public ImageEntryRenderer(Context context) : base(context) | |
{ | |
} | |
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e) |
This file contains hidden or 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
namespace UISampleApp.iOS.Renderers | |
{ | |
public class ImageEntryRenderer : EntryRenderer | |
{ | |
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e) | |
{ | |
base.OnElementChanged(e); | |
if (e.OldElement != null || e.NewElement == null) | |
return; |
This file contains hidden or 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
<StackLayout Padding="40" Spacing="10"> | |
<local:ImageEntry TextColor="White" | |
PlaceholderColor="{StaticResource primary}" | |
Image="user" | |
Placeholder="Emil" | |
HorizontalOptions="FillAndExpand"/> | |
</StackLayout> |
This file contains hidden or 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 AudioPlayerService : IAudioPlayerService | |
{ | |
private AVAudioPlayer _audioPlayer = null; | |
public Action OnFinishedPlaying { get; set; } | |
public AudioPlayerService() | |
{ | |
} | |
public void Play(string pathToAudioFile) |
This file contains hidden or 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 AudioPlayerService : IAudioPlayerService | |
{ | |
private MediaPlayer _mediaPlayer; | |
public Action OnFinishedPlaying { get; set; } | |
public AudioPlayerService() | |
{ | |
} |
This file contains hidden or 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 AudioPlayerViewModel: INotifyPropertyChanged | |
{ | |
private IAudioPlayerService _audioPlayer; | |
private bool _isStopped; | |
public event PropertyChangedEventHandler PropertyChanged; | |
public AudioPlayerViewModel(IAudioPlayerService audioPlayer) | |
{ | |
_audioPlayer = audioPlayer; |
This file contains hidden or 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
<PropertyGroup> | |
... | |
<AndroidExplicitCrunch>true</AndroidExplicitCrunch> | |
</PropertyGroup> |
This file contains hidden or 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.Xaml; | |
... | |
[assembly: XamlCompilation (XamlCompilationOptions.Compile)] | |
namespace PhotoApp | |
{ | |
... | |
} |
OlderNewer