Showing posts with label we're. Show all posts
Showing posts with label we're. Show all posts

Wednesday, February 4, 2026

Convert VS Code themes to Visual Studio

in this video we're going to convert a
vs code color theme to visual studio in
a few easy
steps we start in vs code by making sure
that the theme we want to export is also
the one that's
active then using the command pallet
we're going to invoke the command for
generating a color theme from the
current
settings that will generate a huge Json
file with all the color Tok tokens from
the theme so all we have to do now is to
save it on
disk back in Visual Studio 20122 we're
going to create a new extension project
I'm going to search for V6 and select
the empty V6 project
template let's call this project my
theme in the project I can now add an
existing item and in the dialogue select
to show all files so we can see the new
Json C file that we exported from vs
code
that brings it into my project and I can
now right click and say convert to
visual studio
theme it will produce a code behind file
a package St this is the visual studio
theme file format and all I have to do
now is to register it with the V6
manifest so I'm going to open that file
and click the assets Tab and select a
new vs package then point to a file on
the file system and notice how it
already suggest the package that file
that was generated for
me I can now test by hitting F5 to open
a new instance of Visual
Studio when I go to the tools menu I
should be able to see my new theme show
up and clicking that will select it and
show it right
here this works for any vs code color
theme all you have to do is to install
the vs code theme converter extension
into Visual Studio that enables the
conversion of the Json C color theme
file into the package def
file this is what makes it all so easy
you can get that extension for free at
the visual studio Marketplace

Create Your First Application (2 of 18) Building Apps with XAML and .NET MAUI

this time we're gonna get started
writing an actual application I'm super
[Music]
excited hey everyone welcome to another
episode of Visual Studio toolbox I'm
your host Leslie Richardson I'm your
co-host Robert
Green and welcome to part two of our
series on getting started with zaml and
Maui super exciting in the last episode
um we're joined once again I should say
by Paul Sheriff hey Paul hey yeah in the
last episode we gave a brief overview
about what uh Maui and zamel are and why
they're worth your time and this time
we're going to get started writing an
actual application I'm super
excited yeah that's right we're
basically going to kind of delete the
default template that Microsoft gets us
in preparation for building our business
application we're going to learn a
little bit about content page and the
shell and that'll be kind of what we
dive in on this particular episode cool
Sweet let's do it all
right so the default template that they
give us as we saw was that little robot
and we're going to go ahead and just
basically kill all of that code in there
and then all I'm going to do is put
in a
label now when you're building these
things you can just type and you see we
get really great intellisense
here and they have different attri that
you can add to each one of these
elements here so we can set the font
size now I really like this instead of
actually specifying a font size like 22
points or 24 points or whatever they
gave us some really nice demonics here
for different sizes so that to me is
really cool now if you've used any other
version of zaml you probably Ed some
things like you know Center left and
right vertical and horizontal alignment
well now we use what are called vertical
options and we can use centering or we
can do left or fill or sorry sorry
centering ending or starting or filling
and by the way you see this Center end
fill and start you see the center and
expand end and expand those are actually
obsolete those will be going away so try
not to use those at this
point all right and there we go so now I
have created a label that's going to be
centered Within the content page and
that's that main page that we're on
right
now now this isn't going to work because
there was a little bit of code behind if
you remember I clicked on the button and
the button then incremented that code is
in the code behind back here so just
like most things with Microsoft you
double click on there and you can
actually get back there if you're on
this here you can actually hit F7 if
you're using the default keyboard you
haven't changed it because obviously we
can change everything in visual studio
and I'm going to delete delete the
counter and I'm going to delete this
little click event here and again if
you've done any sort of programming with
Microsoft in the past you're familiar
with all these click events and things
like that but I'm going to we're going
to cover a little bit more about those
later for now let's just go ahead and
get rid of that so now what I've done is
I've just simply created a label on this
page that's going to be centered and I'm
just changing it so we can get started
building our application so this is what
called the content page this main page.
zaml okay this is a Content page type
and all it does is allows us to host
other controls so you can see I've now
eliminated all the stuff that's on the
template and I simply have a label now
that's in a large font and centered
horizontally and
vertically pretty
simple now notice up there you see the
home right here right okay so some of
the things that we can do is we can
actually add a
title like so and if I then just go back
here and come back you see the title has
indeed changed okay so what's neat is if
you kind of
just you know get your screen a little
bit here let me just go a and take that
away for now if we can if we start
changing things
okay and then as soon as you move off of
it you can see how it changed actually
don't need to move off of it it just
pause for a second and you can see it
changing over here on the live screen so
this is what's called that hot zaml
reload and this is really nice in Maui
because in WPF we actually have a
designer window where you can see things
but here we don't okay
yeah yeah and it's nice because I think
it makes it easier to experiment with
different layouts and stuff especially
if you're not necessarily as well versed
in web design so yeah gives you the the
space to try new new things without
having to wait for every you don't have
to stop the app start it go back to
where you were you can just be on that
page even if you're 10 screens deep into
the
application exactly yeah it's awesome so
that works on the emulators too doesn't
it correct it does so you know if you're
doing one the Android if you're really
targeting Android you want to use one of
those emulators that we talked about
before it sure it still works just as
well there might be a couple things like
if you're designing a list and you're
doing a collection view or something
sometimes those you might have to
restart but for the most part it should
work pretty well yeah for Pure UI it
works great correct now you can type
directly into the zaml here you can also
bring up your properties window and when
you you
know click Within one of these controls
it'll tell you the type that it is up
here and then you come down you could
actually find the
title and once you hit enter it will
actually put it into the zaml for you so
you do have a couple of different ways
that you can go about doing this other
things we could do we could change the
background right we could maybe make it
a gray color so you can see it's gray
now right so all we're doing is change
in things about this main content
page now what about this little part up
here right so this is the typical
Windows stuff that we're used to right
the title bar we have the minimize the
maximize and the close this is what's
called the shell now you're not going to
get this on an iOS or an Android right
but the shell is actually controlled by
the app shell. zaml file that we see
right here if we bring this one up okay
so we could add a title on this guy as
well all right come on fingers work and
now you can see the title up here on the
Windows title bar has changed okay now
it's not like you have to do this you
know you don't it depends on kind of
what you're targeting and what you want
um and but what's nice is you have the
differences here where you can
actually the title on the shell and the
title on the content page can be
different okay you know if you don't
want the background cool that's easy all
right um on the
shell there's a couple of ways you'll
see that you can do this you could
actually set the title like we did you
can also do
shell. title color you could set that to
Blue okay so now you can see the uh blue
here okay or you could do black I make
it show up a little better all right so
the shell also controls certain
things
okay about the shell and or that content
page so here you can see I've now
changed that background color on the
shell to gray okay so lots of different
things you can do here I don't really
want those right here I just kind of
wanted to show you some of the things
that you can do okay
all right and again once again if you
bring up you do the uh what is it view
properties I don't know where it is
anymore name everything moves all the
time properties window there we go so
again when we're here in the Shell okay
we can bring up these property wind you
know this property window and we can
change things within here too sometimes
it is actually easier to do things in
the in the properties window I don't
know if you guys find that but sometimes
it just is so I find that I
never use that but every time I see it I
think I should use it more I'm kind of
the same way but you know you and I kind
of got weaned on zaml back when we were
using visual
notepad exactly but it's a great way to
see all the properties in one place so I
think that's helpful if you're trying to
learn more about what the things you can
do absolutely I I really like that that
that to me is kind of fun but you will
find sometimes when now you know items
aren't really applicable here but if you
are adding some items okay and we we'll
talk more about this later but some of
these are actually pretty easy to do as
opposed to having to remember how you're
supposed to do it in the zaml right so I
do like some of these you know um these
various designers that they did build in
so when you're doing some of the items
and for this one and this will change
based on which control you're using here
it's it used you can see there's a shell
content okay and if you drop down this
you'll see that there's a shell item
okay but there are some other types
depending on if you've maybe loaded in
some thirdparty uh software that you
know maybe gives you some different
widgets that you could add in so that's
one thing I really like about using the
properties window sometime is some of
these different designers yeah so yeah
all right cool
so another thing that I kind of wanted
to to show you really quickly here and a
couple of different things actually so
you can see there's a couple of
different uh there's a zaml live preview
window okay there's a live property
explore that you can see here okay so
when you're when you're on this Explorer
now let's go back to the main page
here okay and why is this not refreshing
here did it
not and I thought it was
refreshing it is no name come
on all right now it might be hold on
okay there's a couple things I wanted to
show you this one may only work when I
turn on another options this is one of
the options I did want to kind of point
out here too so when you're working in
here if you go to debugging on tools
options and you go to debugging there's
the zamel hot reload
lots of options you can turn off and on
within here so I wanted to show you this
so again if you want tools options
choose debugging hot zaml reload one of
the things you can do is you can enable
just my zaml in the live visual tree so
you'll just see your stuff you won't see
any of the things that come from
Microsoft you can also enable the inapp
toolbar so let me click okay on that and
look what happens above your right below
your title bar here you get all these
different things so you can go to to the
live visual tree and you can scroll down
and you can actually see how things are
running this is cool it's like one of
the newer additions right to the Maui
space toi yes yeah so cool just like
makes it a lot easier to explore
relationships it really does it really
does um you know I like the live preview
that's kind of cool you can do some
things with that that but I use the
inapp toolbar a lot because especially
to kind of drill down if I go into this
live visual tree you know you can look
at different things here which I think
is really slick um so once you do this
if you then um let's see bring back up
that
uh live preview oh did I close it I
closed it I apologize where is
it it's so hard to find everything
sometimes isn't
it oh my God so the live property
Explorer
so let's open this guy
so this guy is this the one that does
this I thought this was the one that
updated here am I thinking of the wrong
I think I'm thinking of the wrong thing
I apologize there are so many
windows as you can see so but if you
focus on this little area right here
okay we have the live visual tree which
we're seeing over here on the left hand
side that live property when you click
on something it's supposed to show you
all the different uh things and what
their values are we have the zaml live
preview which we've seen okay and then
there's also the zamel binding failures
this is I love this we didn't have this
years ago we used to have to just pick
the uh select from the output window and
you could see which bindings were bad
and we're going to talk about binding a
little later on in this session but if
you've ever worked with zaml and you've
tried to find out your binding this
window is Wonder wonderful for finding
those so these are kind of the windows
you use a lot for uh your zaml and
that's Works in you know all of them
right Maui WPF all
those so you can select an element from
here which is really kind of neat okay
once you select an element it'll show
you it'll actually update over here you
can see it move to the app shell okay so
when you're selecting an item see how
it's moved down here to the list label
right it takes you right to it that is
invaluable a lot of times as well so so
selecting an element there's display
your layout adorners if you had any we
don't have any on this particular one
yet um we can track which one is the
focused element so if let's say we have
a form and you have many data entry uh
things as you're moving from one to the
other it'll keep track of which one's
focused and it'll update your live
visual tree for you um I don't have any
binding failures because I don't have
any bindings at this point so even the
scan for accessibility issues now have
either one of you tried that I've never
tried that one I've seen it been uh
demoed before and I I think it's pretty
it's pretty nice especially when you're
working with uh frontend experience like
this and um yeah just being able to get
that double check to see if you're what
you're doing is still accessible it's
really nice to have we need that on the
web don't we yeah
okay so anyway I wanted to point out a
few of those windows because those are
really neat I mean a lot of these are
kind of newer uh to Maui some of them
been around though for a while in you
know WPF some of them are even newer for
WPF or they've been updated which has
been really nice so now I wanted to show
you one thing let's go ahead and stop
the application again and I'm going to
run this one more
time and when this comes comes out now
it does you know again it kind of does
take a little longer for this thing to
kind of come up you'll notice that with
Maui apps it's it gets better as as time
goes on as it loads it a few more times
but you'll notice how the window does
not come up full
screen now if you're in WPF or anything
you know like that you know that you can
usually just set a window maximized
property that's not the case here but I
wanted to show you how you can actually
get it full screen now full screen
really only applies on Windows though
doesn't it because if you're on iOS or
or you know uh Android there's no such
thing it's the full screen always all
right so what we typically have to do is
down here in our Maui program what we
would do is we would do a hash if
windows and inside of here we would have
to do a using statement on the
microsoft. Maui . life cycle
events and you want to wrap it into hash
if Windows because we only want to have
it compiled when we're running on
Windows obviously okay because we only
want to bring that in that Microsoft
name space when we're on
Windows then what we can do is I'm going
to bring in a whole set of code here
let's go ahead and scroll down I'm going
to go ahead and bring this up a little
more full
screen all right I've wrapped now
another hash if here around this set
window options okay so this is a method
that I wrote that is just some code you
can find this readily on U the web
you'll find how to set these handlers
they're called these Maui handlers what
we're going to do is we're going to pass
in the Builder okay what's the Builder
well you can see right up here we use
this Maui app. create Builder to
return a Maui app builder to us and this
is how everything bootstraps right this
is and they do this on MVC now they do
this on the minimal web API most things
now work with these Builders this is the
first program the the first class that
runs this Maui program and then it runs
this create Maui app method and it
builds a builder and then what I want to
do is pass that Builder down to this set
window options and I'm going to now
configure sorry about that I'm now going
to conf figure some life cycle events
and the way that this works you don't
have to understand everything that's
going on in here what's important is
that we're going to get past a handle to
the window okay the main window and
there's only one at this point the main
page.
zaml and what we're going to do is we're
going to get some native window handles
so we're actually making what is this
this is like Windows API calls here
aren't they right so we're dealing with
handles all right so then it's you know
even a window 32 Windows ID look at that
oh my gosh we're going way back okay so
PE buddy just uh turned on the Wayback
machine Robert gets that Lesley's like
what no I've used the Wayback machine
before did you get that okay all right
cool all right I like
that around too okay all right so as you
can see what I've done is what I'm what
I'm getting here is this variable P okay
and this P allows me to do things like
maximize I can set whether the window is
resizable or not I can set whether it is
is maximiz or not and is minimiz so this
is code that is only going to get
compiled in if we're running
Windows and then we simply need to call
this from up here so somewhere after
you've created the Builder so after
you've created this Builder go ahead and
again wrap it within a Hashi Windows
call your set window options p passing
the Builder it runs through this sets
the maximize so that now when we
run the wind the main window is now
going to come up full screen so it
depends on whether you want this or not
but this is customizable by you just by
doing what these these little uh handle
handlers are so there we go
voila that's little trick it's kind of
nice and you know you'll find that for
other environments like if I hashif iOS
or hash if Android things like that
there's some other things that you would
do like there's some what they're called
on platform uh uh attributes that you
can add to certain to things like Styles
and things like that so that you can set
a style just for Maui just for iOS just
for Windows so there are ways to
customize this for the different
environments that you're going to be
running
in cool I like it yeah kind of
neat so that was a pretty good start to
our application so what's up next Paul
yeah so just a couple more things though
that I'm gonna talk about right here
before we then move on to our next
section but uh just wanted to kind of
talk a little bit about you know this is
our project the project has in what are
called properties these are our launch
settings but there's really not much in
here that's configurable you're not
going to do too much in here right now
the platforms I wanted to talk about you
know these are the different resources
for things like colors on the Android so
they have given us defaults Microsoft
gives us these defaults that will work
on Android on iOS okay whether you're
running on the Mac Catalyst okay and
windows of course right so all these
things are just built in which is nice
and then for our our Windows here right
we've got app icons we've got some fonts
we've got images there's that little net
bot guy that we saw um and then Styles
and we're going to talk about Styles a
little bit later as well and then the
last file here that we haven't talked
about is app.
zaml and this is where we're going to
actually create resource dictionaries
and put some Styles and again we'll be
covering that in a later section but at
least now you know kind of what's in
this uh this project to
start
great well I'm excited to see more
right so in our next section what we'll
start doing then is we're going to start
building a little user detail screen and
we'll add that on and and then we're
going to add some styles to make it look
good um we're talk about you know using
some very elastic controls so remember
we talked about how we want to keep
things flow layout so it's hardcoded as
far as top left right and all that so
that's the kind of things that we're
going to just start going little by
little and building up here great cool
yeah so tune in for part three of this
uh very cool series on getting started
with Maui and zaml and until next time
happy hoding
y'all

