Working player contained within main page and control delegated to viewmodels
This commit is contained in:
@ -14,11 +14,9 @@
|
||||
<StackLayout
|
||||
Grid.Column="0">
|
||||
<Label
|
||||
x:Name="SongTitleLabel"
|
||||
Text="{Binding SongTitle}"/>
|
||||
x:Name="SongTitleLabel"/>
|
||||
<Label
|
||||
x:Name="ArtistNameLabel"
|
||||
Text="{Binding ArtistName}"/>
|
||||
x:Name="ArtistNameLabel"/>
|
||||
</StackLayout>
|
||||
<StackLayout
|
||||
Grid.Column="1"
|
||||
@ -26,19 +24,16 @@
|
||||
<Button
|
||||
Text="Previous"
|
||||
x:Name="PreviousButton"
|
||||
Command="{Binding PreviousCommand}"
|
||||
WidthRequest="100"
|
||||
HeightRequest="50"/>
|
||||
<Button
|
||||
x:Name="PlayButton"
|
||||
Text="{Binding PlayButtonText}"
|
||||
Command="{Binding PlayCommand}"
|
||||
Text="Play/Pause"
|
||||
WidthRequest="100"
|
||||
HeightRequest="50"/>
|
||||
<Button
|
||||
Text="Next"
|
||||
x:Name="NextButton"
|
||||
Command="{Binding NextCommand}"
|
||||
WidthRequest="100"
|
||||
HeightRequest="50"/>
|
||||
</StackLayout>
|
||||
|
@ -7,9 +7,6 @@ namespace Aurora.Design.Components.MediaPlayer
|
||||
{
|
||||
public Player()
|
||||
{
|
||||
// this.PreviousButton.Clicked += OnPreviousButtonClicked;
|
||||
// this.PlayButton.Clicked += OnPlayButtonClicked;
|
||||
// this.NextButton.Clicked += OnNextButtonClicked;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
@ -33,7 +30,7 @@ namespace Aurora.Design.Components.MediaPlayer
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnSongTitlePropertyChanged(BindableObject bindable, object newValue, object oldValue)
|
||||
private static void OnSongTitlePropertyChanged(BindableObject bindable, object oldValue, object newValue)
|
||||
{
|
||||
Player component = bindable as Player;
|
||||
component.SongTitleLabel.Text = (string)newValue;
|
||||
@ -60,7 +57,7 @@ namespace Aurora.Design.Components.MediaPlayer
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnArtistNamePropertyChanged(BindableObject bindable, object newValue, object oldValue)
|
||||
private static void OnArtistNamePropertyChanged(BindableObject bindable, object oldValue, object newValue)
|
||||
{
|
||||
Player component = bindable as Player;
|
||||
component.ArtistNameLabel.Text = (string)newValue;
|
||||
|
Reference in New Issue
Block a user