Integration with ReactiveUI

Dynamic Data

I have released DynamicData.ReactiveUI which is a very simple adaptor layer to assist with binding dynamic data observables with reactiveui’s ReactiveList object.

Install from Nuget

Nuget

If you are not familiar with dynamic data and what it enables I suggest:

  1. Go through previous posts in the blog
  2. Download the example wpf app from github
  3. .

To cut to the chase, here’s an example. The code takes existing in-memory trade objects, transforms them into a view model proxy and updates the target reactive list object with the resulting change sets. It also pre-filters the data with live trades, applies a user entered filter, orders the resulting data and disposes the proxy when no longer required. Phew – all that in effectively one line of code.

I did the same example without using Reactive UI code see Trading Example Part 3. Integrate with UI where I have explained the code in greater detail

View original post 16 more words

MVVM in the web world

C# Disciples

Introduction

Lately I have been experimenting with some web and I must say. the web is really making really amazing advances. The JS libraries out there are pretty awesome and make your job much more fun that it was a couple of years back !

One library that really really impressed me is (no not JQuery even though I must say I am quite impressed with JQuery as well !!) Knockout.js. The idea behind Knockout.js is to introduce MVVM to the world of web… One might ask does it even make sense to introduce a pattern like MVVM, how will it work without data binding capabilities ?? Well easy, bake binding capabilities in the library Smile and that is what Knockout.js is all about.

I will not give a deep dive to knockout but I will just show some of the capabilities of this library and then explain why I…

View original post 814 more words

How to edit WPF Datagrid cell

Chanmingman's Blog

This article will show you the way to change the cell in WPF Datagrid.

I have been reading people asking how to change the cell in WPF Datagrid. A lot of article with a lot of theory somehow the code won’t work.

I give you only 2 pieces of code here.

The first one, MainWindow.xaml. Replace your xaml code with the code below.

<Window x:Class=”WpfAppDataGrid.MainWindow”

        xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation”

        xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml”

        Title=”MainWindow” Height=”350″ Width=”525″>

    <Grid>

        <DataGrid Name=”dataGrid1″ HorizontalAlignment=”Left” Height=”160″ Margin=”26,23,0,0″ VerticalAlignment=”Top” Width=”419″ AutoGenerateColumns=”True” />

        <Button Content=”Refresh” HorizontalAlignment=”Left” Margin=”26,211,0,0″ VerticalAlignment=”Top” Width=”75″ Click=”Button_Click”/>

        <Button Content=”Modify” HorizontalAlignment=”Left” Margin=”123,211,0,0″ VerticalAlignment=”Top” Width=”75″ Click=”Button_Click_1″/>

        <Label Name=”label1″ Content=”Label” HorizontalAlignment=”Left” Margin=”26,255,0,0″ VerticalAlignment=”Top” Width

View original post 447 more words

Blog at WordPress.com.

Up ↑