little implementation for wpf