Dates, Times, and Drop-Down Lists (10 of 18) Building Apps with XAML and .NET MAUI

today we're going to continue building
out the UI of our app and we're going to
look at dates and times and drop-down
[Music]
lists hi welcome to visual studio
toolbox I'm your host Robert Green and
I'm your presenter Paul sheriff and we
are continuing on in our 18p part series
on building apps with zaml and Maui and
as you may have noticed lesie is not
with us she's unable to make the second
half of the recordings so it will just
be me and Paul but since Paul's the
guest we promise it'll be just as
exciting so previously uh we looked at
switches and radio buttons and today
we're going to continue building out the
UI of our app and we're going to look at
dates and times and drop-down lists
that's right very cool stuff should be
pretty fun so so what we'll do is we'll
switch over to the screen here and we're
on our user information screen we're
going to keep adding to this screen here
I'm going to add one more additional row
and then we're going to go down here to
the bottom like we've been doing we're
just going to insert some areas here so
I'm going to
change these two rows here so we're
going scoo those down and then we're
going to add another
label and we're going to add what's
called a date picker so the date picker
as you kind of expect is one that looks
like just a regular calendar that will
pop up on the screen now this is on
windows so if you you know bring this up
on your Android or your iPhone it's
probably going to look a little
different right it might have those
little things just scroll through to
figure out date and then the uh you know
the day the date and then the year so it
might look a little bit different
depending on the operating system that
you're running on yeah because we kind
of didn't we didn't talk about the
architecture of how all this works but
basically you
write s just as you write HTML and it is
nothing more than the instructions on
the renderer some rendering engine on
how to draw a page zaml is essentially
the same thing and when you build the
application um behind the scenes Visual
Studio is building a native Windows app
a native Android app a native iOS or Mac
OS app so you're going to get the native
control so there will be differences you
just write the ex once and then
sometimes you got to wait and see what
it looks like on the actual platforms
and then you may have to adjust as
needed right so basically they're just
taking that zaml translating it to
whatever the real code is that will
actually run on iOS or Android or
whatever yeah y so all right but this is
kind of nice you know we have a little
uh date picker here so you can choose a
date and then you know of course it
updates the screen and then in a little
bit here we're going to talk about Act
doing The Binding back to a an
object all right so there's a date
picker let's now go up and add yet
another row so all I'm doing is just
changing those row that row definitions
attribute and I'm just adding on an
additional row and most of them are
going to be Auto all right if you have a
list which we'll talk about later in
this uh series we'll probably start
using the asteris to say take up the
most room for that particular list but
for now we're just going to stick with
the
auto so by adding another one that means
down here I'm going to be able to insert
right after the birth date here A Time
picker and then of course I'm going to
increase these rows here by one and now
this actually does look very similar to
what you might see on iOS or
Android this little time guy here right
so you can choose from the different
columns here you can move up up and down
and you can choose AM and PM and you can
just choose whatever time that you want
you click on the little uh check mark
there and that says accept it otherwise
if you'd made changes and everything you
canel it it just stays where it
was all right so time picker we have
date picker and then I'm sure a lot of
you have been doing development for
quite a while and so we always have some
sort of drop- down list where we want
the user to be able to choose
values so we going to give them a list
of values and they're going to choose
one so again I'm going to go back up
here go to
auto and once again we're just going to
increase everything down
here we change this one to 11 this one
to
12 like I said I really hope in the next
version they're going to give us a
little more help on that
so all right so what I'm doing in this
one is I'm adding label as you can see
here on lines 103 and
104 and then I'm using the flex layout
again so I wanted to be aity to have an
entry area and then a picker right so
now the Picker you'll notice that I'm
getting these squigglies here and the
reason why is when you add a picker and
it's got this hardcoded array you must
stop and restart in order for that to
take so if that ever happens to you
you're going to if you see those little
squigglies you just got to restart so
that squiggly is just a hot reload thing
it's nothing wrong with your code you
got it got it yeah so if you're you're
dynamically adding things you're getting
squiggles and you know that that code is
correct it probably just means you got
to do a you know the hot reload isn't
gonna be able to reload that guy so
you're gonna have to restart and then a
few episodes ago you would talked about
the difference between just writing the
straight zaml and using the property
windows so is this a perfect example of
when instead of doing picker. item
Source xarray type equal and then
wrapping all the values in strings that
you could do that more easily with the
properties
window you know I haven't tried that one
that's a really good question let's
actually go here let's bring up the
properties's window I always just write
the actually I never write hardcoded
stuff like
this um I mean but if you doing a
prototype or something you might want do
something like this right so what you're
asking really is could you come in here
and actually go into the items and add
something so I'm I'm sure you can uh
let's see if we do an ad here no see it
doesn't work on the items okay
interesting might on the item Source
let's see okay so let's see
here well I've not seen any direct way
to do it here it's just giv me an object
and the object itself isn't really going
to work for us because we need this for
okay yeah good good question though and
that that would be normally something
that I think you could do um I typically
used it like in WPF when I was building
uh menu items and things like that I
found it pretty helpful um but tell you
the truth I don't really use it a
lot pretty much stick in the zaml which
is I think what you do too sure but
that's how we grew up uh doing that's
right did we ever grow up Robert come on
no that's what we have SP our career is
doing let's put there we go that's
that's a better good
point all right so let's go back here
and so what I wanted was I wanted this
ability to have an entry screen entry
area here and so I can type in a phone
number for
instance and then I wanted to drop down
so the user could choose hey what kind
of you know phone number is this right
so is it mobile is it home is it other
and you see those values here now being
represented here in this picker or drop
down
list right yeah so and the reason I use
a flex layout is I didn't want to use I
didn't want to have to have the grid
three columns I think I mentioned this
before I find it better if you stick
with just two columns for entry screens
if you have more than you know two
things that you need go to this Flex
layout because then if if for some
reason it needs to you know wrap and I
don't think I actually put the wrap in
here on this one so we do Wrap like
so okay and then let's see direction
would be
row and that way it could push this
underneath I think that's another one of
those I got to restart but you get the
idea okay okay so anytime you have more
than one thing in that second column use
the flex layout and that's going to give
you the most flexibility and so so
basically if you narrow the
screen then instead of being off the
screen and not visible that picker would
just flip down below that phone number
okay just like these check boxes did up
here if you remember those were also
wrapped within the flex layout you can
see here yeah so I think the wrap and
the direction I think that has to be a
restart on that or could even just be a
hot reload uh I think it's a a restart
type of
situation so you just want to you know
make sure you're always putting that in
if if that's something that you need I
personally like I said never go beyond
two so I I do use this Flex layout quite
a bit
so all right let's try this out this
should actually give us what we're
looking for here oops there we go let
see mobile
one that oh oh you know what it can only
go so far see look at this it's on the
same here okay so which means that it's
determining that the minimum width is
you're fine basically because that I
mean there's no way a phone's going to
be less than about like that okay right
so so in this particular case it didn't
need it which is great but you could see
let's say if we added a little bit more
room to this right I did a minimum
request here you know if I if I move
this out a little bit maybe it will
cause it to
wrap and for some reason boy it's just
not wanting to is
it so well I I you know I think it's
just one of those things where it's
termining that hey you know what we're
fine but y we'd again have to check with
that and well main thing you try it on
your Android or your iOS and make sure
right cool all right great so there we
go date Pickers time Pickers and those
uh uh drop- down lists which is just
simply called a
picker excellent and then of course
there they come with all kinds of
properties so you can set default values
and you can that's correct absolutely so
you can see on the time I did re I did
set the default time here to 6: am y you
know you can do the same thing on the
date picker you can set the date
property and then maximum date minimum
date Etc oh yeah so if you're doing a
some type of thing where you can only
enter a date that's a week from today
you can set the minimum date to today
plus s Etc you got it and again let's
say you wanted to do something a little
more than Dynamic you don't want a
hardcoded datee in here or hardcoded
minimum and maximum date right that's
one of those times when you would name
this control yep you know the date or
whatever yes yeah because then in the
back you know in your code behind you
can actually use C to say the date. DAT
equals date time. now for instance right
you know and minimum date could be you
know today's date and maximum date could
be plus you know 30 days or something
sure so cool yeah so anytime that you
need to find yourself going to write
some code to dynamically set things like
maybe you want the time you don't want
to default it to 6: am you want it to
whatever the time is right now or the
nearest hour to that right again give it
a name and then in the code behind which
we're going to talk about little bit
more code behind here coming up that's
where you would then be able to set
those particular
values excellent y all right so what's
in our next episode so coming up next
we're gonna actually start talking about
data binding which will be great um
we're gonna kind of got a couple of uh
versions of data binding we're gonna
look at the first one is actually going
to be just kind of binding controls to
controls so like on the screen you want
this control to affect how this control
works we'll talk about that and then
we're going to talk about creating C
objects and binding those
to our UI cool can't wait all right all
right so thanks for watching and we will
see you next time on Visual Studio
[Music]
toolbox

