Until The Next Exception

29 בJanuary 2015

,The best practices
.Basically this is job for a Xaml Designers. But you can do so by your own simply
Both of my suggestion are based on missing property of WPF itself, something like
..HorizontalSeperationRatio and VerticalSeperationRatio
.So we will be must add it by our self , using some nice trick
Like everything else DataGrid has templates, to be specific DataGris is built from Columns, Rows, Cells. But only Cells and Rows provide Templates, what left us with templating for Rows and
.Cells
.Inside every Template usually has the Core, and that probably some kind of ContentPresnter
.What we need is to surround it with proper...

21 בJanuary 2015

,If that was happened to you, mining you are in deep problem
?But, my point is different. what if it came from no were and not a clue why
The biggest problem is that sometime when the exception is deep, you just cannot debug your
.app anymore
So maybe if we could get information a second before this exception , something like => " hey
"...dude watch out ! its about memory ending
:That leading to next idea
public static void ProccesProfiler()
{
Timer timer = new Timer();
...

6 בJanuary 2015

I was presented a nice trick and solution for case we like the ViewModel get noticed on View
:Loaded , I am talking about this one
.I just forget to show the behavior way to deal with it which is definitely an elegant solution
:You can add simple Behavior like this
public class ViewVisibilityObserverBehavior : Behavior<Window>
{
protected override void OnAttached()
{
AssociatedObject.DataContextChanged += AssociatedObject_DataContextChanged;
AssociatedObject.Loaded += AssociatedObject_Loaded;
AssociatedObject.IsVisibleChanged += AssociatedObject_IsVisibleChanged;
base.OnAttached();
}
void...