Dependency Properties - WPF CUSTOM CONTROLS #2

  Рет қаралды 24,555

SingletonSean

SingletonSean

Күн бұрын

Пікірлер: 21
@Moosa_Says
@Moosa_Says 3 жыл бұрын
What you are doing is a service to WPF .. no one on youtube have touched these topics in this simple way ! kudoos to you sir !
@divyanshagarwal6704
@divyanshagarwal6704 3 жыл бұрын
KZbin algorithm finally worked for me. Very simple explanation. Great tutorial.
@انامسلموكفى
@انامسلموكفى 2 жыл бұрын
U re simply the beste one and u deserve really watching you in youtube, tht's make u for sure a Singlton Chapeau :)
@fallenhoenix1255
@fallenhoenix1255 4 жыл бұрын
Thank you, great tutorial! where do you go to gather your knowledge? MSDN? Books? Other website(s)?
@SingletonSean
@SingletonSean 4 жыл бұрын
Hey Harold, I've gathered it over time from MSDN, a few books, random blogs, and of course StackOverflow! One book I tend to always fall back to is Pro WPF 4.5 by Matthew MacDonald. I haven't explored many books so I can't say it's the best, but it's been helpful. I think the best way to gather knowledge is just building a project, running into something you don't know how to do, and then scavenging online for resources. Sadly WPF doesn't have a crazy amount of documentation and tutorials out there compared to JS frameworks, but hopefully my channel can start to bridge the gap, haha. Great question, thanks for watching!
@FuzzyDPozzy
@FuzzyDPozzy 3 жыл бұрын
As someone who never used dependency properties , it would have been better if you were to show this without the implementation just with simple Console.WriteLine() to when the dependency is running. But regardless thank you , i follow you because you make great tutorials!
@upcsatx
@upcsatx 4 жыл бұрын
Thanks for posting this. At 6:34, why do you use Binding on line 40 instead of a TemplateBinding , as you are doing at 8:42 on line 15?
@SingletonSean
@SingletonSean 4 жыл бұрын
Hey Kirk, that's a great question! At 6:34, we can use a regular binding since we set the Source property on the binding to "this", which is the AnalogClock control that has the dependency property (ShowSeconds) we want to bind to. However, at 8:42, I use TemplateBinding as "syntactic sugar" to automatically specify the Source property for the binding to be the TemplatedParent, which is the AnalogClock control. At 8:42, I could have even used a regular binding and set the source of the binding to be the AnalogClock by using RelativeSource, which I think I demonstrate later in the series. Overall, I used TemplateBinding to automatically set the source of the dependency property I want to bind to.
@노트딕
@노트딕 3 жыл бұрын
@@SingletonSean Thank you for the explanation. I have been following your videos and I really really like the way you describe something.
@solvedplus858
@solvedplus858 2 жыл бұрын
many thanks for your nice tutorial but why did you use bool for property type instead of using visibility directly??
@mehmetturan8500
@mehmetturan8500 4 жыл бұрын
How can a depenced property update itself on xaml when it has been used in user control? when I put user control to the main window. with size I want to see dependency property value at the same time? Mean in user control I have Radius dependency property. on the main window, I m changing with size changed but on xaml code Radius doesn't update itself. Xaml part property doesn't update itself. Please answer
@kritikyorumer
@kritikyorumer 2 жыл бұрын
Sean how to make CustomControl property use with observableCollection. What should add to my Custom Control ?
@phil1105
@phil1105 2 жыл бұрын
Thanks for the super tutorial, very useful. If it is not too much to ask, can you show how you would tie some kind of external command/button to the custom control to make some action in the custom control. For example, if you use the analog clock as a timer instead of a clock. How would you make a button that is not part of the custom control, start. reset, pause and/or stop the timer.
@nihalbayoglu9560
@nihalbayoglu9560 Жыл бұрын
Thank you 🙋‍♀
@FuzzyDPozzy
@FuzzyDPozzy 3 жыл бұрын
Do you know how i can do in mvvm way this? So press the left click button down , turn a boolean to true, then when left button is released turn boolean to false. The thing i dont understand because we use mvvm how do we do that? if(LeftButtonClickIsPressed) return true; if(LeftButtonIsReleased) return false;
@kitkat224
@kitkat224 2 жыл бұрын
question, if i pass True or False as parameter value it works fine, but if i do binding to a variable in window it doesn't work what am I missing?
@marcomelgar5995
@marcomelgar5995 4 жыл бұрын
Hello, How can I convert objects created in WPF XAML and saved or convert in CS format so that they can be added as objects in my visual studio toolbox?
@SingletonSean
@SingletonSean 4 жыл бұрын
Hello Marco, open your toolbox, right click the tab you want to add the objects too (such as General), click "Choose Items...", click the "WPF Components" tab, click "Browse...", and then navigate to your .dll/.exe that has the object. This is typically in the bin folder for your application. Perhaps I will make a video on this, so thanks for the question!
@merwintf
@merwintf 2 жыл бұрын
Hey Sean, how do we unregister attached Properties?
@SingletonSean
@SingletonSean 2 жыл бұрын
Hey Trever! I'm not sure if you can unregistered attached properties, or at least I've never had a reason to do so. Are you running into an issue where you feel it needs to be unregistered?
@merwintf
@merwintf 2 жыл бұрын
So I tried to implement a functionality of confirmation message on combo box item selection, if cancelled it would revert back and I was successful by creating a attached property of type Func but when I close the user control and open it again I can see it being triggered twice and so on on every creation of user control, I just couldn't manage to figure out how to unsubscribe the attached property. Even though the Unloaded event of the control gets called I dont quite see a way to detact the attached property.
Routed Events - WPF CUSTOM CONTROLS #3
16:12
SingletonSean
Рет қаралды 12 М.
Templates and Behavior - WPF CUSTOM CONTROLS #1
15:45
SingletonSean
Рет қаралды 45 М.
Бенчик, пора купаться! 🛁 #бенчик #арти #симбочка
00:34
Симбочка Пимпочка
Рет қаралды 3,6 МЛН
What's in the clown's bag? #clown #angel #bunnypolice
00:19
超人夫妇
Рет қаралды 25 МЛН
Seja Gentil com os Pequenos Animais 😿
00:20
Los Wagners
Рет қаралды 43 МЛН
Dependency Properties in WPF
19:24
DotNetSkoool
Рет қаралды 114 М.
I Rewrote This Entire Main File // Code Review
16:08
The Cherno
Рет қаралды 172 М.
WPF #25 - UserControls Binden & Dependency Properties
10:11
42 Entwickler
Рет қаралды 4 М.
Object-Oriented Programming is Embarrassing: 4 Short Examples
28:03
I Tried C#
4:32
conaticus
Рет қаралды 241 М.
WPF Custom User Control + Dependency Properties
11:12
ToskersCorner
Рет қаралды 56 М.
20. Learn WPF in small Steps: Why Dependency Property?
14:45
mahesh panhale
Рет қаралды 3 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 409 М.
I tried 8 different Postgres ORMs
9:46
Beyond Fireship
Рет қаралды 428 М.