Showing posts with label WPF. Show all posts
Showing posts with label WPF. Show all posts

Thursday, March 19, 2009

Daily Links 19/03/2009

Silverlight 3 out to play
Silverlight 3 links
DataForm Control
Out of Browse Experience
Overview: .NET RIA Services
I think this is where Silverlight starts to differentiate itself from the competition - RIA LOB application development.
WPF has just become the ugly cousin :)

Silverlight 3 for business applications - video

Moq 3.0 RTM!!!
Now with Silverlight support

Modal Window in Silverlight

Silverlight ReaderWriterLock Implementation

Visibility pattern in Silverlight

Mirroring Subversion from Windows

Free WPF DataGrids
XCeed WPF DataGrid
Seems to be the most popular free datagrid offering. Requires registration and download of express edition requiring a licence key.
Microsoft WPF Toolkit includes a datagrid.
The toolkit currently has over 12000 downloads, so by codeproject standards, it's quite popular too.
Seems the xceed version has grouping capability, which the microsoft version does not.

Reflection: Dodge Common Performance Pitfalls to Craft Speedy Applications

The Computer Performance Shell Game

Sunday, March 8, 2009

Wednesday, February 18, 2009

WPF Radio button binding (Enums and bug fixes)

I recently began implemented binding two radio buttons to a single enumeration value on an object, and was faced with two problems:
1) How do I bind the IsChecked boolean to an enumeration?
2) Once 1) was completed and even though it was using TwoWay binding, when the enum value was set outside of the UI, then the radio button would loose it's binding.

Here are the solutions:

1) Use a ValueConverter combined with ConverterParameter to bind the enumeration to the boolean IsChecked:
XAML:
<EnumBooleanConverter x:Key="ebc" /> <!-- declared in the UserControl Resources -->
...
<RadioButton  x:Name="rdoMale" Content="Male" IsChecked="{Binding Path=Gender, Mode=TwoWay, Converter={StaticResource ebc}, ConverterParameter=Male}"/>
<RadioButton  x:Name="rdoFemale" Content="Female" Margin="5" IsChecked="{Binding Path=Gender,Mode=TwoWay, Converter={StaticResource ebc},ConverterParameter=Female}"/>

C#:

  public class EnumBooleanConverter : IValueConverter

    {

        #region IValueConverter Members

 

        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)

        {

            var ParameterString = parameter as string;

            if (ParameterString == null)

                return DependencyProperty.UnsetValue;

 

            if (Enum.IsDefined(value.GetType(), value) == false)

                return DependencyProperty.UnsetValue;

 

            object paramvalue = Enum.Parse(value.GetType(), ParameterString);

            return paramvalue.Equals(value);

        }

 

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)

        {

            var ParameterString = parameter as string;

            if (ParameterString == null)

                return DependencyProperty.UnsetValue;

 

            return Enum.Parse(targetType, ParameterString);

        }

 

        #endregion

    }

..that worked great, until I set the value of the enum from code (ie: not by clicking the radio buton), so...

2) turns out, having read this post, it seems that if radio buttons belong to the same group, they confuse each other (or at least that's how I interpreted it). So I changed the XAML to:
<RadioButton  GroupName="Male" x:Name="rdoMale" Content="Male" IsChecked="{Binding Path=Gender, Mode=TwoWay, Converter={StaticResource ebc}, ConverterParameter=Male}"/>
<RadioButton  GroupName="Female" x:Name="rdoFemale" Content="Female" IsChecked="{Binding Path=Gender,Mode=TwoWay, Converter={StaticResource ebc},ConverterParameter=Female}"/>

... and it's "all sorted m8!" :)

Wednesday, November 5, 2008

Daily Links 05/11/2008

Silverlight Toolkit released on Codeplex
"collection of Silverlight controls, components and utilities made available outside the normal Silverlight release cycle"

Silverlight Tools RTW released
was wondering why the previous release was labelled RC1 :)

Building a Silverlight Line-Of-Business Application - Part 2
Covers DataGrid functionality - comparing the silverlight datagrid to the very capable open-source grid from DevExpress

Silverlight and IIS Smooth Streaming
All I can say is....wow :)

Silverlight and WPF Tookit
woohoo! WPF finally gets VisualStateManager

DatePicker & Calendar released for WPF

Compiled LinQ Queries
Speed up LinQ to SQL performance

Linq to SQL: Delete an entity using Primary Key only

New IT Architecture resource

Premier Survey
Conduct online surveys for free :)

40 Beautiful Free Icon Sets

Monday, August 18, 2008

Daily Links 18/08/2008

