Thank you for your video very instructive. What to do to change template on button press. Should I use VisualStateManager or Triggers ? What is the best practices
Hi Bogdan, I am personally a fan of Triggers but they are WPF specific (does anyone even care about silverlight any more...) But the VSM is also an option. The only advice I have is, if they change you are making is a non animate-able property than triggers work better otherwise you could use either (Triggers or VSM) again, I prefer triggers as I think they are simpler.
Great video and explanation Brad, even when the video is old. But still I have a question. When I have multiple pages and want to use the same templates on all pages, do i have to copy/past them to all pages or is there also a higher level where I can put the general purpose templates to and then simply use them in all the WPF Pages for that project?
Hi Brad, first of all your videos are awesome, thanks a lot for sharing. Now coming to my question. I know that TemplateBinding by default assume control type as Control and binding to content shall raise error do make sense. Setting TargetType takes care of this. But I am surprised to see it works for you. Is this implementation changed later as for me without setting TargetType it gives error.
+Syed Saqib Ali Tipu it worked because the template is nested inside the button element directly as opposed to being in a resource. the editor can tell what the target type is when the template is nested under it directly. hope that helps.
I haven't seen any simpler and better explanation ... Thanks a ton !!!
Great video Brad. Very simple and easy to understand
Great video, just what I needed.
Glad to hear it helped.
Thanks for sharing.. Really cleared my doubts on ContentPresenter. Thumbs Up !!
very nice, thanks
Thank you. Very didactic explanation
Thank you for your video very instructive. What to do to change template on button press. Should I use VisualStateManager or Triggers ? What is the best practices
Hi Bogdan,
I am personally a fan of Triggers but they are WPF specific (does anyone even care about silverlight any more...) But the VSM is also an option. The only advice I have is, if they change you are making is a non animate-able property than triggers work better otherwise you could use either (Triggers or VSM) again, I prefer triggers as I think they are simpler.
Great video and explanation Brad, even when the video is old. But still I have a question. When I have multiple pages and want to use the same templates on all pages, do i have to copy/past them to all pages or is there also a higher level where I can put the general purpose templates to and then simply use them in all the WPF Pages for that project?
Hi Brad, first of all your videos are awesome, thanks a lot for sharing. Now coming to my question. I know that TemplateBinding by default assume control type as Control and binding to content shall raise error do make sense. Setting TargetType takes care of this. But I am surprised to see it works for you. Is this implementation changed later as for me without setting TargetType it gives error.
To avoid confusion i meant the first attempt - binding contentcontrol content to button content using template binding.
+Syed Saqib Ali Tipu it worked because the template is nested inside the button element directly as opposed to being in a resource. the editor can tell what the target type is when the template is nested under it directly. hope that helps.
clear !
Огромное спасибо) Именно то, что я искал.
Awesome work. But you should improve your typing speed
1:59 ContentControl and ContentPresenter
I have spent more than 4mins , i didnt understood contentPresenter .
wpf is really an awful technology