WPF C# Professional Modern UI Music App Tutorial

preview_player
Показать описание
WPF C# Professional Modern UI Music App Tutorial a design inspired by spotify so this would be considered a tutorial on how to create spotify or how to code spotify using C# with WPF to create a professional modern flat ui music app using C# and WPF that looks like spotify and it works well in 2022 with source code provided in my Patreon

In order to use this to Stream music you can use a SoundPlayer and use the Stream property.

Docs

Рекомендации по теме
Комментарии
Автор

What can I say finally, a TRUE programmer, with some funny sparkles here and there, keep it you're doing a great job.

DavideGarbetta
Автор

If your here in 2023 then make sure to get old version of restsharp (the one he has) then go to spotify developer log in, create new app then look for client id and client secret in basic information then run in a python shell and make sure to fill out the CLIENT_ID and CLIENT_SECRET then it will return you a token for your app!

import requests, datetime


'''
Implementation of Token class for gaining, storing and verifying Spotify developer
tokens. Using text file to store; explore databases for production code.
'''

# Enter client ID and secret from developer console; store in .env or similar
# for production
CLIENT_ID = ' '
CLIENT_SECRET = ' '

class Token:
# Token class will try to load an existing saved token rather than
# send unnecessary requests; at scale this would improve performance
def __init__(self):
self.__token = None
self.__time = None
self.load_token()
try:
if self.__time + datetime.timedelta(hours=1) < datetime.datetime.now():
# token out of time; update
print('Token out of time')
self.get_token()
else:
print('Token up to date')

except TypeError:
# token time is not a datetime object; update
print('Token time format incorrect')
self.get_token()
self.save_token()

def get_token(self):
headers = {"Content-Type":
body = {
"grant_type": "client_credentials",
"client_id": CLIENT_ID,
"client_secret": CLIENT_SECRET
}
response = requests.post(endpoint, headers=headers, data=body)
self.__token =
self.__time = datetime.datetime.now()
self.save_token()

def save_token(self):
details = self.__token + ', ' + (%H:%M:%S.%f)")
with open('token.txt', 'w') as file:
file.write(details)

def load_token(self):
try:
with open('token.txt', 'r') as file:
result = file.read()
result = result.strip().split(', ')
self.__token = result[0]
self.__time = datetime.datetime.strptime(result[1], "%d-%b-%Y (%H:%M:%S.%f)")
except FileNotFoundError:
# no token file saved
print('File not found')
self.get_token()
except ValueError:
# token file corrupted
print('File corrupt')
self.get_token()

def token(self):
return self.__token

def time(self):
return self.__time


token = Token()

print(token.token()) # access your token

octopro
Автор

yeah. Finally a channel that has a lot of sweet c# tutorials. I really appreciate your hard work. Please Upload more c# tutorials for beginners and intermediates. :)

kingoffline
Автор

i regularly check your channel for uploads. love the content man!!! <3

Dexter_x
Автор

you literally save my life bro, respect <3

DavinGuccith
Автор

You're so professional in 'nested' styling. Can you add a video about it? I know that it's likely not very hard, but on your level it seems like that, you're so fast in it, maybe too fast for a tutorial, but you're great.

DonaldFranciszekTusk
Автор

WE NEEDED THIS!!!! Especially after spotify refusing to let people cancel their subs lmaooo

Worthical
Автор

Great video! just something to mention if you've run into an issue called "ProtocolViolationException". Just try to not include your "request.AddHeader" in your code. That solve the issue for me.

meidan
Автор

hey man, i loved your video, keep up with the good work

bomfanti
Автор

fantastic content! i hope there will come more!!

aeronexus_test
Автор

Great tutorial, thank you! However, I have a question: I styled a scroll bar as you explained, it is themed and displays the current scrolling position, but it isn't clickable. I can't scroll the list by dragging the scrollbar indicator by mouse. Furthermore, it doesn't show up and down arrows (which isn't a problem, actually). My question is how to make the themed scrollbar fully function? Thank you!

mrusakow
Автор

Hey man, I love your teaching style.
Please make more videos!

Is there anyway you can do some on LINQ, EF, etc.
You know all that fun database stuff?

justin
Автор

really cool stuff. totally appreciate it.

sumitevs
Автор

Bro where's the cat as what you said in beginning 🙀. Great tutorial.

fluffymaverick
Автор

Can anybody please guide me here? When making templates, I can't figure out what should I write after what? where do I learn this stuff?

samad
Автор

why do we need to style the ListItemView inside ItemContainerStyle of the ListView, we can straight away style the ListItemView, i tried and it worked the same way, could please explain why did you do this?

GAGANDEEP
Автор

Could be nice with a Updatede version of this.

legnddk
Автор

I did the same code as you did. But there is 1 error "XDG0062 Request failed with status code Unauthorized" Please resolved this...

mehmudmalek
Автор

Awesome Video, Request: can you make a video on MVVM?

rajasmahadule
Автор

Heyo, very helpfuly video man !
I watched your last WPF videos and improved a lot because of you.

Anyways this time i got a problem. When i copy and paste the code on quicktype it always says "Unknown character '{, expecting end of file." I cant really find out what i'm doing wrong here :/

ViscoRecordsMTA
join shbcf.ru