DataTemplates in WPF

Поделиться
HTML-код
  • Опубликовано: 30 окт 2024

Комментарии • 31

  • @memorylanezz
    @memorylanezz 7 лет назад +8

    What I like most about his training is slow and steady explanation.

  • @Jwhite1979
    @Jwhite1979 3 года назад

    This guy, I swear. Most helpful videos around.

  • @chandranshugautam8070
    @chandranshugautam8070 2 года назад +1

    Great video. Much better than Udemy courses. Thank you so much man. Thanks.

  • @rajaudhay888
    @rajaudhay888 3 месяца назад

    Excellent

  • @jeremiahseitz9842
    @jeremiahseitz9842 7 лет назад +1

    This is the best video tutorial on WPF I have seen yet. Well done! Even better than the PluralSight course, with much more detail.

  • @rickfuzzy
    @rickfuzzy 2 года назад

    Great explanation

  • @prakashsrinivasan7840
    @prakashsrinivasan7840 3 года назад

    Very nice explanation 👌👍

  • @fouadchelfi2590
    @fouadchelfi2590 6 лет назад +3

    Thank you very much, i hope you to add more tutorials in .NET Envirement like create wpf mvvm c# project, for better understanding.

  • @rajaudhay888
    @rajaudhay888 3 года назад

    It's very nice

  • @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.

  • @erkkitr
    @erkkitr 7 лет назад +1

    Excellent Work!

  • @svilenpavlov947
    @svilenpavlov947 2 года назад

    Hey, this is great, thank you! Do you mind making a video about the DataTemplateSelector?

  • @rahulsalinskee7685
    @rahulsalinskee7685 8 лет назад

    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.

  • @NdamuleloNemakh
    @NdamuleloNemakh 5 лет назад

    this is great, THANKS

  • @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

  • @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.

  • @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

  • @pulkit9479
    @pulkit9479 8 лет назад +1

    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?

  • @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 лет назад +1

    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 лет назад +1

      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

  • @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:

  • @IrahCy
    @IrahCy 3 года назад

    Why should we use datatemplate when we can bind the property by obj.Name ?