Debugging Tips and Tricks Part 2

>> On today's Toolbox,
we're going to continue
fixing the app we started
working on last week,
and Leslie will show us additional
tips and tricks for debugging.
Hi, welcome to Visual Studio Toolbox.
I'm your host Robert Greene,
and joining me today for part two of
our debugger tips and tricks
is Leslie Richardson.
>> Hey there.
>> Hi, Leslie.
>> Hi.
>> Welcome back.
>> Thank you.
>> You haven't changed a bit since
we recorded the last episode.
>> I know. It was almost like it
like happened five minutes ago.
>> Almost.
>> Yeah.
>> So refresh our memories,
what did we see in part one.
>> Yeah. So in part one, we talked
about a lot of different things,
from Run To Click, set
to .NET statement,
Text Visualizers, DebuggerDisplay
which is my personal favorite,
and of course,
conditional breakpoints,
tracepoints and the list goes on.
>> Cool. So what are
we going to see today?
>> So today we're going to see
a lot of different things,
including some of
the new 2019 features like
Search for the Watch window,
manage data breakpoints.
>> Okay.
>> Then other little things peppered
throughout in the Watch window
such as return value,
keywords, and format specifiers.
>> All right. Cool.
>> It goes on.
>> All right. We're
using the same app.
>> Yeah.
>> Which in spite of
the fact that we've
spent all last week fixing it,
still isn't 100 percent correct.
>> Yeah. Still many, many problems.
>> We like to mimic
the real-world in this show.
>> Fair enough. Yeah. So again,
as a refresher, this is
the same app as in part one,
but it's an app that
will randomly give me
a list of books that I can choose
to read and add to my shelf,
or I can choose not to read it and
it won't be added to my shelf.
So there's several more bugs
that we didn't
fix last week or throughout
the week either,
so they're still here.
So let's investigate those.
So I'm going to add a book,
in this case, this book called
Middlemarch to my shelf.
When I click on it, one of
the problems I have been
experiencing revolves
around this String
here that says that I've
read the book one time.
>> Already. Wow.
>> Yeah, already. I know. I
haven't even heard of the book.
>> That leads you to where to
get to your 100 books done.
If you just click it, it
will mark it as read.
>> Yes. There I already read it.
>> Then I'm going to predict
that that date is an issue.
>> Yeah. That date is also an issue.
>> Looking ahead.
>> Lots of problem is going on here.
>> Okay.
>> Yeah. So what's supposed to happen
is when I select 'I
finished this book',
this value should increment by one.
It's already saying I read one time,
which is ominous in and of itself.
>> Okay.
>> So if I say that I
finished this book,
it should jump from one to two,
but if I do it in this case,
it's jumped from one to four.
So either I subconsciously
read this book three more
times in the last three seconds,
or there's something going on
in Visual Studio and my code.
>> Then the date changes.
>> Yeah. All right.
So let's see if we can
fix that problem of
reading it three additional
times out of nowhere.
>> Okay.
>> So I'm going to
set a breakpoint at
the start of my index function here,
and that will hit when I
go back to my shelf page.
From there, I want to hone in on
that specific book which
was called Middlemarch.
I can't even remember the title
and I read it three times.
So from there, instead
of simply expanding until
I find what I want,
I can use the brand new
search tool available and
the Autos, Locals, and Watch windows
for our Visual Studio 2019.
>> Oh, yes.
>> So from here,
I'm going to do Middlemarch,
I think I can just say middle.
As you can see, I'm directly
taken to where I need to go.
>> That's so cool. Again,
that is new in 2019.
>> Yeah. It is brand new.
>> Now, I remember correctly
you wrote a blog post on that.
>> I did. I recently wrote
a blog post on that,
where you can go to
aka.mswatchwindowsearch,
and then check it out.
>> Cool.
>> For more detailed info.
So from there, I have that.
You'll also notice that
as I start typing,
it will automatically
start highlighting for me.
So in the case you don't want
to execute the full search,
you can just type away and
if it's visible on screen,
it will start highlighting
and you can find things
that way as well.
Especially, this is
really nice if you have
a bunch of items in
the Watch window at a time,
which can save you
the trouble of having it all.
>> Does that do both the
name and the value?
>> Yeah. So you can search for name,
value or type if you wanted to.
>> Okay.
>> So if you just wanted
to see all the types,
I can search a reading list and
as you can see I'll start going.
>> Okay. Cool.
>> All right. So from
there I have Middlemarch,
and I'm specifically interested
in a property that this book has
called timesRead and
this is the property
that's supposed to increment
every time I finish it.
So I'm going to go into timesRead,
and this time I get
a notification telling me
that it couldn't be found,
but luckily, it's giving
me the suggestion to
bump up my search depth
to a larger number.
So I'm going change the search
depth here to three,
so that I can search more thoroughly.
>> Does it default to two.
>> For me I set my default to two,
but normally when you first download
Visual Studio for the first time,
it's set to three.
>> Where do you change
that, is that an option?
>> Yes.
>> Or just remember
the last thing you set.
>> Yeah, it will remember.
>> Okay. Got it.
>> So if you set your search depth to
10 and then you exit out of
the session if it's reading one,
it will remember that you were at 10.
>> Okay.
>> Yeah. I'm going to
bump mine up to three,
and then I'm taken to
that particular property,
again saving some time of having
to remember where that property is.
Now, the case that I'm
trying to deal with is,
why is this timesRead property
changing without my knowledge?
Normally, this is when I might
have to play some trial and
error and try to narrow down
where it could possibly
be coming from,
but I ultimately don't know
where that location could be.
So I can use something
called a data breakpoint,
which has existed in C++ for awhile,
but is brand new to manage
code users in .NET Core 3.0 in 2019.
So this is a breakpoint
that will allow me to halt
my code when a specific
object's property changes,
even if it goes out of scope.
So I'm going to use that in
order to track down the problem.
So I can right-click on
that property and then select
"Break One Value Changes".
I know that the data
breakpoint has been
created because I have
the standard breakpoint icon there.
>> Nice.
>> Yeah. Of course I
can see it along with
the rest of the other
breakpoints that
I have in the breakpoints window.
Then if I scroll up a little bit
to the top of this item,
an object ID has been created,
and this is how Visual Studio
will be able to keep track
of that object if it ever goes out
of scope while my program is running.
So from there, I'm
going to hit "Continue"
and perform the same action again,
and hopefully I get
some quick fast useful information.
Yeah. So this time I
get an a notification
telling me that my data
breakpoint has been hit,
with an added bonus
of telling me what
the previous value of
that particular property was,
and now what the new
current value is.
It'll also redirect me to
the exact location where
that change came from.
So in this case, obviously it's
coming from the property setter,
which makes sense, but ideally,
I'd like to know what called it.
So I can go into the call stack
and then just double-click here,
and then I'll be taken to
where that setter was called.
In this case, it's happening in
my get shelved book function,
which I don't need because I already
set the timesRead property
to be committed elsewhere.
>> Yeah. So you retrieve the list.
So the fact that you got the book
off the shelf is being
equated to reading it.
>> Yeah. Apparently.
>> Yeah. Okay.
>> That's what I did in
high school from time to time
if I didn't like the book,
like time to go to spark notes,
but I'll buy the book anyway,
just so it looks legit.
>> So there's
another blog post that you
wrote on this as well,
Managed data breakpoints.
>> There is, yeah. Yeah.
Definitely go check
it out at
aka.msmanageddatabreakpoints.
>> Managed data breakpoint.
>> Yeah.
>> All right.
>> Kind of a mouthful but.
>> We'll have these
in the show notes.
>> Yeah. Looks all good.
>> All right. Cool.
>> Great. So now that
I found the issue,
I'm going to comment out this line.
>> That is really
helpful because you're
now being notified when it changed,
and then go finding out why,
and then you get to decide whether
that's valid or not. Very cool.
>> Absolutely. So it can be great
in several different scenarios.
>> That can save a ton of time.
>> Right. Yeah. You
don't want to play
trial and error all time nonstop.
So this is currently a
Dynacore 3.0 exclusive
feature at the moment though.
>> All right. Okay.
>> So yeah.
You're going to need to get
3.0 and play around with that
if you want to check these
out in a managed code land.
>> Is it scheduled to make it
into framework or is that TBD?
>> TBD.
>> Okay.
>> We've gotten a lot
of feedback about that,
so it has not been forgotten.
We are acknowledging that
and go in from there.
>> Okay.
>> Cool. So going back and
performing that same action.
In this case, I'm going to read
some other book I've never
heard of called Mrs Dalloway,
but this time correctly it
tells me I haven't read it yet.
>> Okay.
>> So that's a good sign.
If I say I finished
the book and go back to it,
it's increased from zero to one.
So yeah, those are
data breakpoints and searching.
So data breakpoints again are
extremely useful for many scenarios.
In that case, I just wanted to
hone in on a specific object.
So it's great for that, especially
in contrast to if
you were to just set
a breakpoint on that property setter
where multiple objects
could be accessing that,
and maybe you don't want that.
>> Yeah.
>> It's also good if you have
a global variable
that's being accessed
across multiple files and things and
you don't know where
it's being modified,
and you can use that for this.
>> Yeah.
>> Or maybe you just inherited one of
your teammate's pieces of code
and you're unfamiliar with it,
but there's something
going on in it that's
causing a property to change
without your knowledge.
So then you can use
a data breakpoint to hunt it
down instead of having to play,
"Well, maybe it's in this area.
I don't know what
this piece of code does."
>> Yeah.
>> Let's try it.
>> Cool.
>> This type of deal. All right.
So from there, there's one last bug
that I want to deal with.
It's not so much of a bug, so much as
an added addition on my part.
But the line right
below read one times,
it tells me when I last
completed the book,
but I have a tendency to
read multiple books at once,
and can finished several books
in one day as a result,
so I'd like to know also
the exact time that I
finished it as well.
>> Oh, okay.
>> So that's currently not there.
So I want to go into Visual Studio
and see where I can add that.
So I'm going to set a breakpoint
at this line here that
returns that related String
about when I finished the book,
and refresh the page.
Just looking at it at first glance,
there's a lot going on on this line,
I have a nested function call
happening within a parameter
of an outer function call,
and then there's a property value
being fed, it's a lot.
So I want to break down
this line of code and
see what pieces of the String
are coming from where,
just so I have a better
understanding of what's happening.
So the first thing
I want to look into
is the Person.ToString function.
But as it stands now,
if I were to try to use depth into
or step-over or any of those,
there's not really a way to get into
that nested function from there.
>> All right.
>> So I can use step into
specific in order to
choose which of these function calls
I want to go to first.
>> Is that new in 2019?
>> No. This has been around.
Yeah. This is an old one.
>> Yeah. So it's been
around for awhile.
So I can right-click this line,
and I can go to step into specific,
and I'll get a dropdown with all
the different places I can go to.
>> Yeah. We need to add
a feature to Visual Studio where
when you hover over something,
it will tell you when
it first appeared.
>> That would be amazing, if
there is an extension for that.
>> Yeah.
>> It's like, Visual
Studio history extension.
>> Exactly. Yeah. Just for fun.
>> Yeah. So you can pull
your hair out wonder,
''How did I not know
about that seriously?''
>> You can load it over your friends.
>> Oh, man. Yeah. So from there,
I can select person.ToString and
just as if I were to use
the regular step into,
it'll take me into that function.
Yes, so super great.
So this one is pretty
straightforward.
It's just returning the
value of the parameter
that I gave it in which case
it was just my name.
So I'm going to step through
it and then step out.
Then I'm back to this line again.
So from there, now I want to look
into the FinishedToString
method here.
So again, using Step Into Specific,
I'm going to select that one.
Here, I'll be taken to
the FinishedToString method.
I have even more stuff going on here.
I have some string
concatenation going on.
So first, I just like to see what
is the exact return value
with this method?
But normally, in order to do that
because it's not currently set to a
variable at first, I
would think, Oh, great.
Now, I got to stop
debugging and set it to
an arbitrary variable and then
look in the Watch window or something
what that variable could be.
But another way that you can look at
this return value without
having to stop debugging and
do all that is to step to
the end of that function.
You'll notice that in the Locals
as well as the Autos window,
there is a line that has
the return key Word on it,
and that will tell you exactly
what's being returned
by that function.
So that happens by default.
So you don't have to do any other
additional leg work in order to
see the results of something that's
not set to a particular variable.
Another way that you can do this
is also in the Watch window.
So I'm going to add dollar sign
and then ReturnValue,
and then I get that same result.
>> Okay, cool.
>> So the added bonus
about being able
to do that in
the Watch window is that,
I can also add
format specifiers to it,
which are things that allow me to
temporarily view the contents
of the Watch window
in a different light.
So if I wanted to remove the quotes
around the string for instance,
because they're
redundant at this point,
I can add a comma to the item
I have here and I'll get
this dropdown which is new to 2019,
with a list of different
format specifiers I can use.
So instead of having to
memorize the giant table
that you'd have to look up online,
it'll give me some options
right off the bat.
So I'm going to select nq,
which stands for
string with no quotes.
Hit "Enter" in that
will enable it to pass.
>> That's just in the Watch window,
you're not actually
touching the running code.
>> Correct.
>> Okay.
>> I'm not filling with
the code itself at all.
Yeah. So great.
From there, I now want to step
into yet another function,
I have this finished
book string here.
But again, I am
now under scope because I've
reached the end of the function,
so I need to get back to it.
I'm going to use that to
next statement again.
There's several ways you can
use that to next statement.
I can actually drag the execution
arrow up if I wanted to,
instead of holding down the control
key, like I did previously.
So from there once more,
we're going to use
Step Into Specific,
and I'm going to select
FinishedBookString.
Here, I'm being taken to
yet another function with
more string concatenation going on.
So let's say, I wanted to
break down this line of code.
So I can use ReturnValue again.
Again, I'm going to step to
the end of the function.
This time, I have
the final result here, of course.
But if I wanted to break
it down even further,
then I can do that as well
by adding ReturnValue,
I can do ReturnValue1.
Now, give me the result
of this.Title.
If I wanted to get this last
read date thing over here,
then I can also do ReturnValue3,
and that will give me
the value of these two.
>> It's interesting.
>> This also goes for
if you're looking
in the Locals and Autos windows,
it will surely do things like this.
>> So why do that rather than just
if hovered over this .Title,
it shows you that information.
All right. If you hovered
over ToShortDateString,
it shows you that.
>> Yep.
>> You can also add those
to the Watch window.
So when would you list
the value of being able
to specify ReturnValue1,
ReturnValue3?
>> It's just another variation to be
able to look at what's being
returned on top of that,
you're doing it in the Watch window.
You can mess around with
the format specifiers and stuff,
and just keep everything
grouped together.
I like to say organize though.
I'd prefer to just have
all the ReturnValue group together.
>> Okay.
>> So all right.
From there, I have found where I can
add my time-related scenario
because I have
this ToShortDateString function
here that I don't need
in order to show
the full time and the date.
>> Right.
>> From there, I'm going to
continue running my code.
>> That is known as
edit and continue.
>> That it's edit and continue that.
Yeah, that's a magic that
sometimes it works,
sometimes it doesn't.
>> Yeah.
>> This is a scenario where it
should work because if
I refresh the speed.
>> I remember when
that was introduced.
>> Okay.
>> That's amazing.
>> When was it introduced?
Because I think that was interesting.
>> But they told you
then I meet to date
and I had to admit it a while ago.
>> Yep. So we are making-
>> I'm old enough to
remember when that
was introduced the first time.
>> Awesome, yep.
So isn't empty tool when it works,
we are making improvements
on it as we speak however.
>> Cool.
>> So yeah. From there,
I just refreshed the page,
and as you can see,
I now have the time.
That was ReturnValue,
Step Into Specific,
Format Specifiers,
and then Set To Next Statement
made a reprise as well.
>> Cool. So now the app is perfect.
>> Yeah. Now it's absolutely
perfect. There is
nothing wrong with it.
I'm never going to have
any trouble with it ever again.
>> Cool. So over the course
of these two parts,
we've obviously seen some things
that we knew were in
there, learned a lot.
I saw a number of things I
didn't know were in there,
including some things that
have been in there for awhile.
So this has been
great. Thanks so much.
>> Awesome. Thanks for
having me yet again.
>> Hope you guys enjoyed that.
We will see you next time
on Visual Studio Toolbox.