Log4PostSharp - logging with AOP
Add logging to your application using AOP (ie: don't bloat your code with log statements - AOP does it all in the background by hooking into the method calls)

Moq
"take full advantage of .NET 3.5 (i.e. Linq expression trees) and C# 3.0 features (i.e. lambda expressions) that make it the most productive, type-safe and refactoring-friendly mocking library available. And it supports mocking interfaces as well as classes. Its API is extremely simple and straightforward, and doesn't require any prior knowledge or experience with mocking concepts. "
Interesting...think I'm going to check it out :)

Mocking and IOC in Silverlight 2, Castle Project and Moq ports
temp solution for those of us doing TDD for silverlight BETA. Hopefully a permanent solution will follow shortly.

Silverlight 2 Tools, SQL Server 2008 and Visual Studio 2008 SP1 Installed & Working Together

WPF splash screen template for VS

What’s new in WPF 3.5 SP1: Splash Screen to improve perceived startup performance

Free WPF and Sivlerlight components

Free (Lite Version) Icon Editor Addin for Visual Studio 2008

A Common Base Class for LINQ to SQL

Burn Your Burn-down Charts
using Burn-Up charts to depict project focus as scope changes

Thursday, August 7, 2008

Daily Links 07/08/2008

The Request/Response Service Layer
Maintain the granularity of your WCF services, whilst allowing multiple requests in a single call - follow-up to the previous "batching WCF services" posts.

Silverlight Streaming
Host up to 10 Gig of silverlight for free!
More details here

Effects and Transitions for Silverlight

Real-Time Multilingual WPF Demo
Multi-language support using Google's AJAX translation API

Introduction to IoC/DI - The art of Decoupling

Agile Project Planning

I've been looking at LINQ lately to implement data access on the DAL. One of my requirements to to be able to specify queries at runtime. Here are some articles which I've found quite informative

Build your own electric car

Friday, July 25, 2008

Daily Links 25/07/2008

Lutz Roeder has some pretty handy .NET utility applications
...the most popular being the .NET reflector for inspecting the contents of .NET assemblies (reverse engineering them to code again)

New Silverlight Learn page
much improved/organised learning resource/links for Silverlight 2

Using a DSL to create a fluent interface for unit testing your domain model
English: Create object builders with Domain Specific Language methods in order to provide mock objects with specific data to your unit tests. Highly recommended for TDD.

Table variables v temporary tables in SQL Server
Handy article on the difference between table variables and temporary tables in SQL Server. Both are very handy in optimising your database transactions.

10 Principles of Agile Project Time Management

Managing an Agile Software Project

Example Product Backlog & Sprint Backlog

Unit Test Boundaries
What makes good / defines unit tests? Highlights that they really should be separated from integration tests (which include DAL "unit" tests)

WPF Tutorial - Using MultiBindings

WPF Links - 21 July 2008

Free books on Version Control with SVN

Comparing Objects For Equality in .NET

Arrange Act Assert and BDD specifications
New RhinoMocks 3.5 syntax making AAA (Arrange / Act / Assert) testing pattern more clear and discernible.

.Net Threads - 10 Best Practices

Google WebMaster Tools (free)
" - Automatically inform Google when you update your pages
- Discover your links and see how users are reaching your site
- Enhance and increase traffic to your site
- Learn more at Webmaster Central "

Tuesday, July 15, 2008

Daily Links 15/07/2008

PostSharp
"PostSharp is an free, open-source and extensible platform for enhancement of .NET assemblies"
"provides aspect-oriented programming (AOP) to .NET Developers without the learning curve"

Silverlight, Blend and WPF Tutorials

Using a value converter to bind to Visibility in the Silverlight data grid

Pushing Data to a Silverlight Client with a WCF Duplex Service

Getting started with WPF

Differences between SharePoint Services (WSS 3.0) and Office SharePoint Server (MOSS 2007)

Can someone tell me why i shouldn’t drop WCF?
More on the previous "batching WCF calls" post.

NDepend: code metrics at your service
Good summary article on NDepend functionality
"analyze code structure, specify design rules, plan massive refactoring, do effective code reviews and master evolution by comparing different versions of the code"

July '08 TFS Power Tool Preview
Now has filtered alerts for TFS work items.

Theme Controls in Silverlight

Billy Hollis on Getting Smart with WPF
Excellent presentation on how developing with WPF / Silverlight changes the way we think about UI design.

7 Steps to completing your project on time

101 Linq Examples - C#

Scale Cheaply - Memcached
Distributed cacheing solution for .NET

Thursday, March 27, 2008

Daily Links 27/03/2008

Windows Vista SP1 download

.NET 3.5 Redist package
197MB. Includes .NET 2.0 SP1 and .NET 3.0 SP1

Developing a Robust Data Driven UI Using WPF - Introduction

Exploring Secrets of .NET Diagnostics

I'm busy doing research into building a test frawework for our software, and was initially impressed with VS Unit Testing capabilties, and later let down by the implentation and bugs. NUnit is a lot less painful.
Then I found NUnitForVs
With this you can get VS to recognise NUnit tests as MSTest tests. It did however take a bit of fidgeting to get it working.

Integrate XML code comments into Visual Studio 2005/2008 using Sandcastle and HTML Help 2.0


Software Startup Lessons (Part 3) - Marketing, Sales & Growth

Developing a Robust Data Driven UI Using WPF - The DataModel

Event declaration without checking for null
removes the necessity to check for null when firing an event

Generic abstract factory base class (C# 3.0, LINQ)

Wednesday, January 2, 2008

Daily Links 05/12/2007

SQL Server 2005 / 2008 system tray icon application
Looks and acts the same as the service manager for MSDE 2000
Can't fathom why M$ did away with this functionality??

I've been looking into Silverlight 2.0 development of late, and discovered that the UI Controls can be XAML files, which you can code against using Silverlight managed code. So I googled XAML Controls, and find this interesting link. Of I don't think that all of them are currently available to Silverlight, but I'm hoping they will be eventually.

WPF Control Library (.NET 3.5)