Share current song by double click
This commit is contained in:
parent
6e4ed82211
commit
62a3220f7f
@ -28,7 +28,7 @@
|
|||||||
</GroupBox.Header>
|
</GroupBox.Header>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid x:Name="CurrentSong" Margin="10,0,10,0" VerticalAlignment="Top" MinHeight="80">
|
<Grid x:Name="CurrentSong" Margin="10,0,10,0" VerticalAlignment="Top" MinHeight="80">
|
||||||
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center" MouseDown="MouseDownClipboard">
|
||||||
<TextBlock x:Name="SongTitle" TextWrapping="Wrap" TextAlignment="Center" FontWeight="Normal" FontSize="20" Text="Title"/>
|
<TextBlock x:Name="SongTitle" TextWrapping="Wrap" TextAlignment="Center" FontWeight="Normal" FontSize="20" Text="Title"/>
|
||||||
<TextBlock x:Name="SongArtist" TextWrapping="Wrap" TextAlignment="Center" FontWeight="Bold" FontSize="18" Text="Artist"/>
|
<TextBlock x:Name="SongArtist" TextWrapping="Wrap" TextAlignment="Center" FontWeight="Bold" FontSize="18" Text="Artist"/>
|
||||||
<TextBlock x:Name="SongAlbum" TextWrapping="Wrap" TextAlignment="Center" FontWeight="Normal" FontSize="16" Text="Album"/>
|
<TextBlock x:Name="SongAlbum" TextWrapping="Wrap" TextAlignment="Center" FontWeight="Normal" FontSize="16" Text="Album"/>
|
||||||
|
@ -266,6 +266,17 @@ namespace unison
|
|||||||
hk.Activate(this);
|
hk.Activate(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void MouseDownClipboard(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.ClickCount == 2)
|
||||||
|
{
|
||||||
|
string CopyText = SongTitle.Text + " - " + SongArtist.Text + "\n";
|
||||||
|
CopyText += SongAlbum.Text + "\n";
|
||||||
|
CopyText += SongTitle.ToolTip;
|
||||||
|
Clipboard.SetText(CopyText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void InitHwnd()
|
public void InitHwnd()
|
||||||
{
|
{
|
||||||
WindowInteropHelper helper = new(this);
|
WindowInteropHelper helper = new(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user