CodeMaid, a Visual Studio extension for cleaning up & simplifing code

on today's visual studio toolbox we're
going to take a look at code made a
visual studio extension that cleans and
simplifies your code you are not gonna
want to miss this one hi welcome to
visual studio toolbox I'm your host
Robert Greene and joining me today on
skype from Indianapolis is Steve
Cadwallader hey Steve how are you doing
great how are you excellent steve is the
author of code made which is a visual
studio extension that he's going to show
us it has more than a million downloads
and it's very well received and Steve
you're going to show us all about this
extension and all the wonderful things
it does tell us a little bit about why
you wrote it and when did you write it
sure yeah I started writing it in 2006
and first published it in 2007 I wrote
it because I was very particular about
the way the code is organized and
cleaning up whitespace and little things
and like most developers got tired of
doing things automatically and I kind of
got into it from a friend Eric Potter
who was starting to work on Visual
Studio macros I saw what he was doing
there and I started with an add-on and
eventually moved up to an extension cool
and it's available in the marketplace
people can get it we'll have a link for
it in the show notes all right show us
what it can do great
so yeah to get started with code made I
recommend going to our website code made
dotnet from there you can see a
high-level overview of the features I
mean go down into a deep mail detailed
documentation as well as a YouTube video
demo walk-through we also have a blog
and you can see some information about
getting started this is an open source
project so I love contributions over 25
contributors so far and that's been
great you can also of course go to the
visual studio marketplace like Robert
mentioned download it look at reviews
and we do all of our work in give-up
that's we can file issues or grab the
source code no excellent so if somebody
wanted to know what it takes to write an
extension like that they can just go to
github and poke around in the code yeah
absolutely they never put a few other
extension authors mm-hmm excellent great
so I can start diving into some of the
features hop over
visual city a solution so the
bread-and-butter or code made where it
started out is code cleaning so the idea
is taking them code that's kind of just
on the page and making on a bit more
cleaned up automatically this is really
just saving you from having to do these
things yourself
so for example if we look at this file
we can see we have unused using
statements we have the using statements
out of order we have classes and methods
that don't have an access modifier on
them so you don't know if they're
internal or private by default we have
regions that don't actually have any
content we've got extra white space at
the front of the method extra white
space between lines extra white space
between arguments at the end of the
lines and so on and so forth and so what
I like to do show you everything through
a context menu you can use in Visual
Studio so just right-click on the
document there's code made where you
have all of our different commands
available as an aside everything has a
keyboard shortcut but all of course do
everything to the menu so you can see
what I'm doing
so forget we'll just clean up back to
the document and you can see well I'll
go ahead and clean up everything for you
so you can see the using statements are
in order the access modifiers been added
a bunch of white spaces and been removed
and standardized we do this by
leveraging some of the existing
functionality that's inside Visual
Studio so for example are moving and
sorting using statements is now natively
baked in we started back in Visual
Studio 2005 was our first integration
before that ever existed obviously
leveraging and gladly using anything the
Visual Studio starts to build in
natively so does that just mean less
code that you have to maintain yes
absolutely which I'm all for yeah I
won't mind if some day everything is
just baked in natively
likewise for formatting document a lot
of the argument level whitespace and
there's something that's already built
in to do the visual state videos format
document below there's stuff around
whitespace and things like that and so
you can do that mainly in one file at a
time a lot more powerful though as you
can turn on automatic cleanup on the
safe so every time you save your file
will automatically step in and will
clean up the file for you before it gets
written out to disk that's a real nice
way to just kind of turn it on and
forget it
yeah that is all I default as people
don't get too surprised but that's we
did one setting I recommend flipping
once you get comfortable with the tool
you can also do code up clap cleanup
across a whole bunch of awesome one so
for example you can clean up all of your
open documents you clean up your entire
solution or you can also pick any level
inside the solution Explorer right-click
and clean up the selected codes so for
example if you just want to clean up
that specific project if your project
inside a bigger solution you can do it
that way too
so all does the entire solution and if
you want to do one project at a time you
do it at the project level yeah you can
do it
folder levels or anything that's
appropriate okay cool that's the part of
the cleaning fix t-shirt next big
features we call the digging feature so
the idea is you have this file and you
want to kind of get an overview of what
you're looking at so we've got a tool
window I'll call it code mate Spade
because it digs through code that I'll
show you kind of a visual overview of
the file so for example we can see our
constructors our properties methods so
on and so forth you can click on
anything to navigate to it for example I
click on this event a my editor window
they'll jump to that file sorry jump to
that event you can double click on
something to highlight all the codes so
I'm gonna put on the clipboard
do something like that you can middle
click on regions and will synchronize
back and forth between the two whether
they're open there collapse so those are
all kind of useful mm-hmm one other
thing I like to do is you come into a
file you're not real familiar with and
perhaps things are kind of scattered
across first you just kind of want to
look at them in a standard order so you
can actually even though we sort by file
order by default you can switch the way
you view so you can view all the types
grouped together without affecting the
file so you can see all of our methods
have been grouped together and put in a
logical order mm-hmm or you can just do
a straightforward medical sort too if
you just want to look at it that way if
you know exactly what you're looking for
one other way that's handy to search is
by just using the search window so if I
know I'm looking for something a bird
path in it I can just type that in it's
just like solution Explorer is using the
same API they want to find the thing
looking for jump speak to it mm-hmm
so those are all useful and something
else that it's really helpful is you can
do drag and drop to reorder of your code
so for example I've got this is
initialized probably probably filled at
the bottom of the file style cough
convention
that's at the top of the file so you can
click and drag to move that up to the
top of your file and one of those code
numbers around for you that is cool
yep and one step further than that is
you can do multi select so for example
if I want to take everything in this
region I can either shift click or
control-click just like the Windows
Explorer and drag those items are around
so say I one of those methods to both be
at the top of the file for some reason
you can see that I can do that real
quick through there as well couple other
items like finding references and our
routing regions things like that that
are hooked in as well and then you can
delete methods from there as well or
member excuse me yep-yep regions as
popular one people don't like regions a
lot of stuff that's there as well
does that get rid of everything in the
region or just the region identifier it
gets rid of everything that's in the
region cool um so you can do that
manually through the digging window next
step forwards from there is you may want
to kind of just set that up on auto run
right you don't want to mainly drag
those items around so we have a another
feature called reorganizing so this will
basically do that automatically for you
so for example you can see we have this
file where the fields are scattered
across the properties are scattered
across methods scattered across so we
just want to kind of start the freshly
you cannot go in right click and come in
to reorganize active document just you
know see that we've moved all the fields
to the top of the file followed that by
the Constructors delegates events
properties so on and so forth so that's
a nice way to kind of clean up a file
that you're going to start over with or
just been looking into already and you
have the ability to set a custom order
for the Oregon is absolutely yep so yeah
I'll get into options a little bit later
go ahead and show that but it defaults
to the style cop guidelines right cool
and one other feature I didn't show in
the other window with is the ability to
do we have these tooltips to show up so
for example if you mouse over something
will show you any XML comments
associated with it will do a make a
complexity calculation for you so you
can see if something this kind of
complex that's what will give you like a
little
Fyers is a static tree dried things like
that this little queues for you to know
just kinda working through the files
yeah and that shows what those icons
were over to the right yeah again so
yeah these are just trade out individual
studios icons so the same things you'd
see like an outline window or in that
Explorer one runs right the 15 the one
the two yeah sorry so that 15 is a
mccabe complexity score okay my own
rough calculation that's not perfect but
close pretty close so you for example
you see this method has a whole bunch of
or conditionals that's triggering a high
mccabe complexity score within that
method and i kind of highlight those
you can configure what the thresholds
are I think Aven 10 is kind of like a
warning level and 15s in alert levels so
you kind of see where's the meat of your
file and he kind of look at something
right away or if something's getting
kind of unwieldy okay cool
cool so one other hello feature we have
is comic formatting so for example we
turn off word wraps you can see this
comet just kind of goes on and on and on
it's really long the parameters are just
kind of in place there's like space
amongst them things like that you do
have a common formatting feature to kind
of standardize that for you you can
specify you know what com you want to
wrap at which tags you want to auto wrap
things like that yep this little handy
feature needs and then below that a lot
of features are kind of more little
small utilities some simple we have a
join feature so if we look at this
property accessor and we want to join
those lines together can do that very
simply obviously it's very basic thing
to do
yeah you have the ability to sort code
that's natively sooner or later but um
it's basic alphabetical sort on the code
so you can see that when these
attributes were out of order before we
can help the ties it owes
into a certain order if you would like
to and then um hop over to another
session for a couple other features one
other thing we have is when you're
looking in a document you can hop to
that same document inside the solution
Explorer this has been built in
through the sink active documents and
later versions ranked you still have our
shortcut but we actually just turn
around and evoke the native command for
people who have the muscle memory so you
see it'll hop directly to that file
within the solution Explorer and we also
have the ability to collapse at
different levels so if we can't look out
a whole bunch of folders is it a real
thing it's gonna collapse them at a
certain level you can do that you can
also at the top level again that's one
the visual studio is now built in
natively so you can do that as well and
then one more I want to show off is when
you have a large solution waiting for
your build times there isn't a lot of
feedback I think and how far you are in
your builds what's being built right now
there's a building well as a build here
so I have a little tool window I'll show
you your build so example if I go for
you build my solution see your little
build window comes up and show me which
project it's building as it goes usually
as much faster so are you basing it on
the Amana code or how long it takes to
build things how do you make that
calculation so yeah it's coming from the
visual studio does have api's around
built progress events you can know an
individual projects completes or example
that could meet projects built now our
unit testing integration tests can kick
off and build on top of that okay and we
also show the Soto show a green status
or red status obviously as those builds
are running through they also do a
little update inside the windows taskbar
so you can see it down there as well so
it's it's it's based on the number of
projects yes see I have three projects
for code made right so there's a primary
solution integration test and unit tests
so the integration test and unit tests
depend on the primary project before it
can be built so you can see that just
that one project is building right now
and as soon as that other one fires
finishes the other two can start off
concurrently right so you don't have the
ability to calculate it based on the
amount of work the build has to do right
no it's really just project level but
I've had some larger solutions I had
like 120 projects in them it's really
useful for those yeah cool
so then one last area want to show is
kind of the options within code making
and so when you install code made
there'll be a top-level menu right up
here mm-hmm
shows all those different commands we
can also I didn't show removing all
regions that's another popular one you
just don't like any regions in your
files or if you remove selected regions
things like that to go down in the
options window we have a we've really
tried to focus on having the defaults be
pretty good so you don't generally have
to mess with these I'm personally of the
opinion it doesn't really matter what
your coding style is you just want your
code base to be consistent people can
argue a lot about little details but
honestly as long as it's the same that's
usually been my goal so I tried to make
the settings as general for most people
keep them happy but obviously you know
people have a lot of requests a lot of
very specific features that they want to
have so I think we have 170 options or
so trying to keep somewhat managed
within here and we'll go through all
those by any stretch of imagination I
just want to go through a couple of
these pains
at a high level so first one is we have
the ability to have both user level
settings which would be on your machines
stored in your user profile as well as
solution specific settings an example of
this is if you have specific files you
want to exclude from operations so for
example I don't want any of my
integration test data even though it
looks like c-sharp code I don't want it
to be cleaned because of course that's
what the test was supposed to be doing
for me right so you can specify you know
files you want to exclude based on
regular expressions but that's something
that's a good example of a solution
specific setting versus a user level
setting and you can store that just a
code need a config value store right
alongside your solution file and so we
support a whole bunch of languages as
you can see up here I won't listen to
them all c-sharp and VB definitely get
the best support because those have the
most integration with the visual studios
api's scaevola
c++ would be behind that we allow you to
turn on operations even for text files
but it's pretty basic just in the line
white space
duplicate white lines things like that
okay um another high-level feature that
has recently been added from
our community contributors is ability to
turn on or off any one of our features
so if you want to get rid of some
feature you don't want to see it in any
of the context menus you don't want to
hook into the event handlers you can
just turn those off altogether and it
will disappear from the menus pretty
straightforward just registries in most
operations and code made are I don't
until invoked so it's usually not too
harmful I'll leave everything on but if
you just want to clean up your context
menus you're welcome to do that what was
the general impetus for that the this
person only wanted to see the things
that they were going to use regularly
yeah so they thought this menu was too
long they want to be small right and
seem to go for this one where's does
show everything so Sheridan yeah it's a
nice featured app yeah anyway what's
trending sauce so we talked before about
the reorganizing types so yes you can
customize those so I've come down to
reorganizing types you'll see the
default order so if the elds
constructors so on so forth okay kind of
down the bottom did you can do a lot of
customization here so for example if we
want to merge our properties index to
get properties indexers together in this
drag and drop those onto each other mhm
we can rename those to something else we
wanted some support so you can customize
that however you want
that will affect both what you see in
the digging tool window as well as what
the reorganizing functionality invokes
and cleans up and you could have that at
the solution level or the user level
right so if there's a particular project
you're working on where you're using a
different a non-default
or non-standard order you could do that
yes absolutely
okay and then you can always reset to
default very important button right
there right oh yes I like that one
that's a super useful for debugging yeah
you know one last thing I wanted to show
off in here is this we have a little bit
of integration with third-party tools
I'm so JetBrains resharper telluric and
zamel styler mm-hmm these are
deactivated cuz I'm not using any of
them anymore but you can turn those on
and well basically chain or cleanup
alongside there's just like retaining
alongside visual studios cleanup okay
and you can even customize that further
if you have other commands right awesome
so have you
assume you've found over the years that
more and more of the features actually
get baked into Visual Studio um which
then gives you the ability to write less
code and just hook into what Visual
Studio is doing yeah that's been really
useful I think some of the big ones were
of course removing and sorting using
statements yes fault as well as
collapsing the solution Explorer cool so
how difficult was it to write this
extension what advice would you have for
people who were thinking of doing
something similar or potentially are
thinking of looking at your code and
either leveraging it or helping to
contribute how hard is it to figure out
the model for Visual Studio and then
also how hard is it to write an
extension like this yeah that's a great
question and it's very different today
than a decade ago when I wrote Visual
Studio 2005 it was mostly add-ons at
that point I was leaning a lot on Carlos
Quintero had a blog with Visual Basic
examples that was about the main source
of data had mm-hm
back then everybody's on SourceForge
things like that so it wasn't a ton of
available code to refer to nowadays
there's been a lot of push from that
team to really improve the documentation
so there's stuff out there directly on
MSDN I mean there's a ton of example
repos on github okay Matz Kristensen has
a ton of extensions who's done a great
resource snow' leaned on him as well as
he's got some examples of automation
event through that lawyer so you can
have a alpha channel basically a CI
Channel
really easy extension so I definitely
recommend checking out other extensions
there's a good starting point okay cool
so code made awesome tool highly
recommend people take a look at it
download it join the ranks of the
million plus people who have downloaded
it and they're currently using it that's
tremendous
thank you thanks a lot for coming on the
show thank you very much for having me
all right hope you enjoyed that go take
a look at the tool and we will see you
next time on visual studio toolbox
[Music]

