Harsha projects

Yet another Tech blog !

Archive for the ‘WPF’ Category

WPF Performance Suite

leave a comment »

While reading more about the Rendercapability Tier, I bump into couple article where they mentioned about the WPF Performance Suite which comes with Windows SDK but I couldn’t find the Perforator tool alone.

Just lucky to find the link at the following site:

Direct link:
First install:

and then patch:
When the patch installer prompts, choose “Repair”.
This WPF Performance Suite has two Tools: Perforator and Visual Profiler.

More details:



Written by Harsha

February 4, 2017 at 10:46 PM

Posted in C Sharp, WPF

Getting Property/Method Name

leave a comment »

Hope you are using INotifyPropertyChanged and also implemented same. When we are raising the event, we also need to supply the property name, usually we hard-code it. So this article about getting the property name from within the property block(setter block).

Here is the code and comments:

    private string _BindedStringProp;

        public string BindedStringProp
                return _BindedStringProp; 
                _BindedStringProp = value;
                //Following line, RawpropName will have value "set_BindedStringProp"
                string RawpropName = MethodBase.GetCurrentMethod().Name;
                //but we need correct property name which will get when we remove first 4 characters.
                string RequiredPropName = MethodBase.GetCurrentMethod().Name.Substring(4); 
                //Following is best way to get the Property Method.

        private void RaisePropertyChanged([CallerMemberName] string propertyName = "")
            //[CallerMemberName] is doing all the magic.
            if (PropertyChanged != null && !string.IsNullOrEmpty(propertyName))
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));

            //But when you check the same in a method, we will get correct method name and 
            //no substring is required.
            string propName = MethodBase.GetCurrentMethod().Name;

Please leave your comments.

Thank you.

Written by Harsha

August 27, 2014 at 12:46 AM

Posted in C Sharp, WPF

Simple MVVM Application

leave a comment »

I have added a MVVM Example in GitHub:


This simple project is an implementation of Log-in Screen in WPF using MVVM pattern. 


Please leave your comments.


Written by Harsha

August 26, 2014 at 1:50 PM

Posted in WPF

Tagged with , ,