The best way to design an interface for WPF is using xaml. However, in some situation, we need to change the layout in code. For example, we select a category view, we need to add a new block in a stack panel.
I started to use Visual Studio 2013 for some new projects. I found there are a number of new features make our life easier, such as displaying the number of references for each class and method.
Those small features help us to build the applications easier.
I built a feature to have an animation on the wide of a panel and the user click the minimize button. I wish to create a shrinking effect.
The best way I found is using DoubleAnimationUsingKeyFrames. This kind of animation can targeting any properties which is using a double as its value, such as Wide. Finally, I put the into a storyboard. Like the following
The example is from my opensource project, advgen contact manager
In Winform, to show and hide button is easy. There is a property calls visible in Button class. You just need to set it to be True and Hide. That is a simple bool type. In WPF, that is simple too, but that is not a simple bool type. That is Visibility Type.
You just need to do that: