C
C#2y ago
Jexs

❔ Hi i need wpf help

im following this article https://wpf-tutorial.com/xaml/events-in-xaml/ and i want to know why doesnt the text light up when i paste it in like it does in the example heres my xaml code so far (its my first one im doing a pratice to sharpen skills/learn) here is my full xaml code https://pastebin.com/gRimzLhj
Pastebin
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
8 Replies
Angius
Angius2y ago
What do you mean "doesn't light up"? You mean the colors?
Jexs
JexsOP2y ago
yea the code like Name doesnt turn red like it would when you typed it out in the example
Angius
Angius2y ago
Well, the code on the left is just on some website It doesn't have actual, proper syntax highlighting, just some CSS Your code on the right, I assume, is grayed out because you don't have the methods defined or something The code's highlighted, so hover over it and see what the issue is
Jexs
JexsOP2y ago
Thank you for the reply I’ll try that as soon as I can.
Alexicon
Alexicon2y ago
The reason you are getting the squiggly line is because you did not paste those properties inside the Grid's angle brackets. In the example its like this:
<Grid Name="pnlMainGrid" ...>
<Grid Name="pnlMainGrid" ...>
But in your code you have:
<Grid> Name="pnlMainGrid ...
<Grid> Name="pnlMainGrid ...
Angius
Angius2y ago
Ah, good eye, completely missed that
Jexs
JexsOP2y ago
ty so much! 😄
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server