I have an application that is built with a Metro-Like UI, so each windows has no border and can be resized with the ResizeMode equal to CanResizeWithGrip. Figure 1: The windows can be resized by a little grip on the bottom right border of the window I created another view, use a similar layout from [...]

Continue reading about CanResizeWithGrip seems does not work in WPF

Manipulate a FlowDocument in WPF
on June 20th, 2011
On category: WPF

Sample Code is Here. This is the scenario: I have a FlowDocument in a FlowDocumentScrollViewer as in Figure 1. Figure 1: Initial scenario, a simple flow document. My goal is to be able to highlight some words in the document and show some detailed info about highlighted word to the user. It turns out after [...]

Continue reading about Manipulate a FlowDocument in WPF

I needed a simple way to obtain this simple result: whenever a certain component in the UI (a WebBrowser control) raises some specific event, I want a command in the VM to be executed, without the need to specify any command parameter. The only requirement I want is avoiding a single line of code in [...]

Continue reading about Event to Command in WPF MVVM application

I’m using in a project a modified version of MVVM in WPF originally made by my dear friend Mauro (check his project Radical, it is really cool). Actually I use a custom DelegateCommand to handle communication between View and the View Model. Here is a sample snippet on how I initialize a command in View [...]

Continue reading about Loving MMVM and asynchronous operations

WPF binding a text with decoration
on April 19th, 2011
On category: WPF

Suppose you need to show some decorated text in a MVVM WPF application, something like 2, 9, 16 Dicembre 2011 And all the decorations are inserted by some business logic, for example bold if a value is greater than X, strikethrough if the value is less than Y, or similar logic. I want the interface [...]

Continue reading about WPF binding a text with decoration