Scan and automatically OCR receipts, bills, letters, etc. without turning on your computer

I was looking for a solution to digitally archive incoming (paper) bills, receipts, letters, etc. to make them easily searchable (OCR). Ideally, this solutions would be as simply as putting a document on your scanner and pressing a button—done: the…

Read More

.NET/C# Binding Custom DependencyProperty to ViewModel Property

Consider the following scenario: UserControl with a custom DependencyProperty ViewModel with an exposed property (using INotifyPropertyChanged) Goal: create two-way data binding between these two properties (i.e., ViewModel property gets updated if DependencyProperty changes and vice versa) ViewModel (implements INotifyPropertyChanged): private…

Read More

.NET/C# Get First Visible Item of a ListBox

This is some code to get the first visible item in a WPF ListBox whenever the user scrolled. In XAML: <ListBox Name="MyListBox" ItemsSource="{Binding SomeCollection}" ScrollViewer.ScrollChanged="ScrollChanged"/> In the code-behind: private void ScrollChanged(object sender, ScrollChangedEventArgs e) { VirtualizingStackPanel panel = FindVisualChild<VirtualizingStackPanel>(MyListBox); if…

Read More