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

Get values from the EventHandler's parameters in DependencyPropertyDescriptor's AddValueChanged Method.

$
0
0
Hi,

I just have seen that, we can get the change notifications from the DP (defined already in a class) 
by using the DependencyPropertyDescriptor and AddValueChanged.

DependencyPropertyDescriptor descrip =  ... //Something;
descrip.AddValueChanged(this, (sender, inboundData) =>
            {
                double val = this.ActualWidth;
            });

Question 1: But I have seen that, the second parameter of that function is of type EventArgs.
How can I type cast this inboundData (of type EventArgs), to get the corresponding data.

I know, I can able to get this one by typecasting the sender (type of object) to the desired type 
and get the data from it.  But I just want to know how I can achieve with this one.

Thanks in advance.

NANDAKUMAR.T


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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