Closing and Virtual Attendee Party

oh my gosh we're back it's time for
another it's a code party
it's a code party I can change pants
hang on friends let me change hands
there we go
Wow got them the official code party
head and get a hat but I got a mug
I got a mugs that's a deal with the bug
tell me about the mug the deal with the
mug is we are talking about all these
cool code key bindings that you can do
you know the stuff too Kendra and
Michaela we're showing off there's all
these features that if you don't know
the magic Keys you don't know how to do
it right or you might forget yeah yeah
and so then we're like you know we'll be
cool as if we had a mug and so Christos
and I got these mugs printed up for this
event so everybody can be more
productive by it like taking their hands
off of the mouse keeping them on the
keyboard so you can write more definite
Road activity because it teaches you the
keyboard shortcuts yes you can put
caffeine inside of the cup love doubles
quadruple the productivity really yeah
my name is jeff fretts that's John
Galloway we're gonna have some fun here
we have giveaways we have raffles we
have we got a bunch of fun too others
have friends we also have a surprise
demo from surprise darren from the
keynote had too much good stuff he
actually wrote up some really cool stuff
on the plane out here and we're like
well you got to show that off actually
gonna part way through this will cut
over to him and he'll show off his I
can't believe it works demo I can't
believe it works demo but it might work
in minot way so okay we spend a full day
learning about visual studio format yeah
right all the cool things you could do
doesn't matter it doesn't well it
doesn't matter what operating system if
it's well partly I mean part of the idea
is we've got teams yet that you know you
may have some people working on Windows
you may have some people working on Mac
you may have one person over in the
corner with with the boon to whatever we
want them all to work together yeah
and so having tools that work seamlessly
together is important and especially
like having Visual Studio for Windows in
Visual Studio for Mac feature support
being you know like sharing code between
the editors things like editor config
all that stuff it's not just folks doing
dotnet it could be JavaScript
mm-hmm right it could be there's a
handful of different technologies that
you can use but you know
for today we did want to focus on dotnet
development like that was the idea is
like if you're doing dotnet development
on a Mac Visual Studio for fur market at
this point really is kind of the premier
editor for that yes so yeah let me take
a look at what's going on over there in
the chat room lucky number 7 is here
hello hello dee dee Walsh Nunnally she
in the chat room she's actually right
here in the rail room there's no
doughnuts in folder palcic oh this
reminds gray Jedi of tech TV for some
reason I hope it is a little bit better
than tech TV Wow yes absolutely let's
see what else is going who actually
changes key bindings I feel it's very
confusing
I don't what well point it is a good
point so some people never change them
right you start up you learn your thing
that's fine
that's you that's great other people you
may have come over from Visual Studio
for Windows to Visual Studio for Mac and
there's actually a screen during the
install yeah and then later you can
bring it up if you want to where you can
say hey I want to use key bindings that
are the most like Visual Studio for
Windows or Visual Studio for Mac or
writer right so you can take or Visual
Studio code right so you can use these
kind of presets yeah
but then some people really like to go
in and dial stuff in I actually have had
a few things where I was like why isn't
there I do something a lot and there
isn't a hotkey for it I'm just gonna go
in and you know ctrl alt option blah
blah blah 5 and you know and then it
does something magic for me you know I I
could definitely use a hotkey to change
fonts fo'c'sle might on my stream they
like to ask me to change font and use
papyrus for coding right like the app
the font from the movie Avatar papyrus
you're gonna write code with that come
on now but a funny side story with fonts
please tell me on Saturday I was in town
over the weekend I went to coffee with
Damian guard who built the NV Code our
font he's he's actually added some
coding fonts okay and so we I'd love to
get him talking shop and just talking
about fonts and he after a little
prompting he went down the street and
every street sign in view he's like
see that that's papyrus that one is
probably a little too it's a modified
Helvetica this is anyway like every
single sorry I'm like that's cool and it
probably also probably a curse cuz you
didn't notice I and he's like oh yeah
see that license plate there the sender
height is way off you know as I go man
Wow we should give away some stuff
should we give away some stuff can we
can we give away our first trivia
question can we start that so I mean I
don't want to jump the gun but we only
have an hour to give it well you know
what here look at this beer add more got
up at 4:00 a.m. to tune in from wow
that's good education yeah that's a
person that needs a coffee cup they need
a coffee cup but I was I thought we
could ask a question for from our
friends that you know it sounds good
all right what's the plan we're looking
up that Prime surprised me
[Music]
we should save you save it for less
we're gonna come back to suspense
should we what do you say then we go to
def Express alright it's a what well
let's give away your prize I don't have
your question I don't have that question
it all comes down to the spreadsheet I
know let's know what if Express okay
what the price for deaf Express is so
for $100 a messenger
yeah anybody in the world can win this
your question your your question is name
the package manager tool that allows
simple installation of the DevExpress
tools inside a Visual Studio for Mac
first one in the chat room
it is not SharePoint no I'm keeping an
eye on the chat room here first person
in the twitch chat room that can tell us
the package manager tool that allow
simple installation of DevExpress tools
inside via our back come on who's got
there must be an answer coming in
through here no it's not SharePoint no
you can't use SharePoint is it a new kit
package manager yeah suspense
so is that and then asterisks is that
right who is the great no I think the
first one was who is the first one to
give us nougat I think it was beer
oh no it's oh it's way up there yeah
let's see it's right below the first
SharePoint it was straight came through
here early-bird get in the words
lately you got paid for it so
congratulations beer add more well
there's our first trivia question maybe
go back to sleep yeah you can go back to
some we're just gonna be goofing around
now for the rest of the time because we
sent an Amazon card to Australia
very nice congratulations to you so okay
so we talked a little bit about key
bindings that but I really like seeing
this stuff about blazer with Visual
Studio for Mac there is so much
happening with this framework the
excitement in the dotnet community is
palpable it is it really is it's it's um
it's really cool to have the option you
know and it's like I I think that we
have to squeeze things down into sound
bites a little bit for presentations and
keynotes and stuff but really I love the
flexibility it's built on you know open
it's built on web standards runs on all
the browsers yes
you don't have to use JavaScript but you
can so it's not like an either/or it's
like you can build with blazer and you
can integrate with existing JavaScript
libraries if you want to right right so
it's it's kind of the best of everything
it I like that we've moved from you you
can write in target HTML code mm-hmm
directly on the metal from your asp net
frameworks yeah back to well here's a
component based development framework if
you'd like to work that way as well the
whole component thing is really like a
hidden gem blazer and it's something
where first people really focus on the
JavaScript and they're you know like oh
I can write C sharp code and stuff but
then you think of it more inside wow I
can have components they can be
installed via new get the you know
components can like simplify life cycle
and you know all kinds of stuff it
really brings down the complexity of
building you know friend heavy
applications so yeah our friend Goldman
is is trolling me yes that's right Wow
I've got blue hair I've got that Visual
Studio code hair going on that's right
better believe it yes yes it's happening
there you go go nice that's our what
well okay so speaking of of all those
cool things you can do in the browser
here in the chatroom is that is that we
do bro rights
long live silver life well but Blazers
not it's like so you know it's it's a
yeah it gets a reaction there's it
brings in some of the things that made
silver like cool but it does it the
right way right silverlight was a
browser plugin yes it really depended if
a browser supported things right it
would maybe work in one browser and not
another etc what's really cool with
blazer is it's the front end is C sharp
or is excuse me CSS JavaScript html5
like its standard web standard things
every browser does this hmm
yeah let's go ahead and decline that
call if you have John Galloway's yeah
okay I'm looking for you Scott Hanselman
give him a call and so all these web
standards things and webassembly yeah
right and that's kind of the thing that
folks associated most with blazer yeah
webassembly you can code with in Visual
Studio for Mac yeah and it works in
every browser and right we we have our
friends specter and meltdown to thank
for that one right right like we can
thank a problem it right a processor
flaw for forcing everybody to upgrade
how cool is that we got even grandma
using the latest browser yeah yeah
pushing those browser standards right
there's the in I see grandma my
grandmother was very non-technical and
was not upgrading her hardware her
software regularly so that's yeah I
refer to do we actually here look at
this oh it's our friend fierce kittens
is in the chat room hello which browser
am I supposed to hate today
trick question all of them okay thank
you so much I really appreciate that
thank you and T Pro senior asks when can
we expect a Visual Studio for Louis too
sorry we'll take that back to the
product team
in all seriousness friend our friend um
let me see can I get that showing there
there we go
our friend Scott Hanselman got Visual
Studio code working for Raspberry Pi and
on raspbian so all the source codes
available there
you could run vs code in some of these
other places you're not gonna get the
full IDE like we have for math yeah but
somebody's gonna hook it up to a
terminal emulator and who knows what's
gonna happen next I don't know yeah yeah
so so should we give something else away
do I feel like we've got so much stuff
to do we do have a lot of stuff to give
away so we did def Express what do you
say we go well you're answering while
you're figuring that out let me answer
sides-- society you site is whatever is
asking what about integrated terminal
support for the s for Mac okay that's so
it's on the roadmap 48.6 which which is
supposed to ship in May now when I said
that during the keynote some of the devs
were like oh I guess I better get to
work so but the plan is May so I can't
wait for that feature but they're there
might be a large Microsoft conference in
May that we're yeah yeah yeah I feel
like you're building up to something
there I don't know lots of eight is a
patient yes yes all right so but let's
go to question number three from Lee
tools
how's that sound DeeDee let's do it all
right so the question for rings what are
we given away what is the price for lead
tools you get you know well you know
that they have like that document Oh
surely tools does all the great OCR
features so you get her to recognize
twenty five hundred free pages for lean
tools cloud services Web API a hundred
and twenty five dollar value all right
so where is it Lee tools would like to
know which lead tools Newgate library
could you reference to created xamarin
or asp net core application in Visual
Studio on the Mac they can OCR an image
and convert it to PDF first person to
get that right in the chat room and in
the twitch chat room we'll get ya a
third question we skipped the first one
that's okay
yeah so we got some people frantically
googling that up yeah those debug mugs
folks folks like the mugs all right yeah
you've got some answers coming in what
do you think dee dee do we have any
correct answers yes oh you know we're
shuffling around a little bit here Oh
things are always changing when we do
these lots of things moving pieces we
have to stay flexible stay nimble as we
go through and take a look at all the
different things that are going on here
our answer
trying to hold everything is mmm you
want the shirt from your earlier tweet
there was a shirt ruler there is a lead
tools OCR nougat okay yeah anybody
answer that yes I think was that Janice
ku I think in sq7 Jen sq7 I think we
that's a that's I think we've heard from
him before that's awesome
congratulations you just one honey $125
value and 2,500 pages 2,500 pages of OCR
yeah that you're gonna be able to use
with Lee twice so oh you know what I
think I got that wrong no no
acceleration got it first it because it
turned it into a link word for us to
save my apologies yet so sorry janeski
so Janice who should get something else
then one of your well at least a sticker
pack right yeah or I think um or door a
mug I think you should give him a month
okay
John sounds right so we'll sell out a
mug to janeski oh okay
so there we go yeah so who won the lead
tools expiration XOR a tion X Oh should
we switch over Darren sure let's let's
see ready to go in sure I can talk about
anything you want me to talk all right
let's go for it so the internet how are
you doing
it's aaron from a why tech lead we do a
lot of mobile stuff it was really
interesting so not that long
on the Internet I'll say in time
somewhere between three and five days
ago somebody had posted a Twitter
question about it'd be really great at
vegetative for the Mac you could build
Mac applications and the person was
making it sound like you couldn't do
that and instantly I went what what wait
a minute of course you can build Mac
applications in Visual Studio for the
Mac in fact that's probably one of the
first things they had to do to build the
product so talking to John about this I
decided that in the last 48 hours I
would build a sample app that we can
show off basically clean kind of show
off the features of doing this so I have
literally Visual Studio for Mac open
right now and this is a salmon Mac
application now why would you want to do
this that's a wonderful question to ask
well one the advantage is a Fiorino
c-sharp this is a beautiful way to make
mac applications you already have all
that knowledge of how to write
applications and if you're an iOS
developer coming over to write a Mac
application isn't that scary especially
if you're xamarin iOS specifically
because a lot of the objects were kind
of came from the the tool kits called
app kit and the tool kit over and I
wasn't called it's took it they kind of
similar eyes themselves in many ways in
fact if you ever see the NS name in
front of an object a lot of times that's
the same name over on the Mac side so
the second advantage that you could do
and if you want to do this is that you
can have a shared code library so say
for example in the project I have opened
here if we were to look on the Left
you'll see that this top library I have
that's a core library I could share that
code between a uwp application WPF
application a hololens application it
really doesn't matter because it's a
dotnet standard or a core DLL and so
because of that we can use it anywhere
we want which is pretty great so now I
could take this code I have and I could
read it you you WP application on top of
this and so that gets me the ability to
kind of write once and run all over the
place
now of course I'll preference that with
the fact that you still have to go write
the uwp application over in a platform
that supports that today we're going to
talk about the Mac so over here I have a
view Kittrell or open up here view
controllers are the core of a Mac
application a lot of times your window
basically draws multiple view
controllers and
go ahead and show you how you would edit
a UI because the question was very
specifically on the Internet
how would you do it like WinForms and
the answer is the the interface is
pretty much this it's very similar in
many ways if you know one you can learn
the other so what I'm gonna do is I'm
gonna open up a storyboard file now
you're probably going to what's a
storyboard file that's someone scary
it's not really it's an XML file if you
look at the back end of it it's
literally just XML and what that is is
it's a layout of your entire UI for your
application all the screens are in one
big file and you can add to your layout
by using the editor that's built in to
on a Mac now this is a Apple product
Xcode interface builder but a visual
studio for Mac anytime you make a new UI
component it will automatically write to
c-sharp class for you envision study for
Mac so you're gonna go over to Xcode
you're gonna build your UI and when you
close Xcode it dynamically will build
the starter classes in c-sharp that's
pretty great
so if we go look at the main storyboard
file we're quick here for this
application you can see here that if I
zoomed out you'd see that there's just a
ton of screens in this thing and there's
a lot going on but I'm actually gonna
focus on a couple screens over here one
I've got this screen that's gonna come
up by default it's got a split view in
it like a master detail kind of over on
the left side we're gonna see that
there's a list of different things you
could do on the right side you'll see a
form and then at the bottom I have some
buttons that can dynamically switch the
view so I'll give you a demo of say for
example we have this one of these views
is like say for example I want to make a
user profile so I'm gonna mock this out
and I'm gonna add a label to this so we
can see it dynamically somebody click
the little plus sign up here I'm gonna
search for a label and I'm looking for a
rap label specifically the reason for
that is I don't know how much text is
gonna be on this control for example I'm
just not really sure now the cool thing
about this is as I drag over the labels
you saw some blue lines those are the
interface builder telling you what's the
best way to make the UI look decent the
the editor is actually pretty good about
warning you that hey you're doing your
you're drawing just the right amount for
like your width so you can see here I've
got a blue bar over here that's tell me
don't go any further than this because
this is a good place to go so now in
code in this builder there is something
called castrates I'm not gonna get into
the huge argument about where the net
castrates are good or bad I personally
don't think they're all that tricky or
difficult I'm gonna use the constraint
editor to actually add some constraints
into this so that basically it's gonna
go through it and standardize my UI I'm
gonna make the spacing on the left and
right 20 pixels I'll make it 8 at the
top and I'll make it for example I'll
just make it 20 on the bottom I'm going
to add these four constraints and now
this labels all set up now the last
thing I have to do is in the label
there's some options over here and Xcode
you're gonna see to the right and you
can set all kinds of options about how
your your text goes through and works
you can see here we want to make sure
it's set the word wrap because we don't
know how much text is gonna go on the
screen so with this I'm done with this
UI so the excuse me one last thing I
need to do I need to link this this is
the outside that this is the trickiest
part that some people will get confused
when they're building an application in
order to do this I need to link this
label I drew out and threw onto the form
I need to link that into my c-sharp code
file this I will fully admit is the
first time you do it it seems like it's
crazy but once you do it the first time
become second nature so how I'm gonna do
this I'm gonna split the screen using
the right icon here and then here I have
a basically two windows open
simultaneously in Xcode so I'm gonna
actually go in and find my user profile
controller and I'm looking for the
header file it's called and what I'm
gonna do is I need to drag out what we
call an outlet or a pointer to the label
I just drew so it shows up in my c-sharp
code and so I'm gonna go back and find
my little label I have right here it's
right there I've got it selected I'm
gonna hold down a key on my Mac keyboard
and I'm gonna drag and that's the
control key when I let go it's gonna ask
me what kind of porno do you want to
create well I know it's a text field so
I'm gonna just call it text field I'll
call it bio I'm gonna hit connect and at
this point time when I close this editor
that is gonna turn into a c-sharp
variable for me and that sounds like
it's like crazy and unbelievable but
it's true and so I'm going to go through
here visual studio should update itself
and if the demo gods don't kill me I
will actually have this and it will work
now we could check that each one of
these view controllers has a designer
behind it and that's where Visual Studio
puts its a c-sharp references that it
makes and so if I were to go into the
user one and take a look here we should
see a new field and I see it right here
TF bio that tells me that that field was
now created in my c-sharp file
well now based on that what I have to do
to water this up is basically set the
value so in the viewdidload which is if
you've done iOS you're very used to this
method showing up I'm just gonna say the
text field by o dot string value equals
and I'm gonna say my user object and I
have a bio field on it and that's it I'm
gonna go ahead and debug and write debug
that should go through and build my Mac
application
now here's another fun fact about the
new version of Visual Studio that most
people don't know we're talking with key
bindings earlier everyone's table those
are hot topic I actually use something
different I use an editor called vietze
of them it's a plugin for ps4 Mac and
that editor actually is the same one for
Windows and so there's a guy on the the
Khepera team named Jared and there's a
person on the C char the F sharp team
named Jason and they wrote this so that
is cross-platform it works both in
Windows and Mac which means now we're
getting to the point where extensions
are available on both platforms the same
extension which is just amazing and it's
really showing that we're vs for Mac is
going and how you're gonna be able to
the future they'll do you do more things
like this where I'm a VI guide I started
years ago in UNIX writing code and so my
my fingers are kind of programmed those
key behind these and I don't want to
give them up and so the fact that this
extension is now available is pretty
cool so we're gonna wait for a few
seconds here while this loads the other
thing I'm on the point out is a lot of
times somebody asked me well how did I
learn this how did I find out like how
ms image of NS image looks right well
that's pretty easy you can right click
and go to go to declaration what should
do is you should bring up the assembly
browser and that's a pretty neat feature
it shows you the breakdown of the NS
image for example and this is all the
way to the top of what we call app kit
which is the built in framework for this
but here's the crazy part if you want to
see the c-sharp code for that if you go
to language here all you have to do is
switch it to c-sharp and now you're
seeing the literal code behind this so
if you've ever wanted to see how examine
binding works
which is what this is there's the code
to do that which is really kind of neat
it's a great feature and anytime I'm
trying to figure out something I either
go to the Microsoft documentation or I
use this feature so finally I'm going to
go into my app it's up here running this
is a full Mac application and you can
see here I've got a endpoint linked up
and if I click on it it shows up and I
can make new ones if I want the feature
I was working on was this user profile
so I'm gonna click these little buttons
down here and when I click user profile
you'll see there's John you see his
title you can see that his he works for
the Fisher Street for Mac team and you
can see that I have lips of NorAm up
there and that's just because I need
some text to put in for his bio and if I
switch back the authentication mode you
see the windows are dynamically switch
in real time so this the cool thing
about this to understand is that I'm
actually messaging between all these
different screens using c-sharp code and
using a standard format called like a
messaging framework so I'm sending
messages back and forth between the
screens to tell them how to dynamically
update that is the power of using
visitor story for thematic to build a
summary based application and once again
I built this literally in less than two
days just based on somebody on Twitter
asking if this is humanly possible so
it's it's really a great platform the
building even this and if you have
windows forms you have a background
maybe in WPF or you WP it's very easy
for you to pick this up with our
problems so I think that that's what I'm
gonna do here for my demo and I will
throw it back over to John and Jeff that
was cool all right I like knowing that
we can build apps for every platform
desktop web mobile really great stuff
yep yeah it's great to have you know a
general-purpose language that can do all
kinds of apps can be performant enough
to build like really fast type
microservices can build you know like
large applications can build but I I'm a
fan oh my goodness friends there on
twitch you may have just seen this our
friend Lana Lux is rating over RT 150
welcome in 150 Raiders good to see you
out there
my name is Jeff Ritz that's John
Galloway huh this is a code party we're
asking drew giving away stuff we're
giving a waste you picked a great place
to reign great place Lana thank you so
much for bringing your viewers over here
to us thank you so much
we know our friend Lana is out there
she's she spends her days working with
unity and writing dotnet code building
gains she's building models for her
games using Maya tremendous just
complete package that she's working
through there to build games we saw
about unity earlier today we did yep
that was what that was one of the
presentations so that was really cool
seeing using c-sharp skills and Visual
Studio for Mac has an advanced editor so
yeah very cool the folks behind the door
there that's where as those making faces
at us that's what so you can't get away
from the guy we can't I can't work under
these conditions and I was at dr. pepper
oh okay to be fair a diet dr. pan how
you doing there friend yeah I know drink
coke if we give you some stickers yes we
go we got more stuff to give away and we
do well I mean I don't want to stress
out but we've got way too much stuff to
give away we're gonna be just I don't we
cranked through three in a row let's
really roll back okay next question I
have from octopus octopus deploy right
they make continuous deployment systems
yeah and so they're giving up licence
for their octopus cloud server for 25
targets so and it's a twenty three
hundred dollar value okay and be able to
deploy all over the place we had a few
people asking is this a live show so I
just have to say yes it's a live show no
this is totally not live oh yeah this is
professionals from the future we're
broadcasting back in time back in time
we went 88 miles an hour all right
octopus that's big game yes from octopus
we have this question first-person
dancer in the chatroom is gonna win the
big prize and our friends at octopus
have to say
hang on suspense the suspense is killing
all of us there it is what popular Mac
OS package manager is octopus deploy
looking to support on its product
roadmap so you're gonna need to do a
little bit of research here to figure
out which knots up its so the event it's
so close oh the day one
darrel code stuff darryl code stuff
there we needed the full name hopeful
name sorry yeah is it Darryl number
Darryl code stuff Darryl code stuff yes
you do and now you're gonna deploy that
stuff using octopus deploy fantastic
breakfast of champions the breakfast of
champions is really I don't know the
breakfast next trivia question we have
from progress software they make
components tools that you can use to
help build your application this is a
question for a a deaf craft complete
license so I have that right yep yep so
every one of the controls that they make
Wow yeah right doesn't matter then what
platform you're targeting
there's controls for you progress asks
in the telluric UI for asp net court
documentation you'll find a first steps
on visual studio for mac getting started
guide which control is implemented in
the use case scenario demo in that
documentation first person to answer
that correctly in the twitch chat room
is going to get no PHP is not the answer
have a focusing grid no that's not the
right that is they're not very elastic
it is absolutely a classic control that
that the folks at telluric are known for
I'm gonna peek over here at what the
answer is do you know what the answer is
I know what the answer is and nobody you
know and it's not answered you need a
specific control it is not sure point
you goes on it is not a short oh there
we go somebody got it
expiration expiration got it wow look at
that
X raishin is cleaning up today
was the date picker is the first control
that they show you in their getting
started Docs no it's not homebrew
refresh their your little behind if
you're watching on a phone then we'll
give it this tip if you're watching
twitch on a phone you're gonna be a
little bit behind yeah you've got to be
that much smarter yeah so you you need
to think into the future next questions
for the list of these three that we're
gonna ask is for my friends at
pre-emptive mhm they make they make all
kinds of bright they make yes and
they're they're basically up and I think
that they they're doing they're going to
the Mac they've got a beta to the Mac Oh
fantastic they have a beta version of
the product for the Mac they're giving
away it looks like a $50 Amazon gift
card nice first person to answer this
question correctly in the chat room from
pre-emptive asks which version of dot
fajita professional would you use to
protect your xamarin applications on a
Mac right inside Visual Studio format
that's pretty cool right
protect it get it obfuscated so that
folks can't interact with that golden as
the answer is not to seven one but it
was close close she's trying to win look
at this the the crew was trying to win
prizes SharePoint Edition is even closer
Wow point two point one three nine no
it's just a random number generation
here right I think they're gonna be
calling it rigged soon no nobody's going
this rig he's not monkeys not hi either
you know technically it would take an
infinite is even closer
II is easy
okay where folks are learning how to
count it's totally rigged yes this is
not rigged come on now let's back up a
second we've been working on this we
know the real is here what's do we I
actually don't know the real is right
there no man sir look it's right now the
answer here below us yes I see the
answer it's a full number oh we got it
there we
at ricky-ricky 3c 6.0 6.0 well done
we'll get you a $50 Amazon gift card
thank you so much watch us but you know
you know what actually thanks cool I I
didn't know that there was support on
Visual Studio from a degree for xamarin
that's pretty cool
yes yes yeah so we said we're giving
away three things so those were things
that was three that was wonder if you
should do the other trivia to the for
the mugs and stuff yeah we should
okay let's run through that trivia
because we have mugs shirts and and
stickers so your choice change the rules
for this one because you guys had more
to give away CDs changing it up yeah
we're gonna change it up I thought that
we're gonna do like because we don't
have as many questions like each time
the first three answers will win I was
thinking the same thing
okay first oh my god I was I was like
mind meld was right there yep first
three answer and we have like four or
five of these questions right so one of
them where he has five questions okay
that I made up okay so these are
questions about various things in the
Mac ecosystem for these ones let's give
him away let's give him a mug okay first
one will give a mug to so there's three
folks first three folks to answer this
question which is what year did Visual
Basic for Mac launch that a thing basic
oh we got
Visual Basic is like is like the credit
card whatever word
I got yeah the folks beer add more got
close very close beer add more also
close 1066 1800 1993 is even closer Wow
except that it's not I just throw up a
little bit thinking you all know it's
like no year beer add more well Oh beer
add more
I think that's close what do you mean
that's close
Davey makes the rules okay just DeeDee
is the judge news I mean I don't you
think Oh then we got a nil so car
Carnegie J that's a good one is that the
right answer
I need my Geoffrey's also music oh the T
Pro its CG Pro senior it never launched
yeah
dull Justin so I think actually T /
senior wins DJ well here's your three it
was yeah those three because it was a
product so so who won
so you I gotta I gonna write this the
Hugo doll T Pro senior and the Hugo and
Carnegie J yep there you go there's your
three hang on and what was the was the
second one Oh T Pro senior Hugo doll and
Carnegie J there you go it never
launched it never happened so but it was
a thing it just didn't ship never
shipped can you believe it and we were
privileged to talk to BB who worked on
this product yes in 1993 yeah the visual
basic team of which I was a member we
worked hard to LA to build a visual
basic for Mac and we had customers lined
up and everything and then somebody who
will not be mentioned but might have
been the CEO of them said no so we did
not launch mug for donuts with DeeDee
Walsh's you go yeah there you go now we
need to give away some stickers all
right so let's say like ten people first
tend to get this right okay let's give
them that question so the next question
that one's too easy
okay I'm gonna go to this one because it
this is yeah there we go
this question is what year did the
Macintosh finally get multitasking Wow
first ten to get this right it is so
rigged schwa boom so till the end first
ten holy cry now that's gonna be hard
that I have to you have to write really
write all these down really fast so well
that's fine Oh actually I think I see
that answer coming in what's the what's
the question
where did multitasking Oh oh there was
one yeah there's actually a bunch now
come wait I saw one way up there yeah so
the first one I saw was loot luis
beltran yeah and then name sounds
familiar
cloud coups and then next we need like a
scribe yeah I think we've got our ten
whoa that looks like ten we will go
through the chat log here and through
the chat log after the fact yes we can
narrow it down it is 1987 1987 go
through the chat log after the fact
yeah Louise was a dotnet con speaker
that's why I recognized it because we
can save this the chat log is already
saved oh sweet oh yeah all right then
let's give away some shirts okay this
one I think we need to go a little bit
further and go with the hard question
the fifth question that you gave me the
last question that we had to rephrase oh
yeah that one's a good one
okay top five people we can do four top
five who get this correct this is a
naming question okay all right I bet I
wish astronomer is codenamed Butthead
astronomer are you kidding me after
throwing a fit when the max 70 100 team
originally codenamed their project what
astronomer was code-named what head
astronomy does anyone not Beavis
astronomer does anyone read these after
date he puts him in or we just we just
read whatever she says I can copy paste
into OBS only the top three duration
we've got plenty of fun kupah we've got
billions and billions of correct answers
now Wow
okay so we've got a bunch of t-shirts
we've given out a couple mugs stickers
yep okay do we want to talk shop a bit
more so there's plenty of shop to talk
about there is so well I want to talk
about yes you've got something coming
up in May May is for max someone oh well
so ok I've got a couple of different
things like that
alright right hi so I like folks you've
seen me here on the stream you know
where I am here on Twitch I am C sharp
Fritz on Twitch you can't shout me out
there is no JavaScript horses today it's
it's just John and I here and I like to
I like to shake things up when I'm doing
dotnet programming on Twitch just doing
Visual Studio 2019 on Windows all the
time it's really not showing everything
that we can do with dotnet part of
what's cool about dotnet is it runs on
every platform you can develop it on
just about every platform and people
still don't know that and I love that
you are working hard to get that message
out there thank you so we've run in
October the past two years we've run
Oban Tober it it works okay look it's
better than okay but tober it works
trust me on this okay so we're on bones
right over there
so all month long Ubuntu Linux Visual
Studio code and showing hey we can do
dotnet development asp net Cornette core
development in this other environment
yeah and we spend may is for max all
through May on a Mac Visual Studio for
Mac Visual Studio code building I'm a
web person so I build web applications
yeah we've been building a blazer stuff
recently but we really looked at it a
lot of folks that are out there on
Twitter over the past over the past few
days and they've been saying know what
gosh dotnet really is a Visual Studio
and windows only thing so that's not
going to Flug yeah we need to really
break this down and show look we can do
dotnet everywhere so I throw out the
idea of let's do minimal March let's go
dotnet on the command line only yeah
let's go with vim and let's do
everything on the command line so it's
alt text look at this I've got over on
the other side hey you got something
thumbs up so we're gonna do all through
March I don't want to do just vim and on
the command line but let's show some of
the other things that we can do let's
let's show WPF one neck core let's let's
show a little xamarin but let's really
get around and show some of these other
cool things that we can do with dotnet
because I don't think folks really
appreciate all of the amazing things
that folks are doing with dotnet with
her it's on a Raspberry Pi or on a
little IOT device or on a big cloud
surface doing artificial intelligence or
right the desktop apps that we have
folks running little apps to to put
gifts and mpegs up on the screen behind
them I don't know anybody who does let's
really look at all the cool things that
folks can do with dotnet let's celebrate
them yeah so in the theme of Max yes
you've got the May thing absolutely so
May all months in May all through the
month we are on the Mac developing with
Visual Studio for Mac yep so watch well
first of all if you're watching this and
you're like what do I do next download
Visual Studio for Mac I mean that's you
know that's part of what this is all
about too is watch Visual Studio for Mac
Twitter handle and the Visual Studio
blog we're gonna be publishing all these
videos later this week along with code
and the the slides and we're also going
to tell you how you can run your own
local event and we will send you swag
including stickers and t-shirts and
stuff to give away at your local event
so we'd love to get in touch with local
meetups that are doing that you know
that are using Mac's and also companies
you know if your company is like very it
has a big group of developers using Mac
put on a local event we'll send you some
swag absolutely yeah let me take a look
back at the chat room here let's see
what some of these folks have said to us
you strike a chord with the minimal
March ah oh yes right here look Carnegie
Jay Wow big thumbs up for that T pros
senior we used it to go dotnet on Linux
look at that right let's see folks are
suggesting that during march
let's limit discussion to fidonet forums
might be a little tricky yeah maybe
bring in using that maybe not I'm have
to get out my 56k modem get dialed up
there right here here we go
ASP nerd right away is saying we use
Visual Studio I'm for Mac and have
sessions so this is for future events
we're not saying like hey because you
did a thing we want you to actually use
this way to promote your event people
show up to give away as prizes and stuff
so that's the idea very cool all right
let's do give away some stuff let's do
three trivia of the sponsors then do one
of yours and then we'll do the grand
prize from okay so I know seven from aim
high now so a Maya is kind of cool
because what you you realize what
they're doing they're enabling the
tribes to be able to take more to take
advantage to get employed in these are
Native Americans needed North Americans
yeah to get employed
you know you think yeah yeah they're
training them up and doing a bunch of
that kind of stuff very that's what game
high is about and and they work with the
Spokane tribe so go ahead and their
question is what type of housing did the
Spokane tribe Indians traditionally
build and this is for a t-shirt this is
for okay this is wear a t-shirt a HIPAA
complete t-shirt it says here all right
very nice so from aim high pro take a
look at the chat room people are asking
for a link to would help them it will
not help they will not help them well
they just want to know I'm doing a copy
and paste no but somebody oh you know
what someone I kind of got it
now let's get it correct
I mean well okay I think you go as you
go got it yeah I think you go got it
yeah yeah all right there we go
well played next one is from nasties
what are we given away from nastas we're
giving away documents to do professional
license right Gnostic doctrine studio
professional license and it includes I'm
not seeing the complete thing here it
includes Amerind document viewer control
oh nice nice all right
and the question is when was the first
public release of Visual Studio for Mac
made hmm I don't think it was 1987 now
so you can start counting up from there
but don't count backwards from now when
we got it
Wow
fakirs got that one correct I okay so
I've seen hucking in and right there on
a first-name basis with me and I always
think twice before I pronounce their
name well done yes I see it very
carefully T Pro senior all right what do
we got now Sikh fusion so our friends
didn't see fusion they make controls as
well yep which by the way I just love
that about the dotnet ecosystem
especially lately with things like
you've got xamarin for controls sure
you've also got blazer now with controls
is we WPF and waveforms exactly I think
that's really like a really cool part of
the whole dotnet ecosystem it's like hey
if you want to build it all yourself you
want to write all your own code or pull
on open-source that's cool if you want
to pay and get a professionally
developed product with professional
support and all that there is a huge
amount of really great tools out there
yeah yeah they're high-quality and
they're gonna make your application look
great yep so did you tell them that the
sync fusion is offering a $50 Amazon
gift card I should tell them that I
think you should
okay go infusion is offering a $50
Amazon gift card thank you very much
thank Fusion thank you
all right their question for us is holy
crap in Visual Studio for Mac how do you
add new get packages from custom Oh new
get feeds that's a good question
that's a that's a tough one and this is
this is a really long answer it's a
really long answer and you must get it
word-for-word this is really long it's
read the docs on SharePoint Thank You
Hugo Hugo always comes through with the
show I know right right you go with the
share points you just match the sound
just backup the SharePoint right with
home bro interesting Dan Siegel is close
is what about Dan I mean oh look at be
rad more no no it's a custom feed it's
the key oh there we go
it's beer add more thing no brow or P so
we have a code demonstration in the
studio from Aaron but Brauer Pete I
think has it yeah yeah I think that's
yeah that is good brow RP interesting
there are people showing also the
command line which works but in Visual
Studio for Mac is the correct the the
key here was in Visual Studio for Mac so
who want it a brow or PPR oh wo RP yep
alright awesome so we've given away a
whole bunch of prizes here there's what
the one more that we were gonna give
away from uno yep
are we are we're nearing the end of it
here anyway we actually are we're
supposed to they're gonna kick us we
have one minute I'm sorry we're out of
time we can't give away I'd like to
thank Matt Damon I'm sorry we had to
bump him again today well played so this
is this is the final question the final
question and there
is a cool one from uno platform it is
the price from uno is a ruko that's the
oh my gosh are you kidding an F 11 Pro
drone 4k quadcopter what are you kidding
is this rigged because I would like that
I know right I mean you might you guys
all my is beatdown C sharp Fritz has the
correct answer you know congratulations
alright fine we will ask the question
all right
yes huge prize Jeff's code party hat
actually we give those away over on my
channel so this question from uno first
person to get this question right we'll
get the quadcopter people are already
guessing share point I just know that
well that's SharePoint or rigged rig all
right here we go
47 the question is in addition to
Windows where else can windows
calculator run thanks to you know plan
this is a really good question so we
know it's not sharepoint no 42 well so
the answer I'm just going to tell you is
a few places you can't list just one
gona's is not quite what is Daisy they
said all of them I think Dan Siegel and
Siegel no listen to this our directors
in the other wing yelling uh how many of
us feel like we should award it to dance
I think that I think yeah yes the answer
is what was Mac browser iOS Android yep
yep it's there you go Dan Siegel he got
it right all right right
hey I don't have a celebration solid
there we go so you know what Dan lives
not sitting you can just let's hang I
have it all in two and we can fly that
drone together
that so can you can you bring that to
twitchcon and just fly it around over
the event just maybe freak out some of
the people there Wow a little bit this
was a another fast code party it was we
went through I think we I think we gave
away all of our prizes very quick very
very anxious we're just throwing them
out throw stuff at people
dances let's do lunch and we can go yeah
there you go all right I want pictures I
think so all right get that on your
Instagram okay well we're supposed to do
every Microsoft presentation needs call
to action the call to action for you
today is sign up for Jon's Instagram so
you can see the drone flying yes right
download Visual Studio for Mac visual
stereo for Mac install visual studio
from yes eat a doughnut yeah yeah built
something cool with Visual Studio for
Mac get ready for May
get ready for May is for Macs yep click
that follow button you're here on the
visual studio channel make sure you're
following the visual studio channel yes
at the visual studio channel and we
actually have a visual studio Mac
channel so and we can put that in the
thing as well but if you're I mean so
both are cool to follow but Visual
Studio Mac channel we actually we've got
what 22 hundred followers now I mean
this is where you will get your specific
- yeah sorry Visual Studio Mac Twitter
sorry okay yep so I'm putting that
little link and we probably should end
soon because I have - okay we should
totally and I think that's a show all
right thank you so much or something
we're done look at the lights going oh
my goodness that's a party thank you so
much why did they tell us we could have
had that going the whole time
I know take care everybody we will see
you for we've got dotnet conf with Sam
rain coming up in just a few weeks yeah
we'll see you then all right good job
you guys