DataTemplates in WPF

  Рет қаралды 61,887

DotNetSkoool

DotNetSkoool

8 жыл бұрын

Hey Guys, Let us learn about data templates in this lecture. Data Templates in WPF visualize data to the screen. So if you are working with complex types then you should understand data templates. Please do like share and subscribe.

Пікірлер: 31
@anupx73
@anupx73 7 жыл бұрын
What I like most about his training is slow and steady explanation.
@rajaudhay888
@rajaudhay888 10 күн бұрын
Excellent
@Jwhite1979
@Jwhite1979 3 жыл бұрын
This guy, I swear. Most helpful videos around.
@chandranshugautam8070
@chandranshugautam8070 2 жыл бұрын
Great video. Much better than Udemy courses. Thank you so much man. Thanks.
@fouadchelfi2590
@fouadchelfi2590 6 жыл бұрын
Thank you very much, i hope you to add more tutorials in .NET Envirement like create wpf mvvm c# project, for better understanding.
@jeremiahseitz9842
@jeremiahseitz9842 7 жыл бұрын
This is the best video tutorial on WPF I have seen yet. Well done! Even better than the PluralSight course, with much more detail.
@dotnetskoool5809
@dotnetskoool5809 7 жыл бұрын
Jeremiah Seitz made my day... thanks
@erkkitr
@erkkitr 7 жыл бұрын
Excellent Work!
@prakashsrinivasan7840
@prakashsrinivasan7840 2 жыл бұрын
Very nice explanation 👌👍
@rickfuzzy
@rickfuzzy 2 жыл бұрын
Great explanation
@buskilamaor9587
@buskilamaor9587 6 жыл бұрын
Very nice tutorial, you had it right with the person object, you just set this.DataContext = this; and not to obj or obj.ToString() which resulted in setting the screen in to its on DataContext.
@NdamuleloNemakh
@NdamuleloNemakh 5 жыл бұрын
this is great, THANKS
@rajaudhay888
@rajaudhay888 2 жыл бұрын
It's very nice
@rahulsalinskee7685
@rahulsalinskee7685 7 жыл бұрын
Thank you very much for your time to record the series of wonderful session. As a beginner, it has helped me a lot to understand the concept in a clear and systematically way. You explained in a crystal clear way. It would be more helpful for me if you can teach us how to insert, delete, fetch (All possible move with database) the data from database (SQL DB, using Entity Framework). I am trying to find but am not getting which can teach me clearly. Please record a session and upload it or if you have already recoded your sessions, then please share the direct URL.
@svilenpavlov947
@svilenpavlov947 2 жыл бұрын
Hey, this is great, thank you! Do you mind making a video about the DataTemplateSelector?
@tkmaliren
@tkmaliren 7 жыл бұрын
Very well demo.. nice one, just want to know about What is ItemTemplate? Please let me know if we have lecture on that too.
@pulkit9479
@pulkit9479 7 жыл бұрын
Thanks a lot Sir for the wonderful tutorial! Have got a query in this video. In the constructor of the MainWindow class where the Data Context has been set as: "this.DataContext = this;" Everything works in this case. But if I set the Data Context as "this.DataContext = obj;", I do not see anything in the label after running the application. Could you please clarify what difference obj and this are making?
@yesvee7377
@yesvee7377 2 жыл бұрын
'Obj' is a property in the main window class of type person, so by setting datacontext as 'this' we can bind to the 'obj' property. If the datacontext is set to 'obj', which has a property Name, so you can only bind to 'Name' not 'obj' in xaml
@Trzbne
@Trzbne 6 жыл бұрын
Thank you for the tutorial. I think the example is not sufficient here. What if I do not want to represent a single piece of data, but a more complex, for example a concatanated string from FristName and LastName? How should I use Binding then?
@diraneserges6076
@diraneserges6076 Жыл бұрын
Great Video , but i have a question, I inserted a Button inside the datatemplate with name : button_start. now i want to disabled this button in Code behind C# , but this buttonName does appear, please how i can solve it
@IrahCy
@IrahCy 2 жыл бұрын
Why should we use datatemplate when we can bind the property by obj.Name ?
@shilpimittal4322
@shilpimittal4322 7 жыл бұрын
Thank you for the great videos. I have a query, if I used the code as: , then also it worked fine without DataTemplates. plz explain.
@aparnabhattacharya3921
@aparnabhattacharya3921 6 жыл бұрын
@dotnetskool Exactly even i have the same question. Data Template use is not clear in this video. Can you please be more specific.
@duncanmcdonald5250
@duncanmcdonald5250 6 жыл бұрын
I'm pretty new to this myself, so I could have completely misunderstood how Data Templates work. I think the example here is too simplistic to explain what you can do with a Data Template. As Shilpi points out, we can achieve the same result quite easily by just binding the Label to obj.Name. But what if we consider the previously defined Person class used in the "Data Context Property in WPF" tutorial? public class Person { public string FirstName {get; set; } public string LastName {get; set; } public int Age {get; set; } } and then define the Data Template as:
@ankukumar7874
@ankukumar7874 4 жыл бұрын
I am creating a new person class in the project not in MainWindow.xaml.cs and then creating an instance of the person in MainWindow.Xaml.cs and initializing it there itself and then set the DataContext but I get nothing displayed on screen when I binded Label Content with object that I have created, you're at least getting the namespace.Pesron, kindly help I think I am missing some small basic concept.
@dotnetskoool5809
@dotnetskoool5809 4 жыл бұрын
Tough to tell, but make sure You are using correct obj name in binding. Before that u should build yr solution and then get the namesapace local (in our case dataTemplate demo,in yr case your proj name) Then play with datacontext. Hope it will work
@mohankrishna1699
@mohankrishna1699 3 жыл бұрын
Why cant we use something like this and set DataContext = obj; as shown in previous example of DataContext Property.... This is working, but i am not able to understand why and when we have to use dataTemplates
@mihrabhena3550
@mihrabhena3550 6 жыл бұрын
If I use person obj in code-behind like this: Person aPerson = New Person(); aPerson.Name = "Virat Kholi"; This.DataContext = aPerson; and ... in xaml like this: // Nothing shows up. What is the problem here? Can you please explain?
@Daniel-xt9lm
@Daniel-xt9lm 6 жыл бұрын
I have the same problem.
@mathnewph
@mathnewph 5 жыл бұрын
I'm a beginer but arn't u just set up the template of the label and never call it
@yesvee7377
@yesvee7377 2 жыл бұрын
You should to bind to aperson.name
Routed Events in WPF
15:29
DotNetSkoool
Рет қаралды 47 М.
WPF MVVM Implementation
28:41
DotNetSkoool
Рет қаралды 92 М.
UNO!
00:18
БРУНО
Рет қаралды 3 МЛН
How Many Balloons Does It Take To Fly?
00:18
MrBeast
Рет қаралды 208 МЛН
Finger Heart - Fancy Refill (Inside Out Animation)
00:30
FASH
Рет қаралды 29 МЛН
Control Templates In WPF
11:01
DotNetSkoool
Рет қаралды 57 М.
How to use DataTemplates in WPF
7:05
Brad Cunningham
Рет қаралды 40 М.
Commands In WPF
20:34
DotNetSkoool
Рет қаралды 76 М.
Data Binding Modes in WPF
12:51
DotNetSkoool
Рет қаралды 93 М.
Types of Triggers in WPF
14:13
DotNetSkoool
Рет қаралды 54 М.
WPF Resources
15:10
DotNetSkoool
Рет қаралды 77 М.
The Basics of Data Binding in WPF
20:53
Tactic Devs
Рет қаралды 38 М.
WPF Data Template 2019
12:05
Edwin Cloud
Рет қаралды 7 М.
How and why to use Content Presenters in WPF
9:00
Brad Cunningham
Рет қаралды 28 М.
UNO!
00:18
БРУНО
Рет қаралды 3 МЛН