Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Which is the way Better way to override the Behaviour of a WPF control - Adding event handlers in code behind or adding Behavior class for the same

$
0
0
Recently I encountered a problem in my custom numeric control, which can take double values. But in certain scenarios it must be restricted to take only integers. Here, I have 2 ways to do it. Either handle it in the textchangedeventhandler of the textbox or create a behavior class for the custom Numeric textbox. I need to understand which one is better as per performance, standards and scalability.

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>