Showing drag/drop feedback on the WPF adorner layer

Why adorners?In the last sample, I showed how to allow the users to drag and drop shapes in a Canvas, and how to create a preview effect for the operation. One problem with this code is that it only works on Canvas panels. In this post, we’ll look into using the adorner layer in the…

12

Service Operations in ADO.NET Data Services

One way in which you can expose additional resources from your ADO.NET Data Service is to implement “service operations” on your WebDataService subclass. For example, let’s say we want to return all customers in a given city in a pre-baked entry point. We can write this code on the server: public class WebDataService1 : WebDataService<…

9

Updates to URL syntax for December CTP of ADO.NET Data Services

This post talks a bit about updates from the last post on the URI format. In that post, we discussed how we were considering having a “full form” and a “compressed form” for syntax. With the convergence of using ATOM and JSON as the serialization formats, we’ve been able to converge on the URI format…

8

Database Design Books

A few days ago a friend of mine asked for some books I could recommend about developing databases. This is my personal list based on personal likes – to be extra clear, this is not an endorsement from my employer. An Introduction to Database Systems, by C.J. Date. A great book that covers all sorts…

8

Avalon, high DPI and screen real estate

Today, beloved readers, I will weave a story of powerful forces in conflict with each other through time, and how Avalon saves the day… As time goes by, screens are getting better resolution for the same physical size. This means we get smaller content, and more “room” to put that content in. My home LCD runs…

8

StackPanel, DockPanel and scrolling items

I spent a little bit of time with this the other day, and I thought I’d pass the learnings on, in hopes it helps someone. This is the layout what I was trying to accomplish with WPF. In a section of my window, I wanted a bit of text at the top, and then the…

7

Do Da Drag Dance, Dude

Ha! Check out the blog title – it’s so… so… alliterative. I’m so witty, sometimes I wonder why I’m not making millons on SNL. Lately it seems everyone around me wants to know more about drag drop in Avalon. So, after sending little samples around multiple times, I’ve decided to just go ahead and post…

7

Spell checking in Windows Presentation Foundation

One of the features that impressed PDC attendees was the built-in spell checker in Windows Presentation Foundation. Activating it is just as simple as setting the IsSpellCheckEnabled property to true on a TextBox or RichTextBox control. <DockPanel xmlns=”http://schemas.microsoft.com/winfx/avalon/2005″> <TextBox IsSpellCheckEnabled=’True’>This text is wronw.</TextBox> <RichTextBox IsSpellCheckEnabled=’True’>  <FlowDocument><Paragraph>This text is also wronw.</Paragraph></FlowDocument> </RichTextBox></DockPanel> Users will get red ‘squigglies’ under the…

7

Getting ADO.NET Data Service error details on client

When you are working with ADO.NET Data Services, errors are returned through the HTTP mechanism. Right now the most straightforward way of handling any errors on the client is by catching a WebException and using it. Something that is a bit obscure is that even though an exception has been thrown, it’s possible that a…

7

Optimistic and Pessimistic Concurrency – A Simple Explanation

I remember that this was a tricky thing for me to understand and remember when I first got started with databases, so I thought I might help someone out by explaining these in a simple way. Optimistic and pessimistic locking (or concurrency control) are ways of addressing a problem such as the following: User A…

6