Argentum Tela Design Surface[19]

by Administrator 12. January 2009 20:35

The AGT (Argentum Tela) series of articles is an effort to do two things. Usually an idea is presented only in its finished form. The first goal is to do some Reality Blogging, to show an idea evolve over time without pulling any punches. The second goal, and the example vehicle for the evolution aspect, is an extensible Design Surface for Silverlight similar to what we have in Visual Studio 2008. This type of application has all sorts of interesting uses. My example is a Home Theater layout tool. Read the entire saga: http://www.damonpayne.com/2008/09/14/RunTimeIsDesignTimeForAGT0.aspx

 

Gestures, Commands, Transactions, and Undo

There's so many sexy things coming up, it was difficult to postpone them further.  There's two more important categories of plumbing that needed to be built.  We'll cover the design of one category and its pieces in this article followed by two dedicated implementation articles.  The other functionality, Document Types and Serialization, will be next.

I would like to be able to use the keyboard for some gestures on the design surface: for example the arrow keys should move the selection and I should be able to delete items from the surface with the delete or use CTRL-Z for undo.

Additionally, I would like to support some kind of undo.  The plumbing needed for undo will allow for other cool interactions later...

Implementing Undo using Transactions and Commands

Undo can be an incredibly hairy thing.  In my opinion, going back to a working system and suddenly trying to add undo can be a very good test of how well designed the system is.  Those following along should take careful note of the degree to which the changes we see are additive (feels like we're just adding another feature) versus things that are refactoring (changing code that was already working to support this new feature).

Now to reveal a personal bias: I seldom find a use for "Redo" as it is sometimes implemented.  For example in MS-Word you can apply some formatting to text.  You can then use "redo" to apply the same formatting to some other text.  I'm really only interested in in redo as an Undo-for-Undo. So Move something, undo, no wait I really wanted to do that, redo.

This is something that's important to get right so let's list the primary goals:

  1. The changes made to items on the surface are easily captured to be undone or redone.  This should be true for both surface interactions and property editing.
  2. The number of undo levels should not be artificially limited. In some cases an undo won't "work" because the state of the system has changed -  we don't want Units of Undo to have to know about other Units of Undo.
  3. There should be a centralized means of manipulating, creating, or querying currently known Units of Undo.
  4. Interactions should be able to be grouped together where it makes sense to do so.  For example, moving an IDesignableControl around on the surface may in fact be 200 small changes, but we really only care about the starting position and the final position when the move interaction is over.

Item #4 in particular is important to me.  Visual Studio sometimes has some odd behaviors where what is perceived as a single Gesture by the user actually requires several Undo operations to erase.  For example, I might paste some code in or use a shortcut Chord and the first undo changes the formatting of the created code and the second undo actually gets rid of the code.

 

Gestures and Commands

Would it be best to try to mimic the Commanding system from WPF, even partially?  I debated this point long and hard: is it worth some research, some effort, some potential confusion due to subtle differences?

I played around on several different occasions and I did come up with some things that I liked better than the other "Commanding in Silverlight" code I've seen out there but for now I didn't want to use it.  Specifically, the ability to map keyboard gestures to a command from XAML was problematic.  Still, Silverlight does contain the ICommand interface, and I tend to like the Command Pattern for encapsulating units of work, so by this time I had most of a design in mind:

UndoTransactions

Controls that need to affect the change of something living on the Design Surface will go through some kind of Change Service.  This is similar, but not exactly like, how Visual Studio does this today.  Using this design I will allow interested parties to be privy to (but not cancel) all the changes going on in case this is needed for some custom logic.  The IDesignerChangeService will also be the gateway to creating and undoing transactions.  This bears some disucssion.

The IDesignerTransactionService and IDesignerChangeService are both public and overridable or replaceable, but they work in tandem.  In any circumstance I can immediately think of, client code will want to deal strictly with the change service.  The process will look like this:

CommandChangeProcess

 

Note that it will be up to the Client who is initiating the change to determine if gestures need to be grouped together into a transaction or not.  No one else would know!  We'll explore more about how we accomplish this in the forthcoming implementation article.  The stimuli shown here are not going to map directly to real method calls, but this gives you a good idea of what's going to happen as objects are edited.

I do like the way WPF creates some ways of specifying commonly used UI commands.  I can also see how the ability to customize the mapping from gestures to specific ICommand implementations would be useful.  Towards these goals, I am going to build some infrastructure modeled after what's in WPF.

DesignerInputBinding

These classes all exist in WPF.  My goal here is that I will mimic the WPF functionality as closely as possible and provide a public interface to InputBindingCollection.  With this, an application that wishes to customize the keyboard behavior of the design surface can simply replace the default ICommand for a gesture.

 

AGContrib

Over the course of the AGT project and several other efforts, I've written (or at least started) some useful things for Silverlight that may have usefulness beyond the AGT effort.  I'm going to be moving these things into a new project: DamonPayne.AGContrib.  For the sake of my time, this will be a part of the AGT solution for now, until I get time to move it into it's own CodePlex project.

The first denizen of the AGContrib project will be the Input Binding framework as shown above.

I should most likely move some other handy code from the DamonPayne.AG.IoC project into AGContrib as well.  When I get some more time in the coming weeks, I will also be evaluating Unity 1.2 for Silverlight, possibly deprecating my own custom container in favor of it.

 

Conclusion and Next Steps

It's been a while since I've done an AGT article that's entirely design without code.  I'm trying to keep the articles reasonably bite-sized.  I've checked in the most recent design documents, CodePlex change set 10098.  In the next article I'll implement the all the undo functionality.

Tags:

The Obama Stimulus Plan: Perception, History, Reality

by Administrator 10. January 2009 02:26

Key Democrats criticized President-elect Obama's economic stimulus plan today.  John Kerry called it "A return to trickledown economics."  This development is fascinating for a number of reasons.

First and maybe least important - the unified Democratic party, the combination of Congressional seats, State Governors, and the Executive office all under Democratic control so feared by the Republicans doesn't appear very unified after all.  The infighting has started before inauguration.

Second, and slightly more interesting, is the fact that these particular tax cuts and so forth are absolutely not the platform that Obama ran on.  Is he and out-and-out liar, or is he only now recognizing certain aspects of reality regarding the true costs of big government programs?

Third, we must thoughtfully consider John Kerry's use of trickledown economics as a bad word in the context of recent history.

I won't (yet) try to argue that Trickledown, or Reaganomics, or Supply-side economics is the best system for raising the standards of living of the entire nation.  For now let's just examine the popular opinion as to the results of Reaganonmics.  It was called Voodoo Economics.  It has been claimed that it didn't work, that it could never work, that it was a laughable disaster.  Walking down the street, one would be hard-pressed to find someone who thinks of Supply Side Economics in a positive context.

Now let's just break this theory and it's opponent down into simple bite-sized notions.  Supply Side Economics states just what its name implies: that the economy does best over all by encouraging Production through whatever means.  Typically more freedom and less taxes is considered to be means of encouraging Production of goods and services.  Damon opens a factory in order to produce Glow in the Dark Towels.  The opening and operation of this factory including borrowing money, dealing with suppliers, marketing and advertising firms, hiring workers, buying land, contracting with builders, and so forth, will be a positive impact on voluntary business dealings between individuals.

In the other corner we have the Keynesian view, the view that Consumption and not Production is the best driver of the economy.  This encouragement to spend boils down to market distortions and wealth redistribution, but these are not bad as far as the pro-Keynes camp is concerned.  If the masses are unable or unwilling to consume, then the government must step in for them: spending everything it has and then borrowing more and printing money to keep on spending.    If the government can spend enough, we can float across tough times until individuals are willing to start spending again.  There are a lot more middle class spenders than factory owners, the thinking goes, and together their habits represent a much stronger force on the economy.  For now leave be the question of what the government should spend this funny money on.

Now we come to my point.  The original pre-crisis Obama plans involved some tax increases on the wealthy and a great deal of government spending on "building of infrastructure and green jobs".  Obama supporters praised these ideas, and the irony seems to have been lost on nearly everyone.

The notion of creating jobs and increasing prosperity by building infrastructure and creating goods and services is a Supply Side concept.  Contrast this with the idea of just giving every middle class American $1,000 on the condition that they spend it.  The idea that Production, not Consumption, will rescue the economy, is stolen directly from the so-called conservative side of the fence.  Why is Production the answer when the government is the producer, but not when private owners are the producers?  The answer is simple: because the Profit Motive has been removed.  The ethics of altruism tell us that it's moral to open factories and produce energy "for the benefit of everyone" but a private business engaging in the exact same activities and competing with others for profit is immoral, barely to be tolerated by a "progressive" state.

Obama has gone from government spending on infrastructure, which appears to me to be a smoke and mirror operation to reap the benefits of supply side production without calling it such, to an even more blatant supply side tactic: namely lowering taxes across the board and even on the wealthy. 

Whatever else he may be, Obama appears to me to be an intelligent and educated man.  He knows that big government welfare state policies can only be afforded by a wealthy nation and only then to the degree that they do not make the creation of wealth too difficult, too inconvenient, too undesirable.  At some point, he knows, the disincentive to produce is too great and the lifestyle enjoyed by Soviet Russia is the result.  He recognizes that when the chips are down, when there's no more wealth to "share", when printing even more money can't work, that only one thing will work.  He looks at American history and economic reality and sees that only by giving the freedom to engage in production and trade can creativity and hard work be unleashed, wealth quickly created.  Only by lengthening the leash given to this nation of smart and hard-working Americans will people take responsibility for their own actions and ultimately create enough wealth he can use to accomplish his redistribution goals later.

Obama supporters thought he would be a great redistributor, cashing in on our general prosperity in the 1980s and 1990s.  The .com bust, the Federal Reserve, and George Bush have beaten him to the trough though. 

It must trouble them to see him backing off his altruistic plans, but reality is the final arbiter in any clash of ideals.

Tags:

MSDN Dev Con

by Administrator 9. January 2009 16:56

Next week, January 13th, is the MSDN Dev Con in Chicago.  I will be going, as will some other Milwaukee area folks.  I am looking into the parking situation and organizing a carpool, but I am also organizing a trip to Fogo de Chao afterwards.  I'll probably be taking the car seats out of the DamonMobile and driving, so leave me a comment or an email if you'd like a ride.

I'll be bouncing around, not sticking to any particular track, and doing some socializing since I know some of the speakers. 

Tags:

First Post

by Administrator 2. January 2009 16:39

So here I am in 2009 starting off the year horribly sick and unemployed in a terrible economy.  Still, I have very high hopes that I can make some good things happen for me and my family this year.

Last year I posted some goals, and I only hit 40% of them.  This year the 2009 goals are much more personal and private.  Still, it's pretty interesting looking at the posts from January 2008 to see how myself and the world have changed in a year.  Here are some thoughts on year old topics:

Warner Goes Blu-Ray exclusive:  Even a broken clock is right sometimes, and I'm still glad BD won the day.  A year later, HD optical media is still where I said it would be; the infrastructure is not there yet for downloads to rule the universe.  Since I will most likely end 2009 with 1.5mb DSL (come on, U-verse...) I don't see this changing in 2009.

Program Control: Man, I continue to be somewhat disappointed in the entire Windows Mobile/Compact Framework universe.  I will not shed a tear if I never do mobile development again.  I have a post coming out regarding what I think (whatever that's worth) MSFT could do to use its strengths to Win in the post iPhone world.

Task Parallel Library: I went on do do a LOT more parallel programming in 2008, my favorite being getting xUnit.Net to run my unit tests in parallel.  I have a lot more stuff coming this year, including a re-working of the tree-based scheme.

New Office: Hard to believe, but Wednesday was my last day in the aforementioned new office.

 

I think 2009 is going to be a great year.  I don't think it's too pessimistic to think that in terms of the economy there are areas where we might not have hit bottom yet, but in general I think America is still free enough to pull ourselves out of this.  A lot of people are excited about the new president, who seems to be settling into Reality and his economic team has promised to lower taxes across the board which is what we need; definitely not the platform he was elected on though.  Markets are driven heavily by Expectations, and a lot of folks expect great things from this guy, so at the least I'm glad to see some positive energy out there.

Tags:

Last Post of 2008

by Administrator 1. January 2009 03:32

It's had to believe it's been more than two weeks since I last posted, especially since there's so much going on in DamonLand.

 

Professional

Today was my last day at CarSpot, a place I'll really miss.  I've been consulting most of my career and mostly had shorter assignments - always ready to ride off into the sunset and tackle the next challenge.  My time with CarSpot both as a consultant and full-time employee represents my longest and most serious commitment to any business venture.   I grew a lot during these years, and I met a lot of great folks I hope to keep in contact with.  I've never seen such a large group of people all of whom were loving their job and work environment and so loathe to split the team up.  I met some fabulous folks at our parent company, AutoTrader.com, and I hope they stay in touch too.  I owe several of them a tour of my wine collection and some hearing loss in my home theater.

It's somewhat hard to get business of any kind done during this time of year with all the vacations and such going on; but I expect next week to be fairly busy. I'll be co-working from various locations in downtown Milwaukee, Brookfield, and Delafield next week if anyone is interested in meeting up.  Watch Twitter.

As for what I'm doing next, I will only say at this point that my Round 1 and 2 meetings are mostly done and that I have several things I'm excited about.

The Argentum Tela design surface project is going well, the currently working article [19] is about Undo/Redo support and Commands in Silverlight and is somewhat complicated but also a lot of fun. 

I'm also working on an entry for the Silverlight Write and Win contest.  I was going to just write some new articles and submit AGT in its current state but I thought that was kinda cheap and would require slight re-work to fit the contest rules.  My submission will be in the vein of Visual Tools though and I think it's pretty slick.  We'll see what the judges think.

I also have some other things to keep me busy, potentially related to my next steps: some heavy Entity Framework development coupled with a bunch of Dependency Injection refactoring, a purpose for HandWaver.com, coming up to speed on SharePoint, and other refactoring of side-project code and article writing.

 

Personal

We had an awesome christmas.  On christmas eve I shoveled snow for hours on end, on christmas day I cooked boeuff ala mode (French style pot roast in red wine sauce) which is at minimum a four hour task.  My daughter, who is incredibly awesome and creative (especially considering she's 5), got her daddy a true chef's hat as a gift.  Pictures of this will be coming as soon as my kitchen is presentable enough to take photographs in.

It's New Year's Eve and I'm sick as hell and so is my son.  This has ultimately resulted in us staying in tonight, I'm about to make a nice dinner for my wife and I to be followed by Champagne and some Kabinet style Riesling - I expect I'll be crashing right after the ball drops.  I love Champagne.  I often use Champagne, considered by many to be a special-occasion-only drink, to celebrate (wait for it) my love of Champagne.

Despite having a brand new house I find myself running around caulking little cracks here and there to keep the house warm.  It has snowed an outrageous amount this winter, and since I have been too stubborn to buy a snow thrower as of yet I've lost a non-trivial amount of weight through shoveling it all.  My neighbors, who totally rock, occasionally have pity on me and help me out when things get really rough.

Jen and I met seven years ago tonight!  My totally awesome Queen among Wives and I now have two kids and we're looking forward to a great 2009.  We consider New Year's Eve to be our real anniversary despite getting married on June 9th.  We met at a dinner party I threw involving me cooking and serving Champagne.  Some things never change!

Tags:

Microsoft guy gets an iPhone [0]

by Administrator 15. December 2008 05:31

So, this weekend involved a road trip to Missouri for some family business - namely seeing my grandfather while he's still see-able.  A fringe benefit of making this trip was that my mother had received an iPhone from my uncle (confused yet?) and she didn't want to pay for the data plan.  So, guess who has an iPhone now?

I bleed Microsoft red.  I chuckle at the fantastic claims of Mac addicts.  Still, I've seen the iPhone in action and it seemed to be a nice little device. 

Inflammatory statement #1: Unlike many of the Microsoft-hating Mac-worshipers and Java fiends, I still have a solid core of objective thought and rational epistemology.  By this I mean merely to say that I'm not going to forego what may be a really nice gadget just because Apple makes it.

First Impressions

Obviously the thing is sexy.  It's curvy; it's sleek; it's reassuringly heavy for such a small and fragile looking item.  The sexiness is the first clue that this is a different thing made for different people than, say, my AT&T Tilt.  I can't remove or replace the battery.  I don't see a place to add a storage card.  I can't insert my SIM card without surgical tools.  Apple does not make products for "Tweakers".  This is meant to be a "finished product"; future be damned.  Still, towards this goal it's clear the device isn't cheap.  It's got 16gb of internal storage and feels like it's well made. 

From initially playing around, it seems easy enough to find settings and launch programs.  Like Windows Mobile, it takes some getting used to not needing to "close" a program, just hit the Square button to return home and move on to the next thing.  While I maintain I'm objective in terms of technology, I can't claim to be objective in terms of Gadget Discoverability.  I have used far too many gadgets for far too long and written too much software to have a good sense of how usable the Average Dude would find the iPhone, but I expect it's very usable.

Since this was "gently used" before landing in my hands, the first thing I did was look into some kind of Ultimate Cold Boot so I didn't have to manually remove my uncle's bizarre mix of Dragonball Z soundtracks and bad 80s metal or contacts and text messages.  To my delight there is in fact a "Totally erase everything" button, which I did.

Setting Up

I have become very dependant upon Outlook synchronization for my Tilt (and 3 smartphones before that) so I did make sure there was some way to sync Outlook contacts & calendar to this thing before accepting it.  This is done through iTunes.

Huh? iTunes?

Yes, Outlook synchronization on vista is accomplished via iTunes.  I'm not sure why this would be.  Is iTunes the only foothold Apple has on Windows?  Are they trying to trick me into using iTunes?  Do they assume anyone with an iPhone must be using Vista only because of some dire need and they're trying to supply a pleasant all-in-phone experience?  I'm not sure.  What I am sure of is this is where my double-standard detector started going apeshit.  This "Duh, you need to have iTunes to move contacts to your phone" type of thing is precisely the sort of behavior that Microsoft has routinely been crucified for no matter what explanation is offered.  I chuckled to myself, chose not to go to the iTunes store on launch, and plugged in the iPhone.

I was greeting with an appropriate settings screen asking me when and what and how much I wanted to move from Outlook to the iPhone.  I expected as much based on Active Sync Mobile Device Center and chose not to move anything yet until I'd felt my way around.  I also see that I need to download a new iPhone software version which is not surprising since my family elders previously owned this gadget.  I was shocked and amazed at how long it took me to grab this and maybe I'm mentally fried from the long car ride today but it wasn't easy to see where I could find the download status of this 250MB update.  I've managed to have two glasses of wine and write this entire article up to this point while waiting for something to happen.   I just downloaded 67MB of iTunes and I'd say this was about 10x slower byte for byte.

I now have a progress bar on the iPhone.  It's moving as slow as paint drying but I've done phone updates before so this comes as no surprise.

On to the past

While I wait on the update, some more early impressions. 

From my hotel in SmallTown, USA I was able to get on WiFi and mess around with this thing even though I had not yet moved a SIM card to it.  Based on the commercials, two things immediately struck me.  First, even on 10MB WiFi, the thing is not remotely as fast as you see on TV.  This, in fact, resulted in a huge "truth in advertising" lawsuit in the UK when a magazine showed that what takes 20 seconds on TV in fact takes nearly 3 minutes with a 3G iPhone.  Here in America, though, Apple can do no wrong so I doubt any such challenges are coming.  The second thing I noticed was that I expected nearly everything to respond with screen orientation changes when I tilted the thing, but found only Safari gratifies this and only after thinking about it for a while. 

Speaking of Safari, this is one of the places where this device shines.  While there's certainly no reason for me to run Safari on my desktop, the rendering and scaling of web content on the iPhone is top notch so far.  I just re-did my blog skin with a lot of painful CSS work to appease both Firefox 2 and IE7, and was very pleased to see DamonPayne.com show up perfectly on the iPhone.  The previous owner did not have DamonPayne.com bookmarked (WTF? Does he live under a rock?)  so getting there involved some typing.  As someone who's used and evaluated eleventeen-brazilian mobile devices in the past ten years I was pleasantly surprised at the near-usability of the on-screen keyboard.  Tactile-response is still king in my book but the iPhone keyboard was tolerable.

Back to Freedom Zero

My iPhone has finally updated itself and, though I have been playing with the damned thing for two days with no SIM card in it, I am now met with a screen which won't let me do anything until I insert a SIM card.  Jeff Atwood's Freedom Zero post is appropriate here.  It's getting late and I need my beloved Tilt for meetings tomorrow, so I'll try quitting the Tilt cold-turkey tomorrow afternoon and see what happens.

My wife is drooling over my Tilt (she has various Medical software for WinMobile) and my Zune so I need to make this transition happen stat.  I haven't told her she's not getting the Zune because I'll use iTunes when it's the last way to listen to music on planet earth.  One thing at a time.

Tags:

Argentum Tela Design Surface[18]

by Administrator 12. December 2008 00:26

The AGT (Argentum Tela) series of articles is an effort to do two things. Usually an idea is presented only in its finished form. The first goal is to do some Reality Blogging, to show an idea evolve over time without pulling any punches. The second goal, and the example vehicle for the evolution aspect, is an extensible Design Surface for Silverlight similar to what we have in Visual Studio 2008. This type of application has all sorts of interesting uses. My example is a Home Theater layout tool. Read the entire saga: http://www.damonpayne.com/2008/09/14/RunTimeIsDesignTimeForAGT0.aspx

Yes, I changed the name of the article.  Here at the 19th step, I decided to ditch the old tagline.

Visual and Code Refactoring

After letting Property Editing sit for too long, I have a list of questions to answer and things I've been meaning to fix or refactor.  I publish these Refactoring articles as part of the Reality Blogging commitment but also in case some of the random code is useful to anyone.  Let's get started.

 

Visual Lasso

I don't know why I had a corner radius on the Visual Lasso, I was probably suffering from some Web2.0itus which I am now over.  I change this and changed the colors:

Vision18

The lasso was also crashable by drawing diagonally until the lasso size would involve negative numbers.  This is fixed.

 

Some Questions

I have gotten some questions from interested parties, which I'll answer here.

  • How about a better constructor for LogMessage?
    • Sure.  More constructors provided
  • Where is IDragDropmanager.RemoveDropTarget?
    • Missing.  I can be very focused trying to get these articles out sometimes.  This has been added.
  • In Page.xaml.cs in the example application, why are you resolving IRegionManager when the Page is the IRegionManager implementation?
    • Force of habit, and I was unsure how I was going to leave that.  And there's nothing wrong with talking to yourself using a Contract...
  • Why are the names inconsistent between IPageView and RootPresenter ?
    • Shameful inconsistency.  IPageView has been renamed to IRootView.
  • Why are the names of the Region Controls in Page.xaml not the same as the Regions themselves?
    • More inconsistency.  They are all named XXXRegion now.  As I looked at this I also wondered why I was using Canvas and not a ContentPresenter, possibly something to do with how much ContentPresenter was chaning in Beta2-->RC0.  At any rate, the regions have good names and I've switched to ContentPresenter.
  • In IRegionManager, what is the difference between RootVisual and TopLevelContainer?  Why do you need both of them?
    • RootVisual is meant so that IRegionManager could provide something to System.Windows.Application.RootVisual, and matches its type of UIElement.  I could probably rename this to ApplicationRootVisual since that is the only reason to have this.  TopLevelContainer is used as the main Playground of services that need to do something visually, like DragDropManager.  This isn't as bad as it first seems, for example the built-in "Popup" class must do something very similar.  Comments have been added.

The Border on DesignSite

When is five minus five not zero?  When you have applied a RenderTransform to a FrameworkElement.  For the border on DesignSite, I would move the control by the border thickness (5px) when I would hide or show the border.  Once you have applied a RenderTransform, though, changing a Canvas.XXXProperty by 5px no longer means 5px.  I fixed this by using a transparent and normal border rather than by changing the border thickness from 0 to 5 to show selection.

 

~Creative Commons

Since I had to choose from a list of licenses on Codeplex (I chose MS-PL) I am removing the creative commons snippets from the code as I see them.

 

Clipping

The Canvas does not clip its children.  This means you can drag controls all over the place outside of the Design surface which is obviously undesirable.

Refactor: I extracted a MouseMoveSelection method and made it virtual so the logic was not totally hidden inside an EventHandler.  This method ultimately calls MoveSelection

I needed to make a decision here, to either create a class that extends Canvas or Panel and does perform some form of clipping on its Children, or to simply implement boundaries within the DesignSurface class.  For now I went with enforcing the bounds in code and snapping the selection back to a valid value.

Floating Properties

I went back and finished implementing my original intention for the PropertyGrid, namely that it would float around with the selection and not be statically docked to the right of the surface.

Refactor: I had a TODO item to un-hack the relationship between IDesigner and DesignSite.  Since IDesigner defines a Surface property of type Canvas this was mostly already done.  DesignSite.DesignParent is now of type IDesigner.

Refactor: Some methods, like GetSelectionBounds(), seemed to belong more on IDesigner than DesignSite after the above change was made.

What I sought to do next was pretty vanilla: if IDesignEditorService.Visual currently had a parent, I would remove it from its parent and add it to IDesigner.Surface or IRegionManager.TopLevelContainer in a location close to the right bounds of the current selection.  Control.Parent and VisualTreeHelper.GetParent both have a return type of DependencyObject.  It seems there is no generic way to remove a FrameworkElement from its visual parent.

DamonPayne.AG.IoC.ControlExtensions  now has a RemoveFromParent() extension method.

The PropertyGrid now floats around to be close to the current selection.

Vision19

 

Bigger Surface

In order to set things up for some future articles, I have change the default size of the DesignSurface and the sample application.  Yes, this means it won't fit on a 1024x768 screen, which apparently some people still have even in this late hour.  We'll fix this in a future article but for now I wanted more room to play.

 

A better Toolbox

The way gestures worked in the toolbox had been bothering me, and I thought I could make it better looking anyway, a little more like Visio perhaps.  I nearly introduced an external dependency on the Silverlight Toolkit, but wanted to see how to do this myself instead.  Given the amount of space I'm working with, I needed to add some more furniture.  I have created an area rug, which I feel really ties the room together.

I created a Control extending Panel, WrapLayoutPanel, to property postion them items in my new and improved toolbox.  The MSDN documentation for MeasureOverride and ArrangeOverride was simple, but surprisingly helpful.

Here's the new and improved toolbox:

Vision20

 

  Conclusion

I've finally gotten around to fixing a number of things that have been bothering me, and I think the application looks a little better too.  I am having a hard time deciding what to do next, and I'm afraid the next two installments are not going to be very sexy, but will be very necessary to tie all the concepts together.

The changes in this article are published as version 0.7.18, Codeplex change set 8710.  While things are still very rough, I did go ahead and make this the default public release on Codeplex.

The live demo has been updated at http://www.damonpayne.com/agt

Tags:

Reggie Burnett speaks out on Entity Framework support

by Administrator 6. December 2008 17:37

Reggie Burnett of MySQL fame has finally spoken out on the oft-promised, never-delivered Entity Framework support coming in the 6.0 version of MySQL connector .NET.  You can comment here.

I wanted to post this as I am sure there are many people here who feel like they have been mislead. I can assure you that you have not been intentionally mislead. The 6.0 release that will have entity framework support was supposed to be out over 1 month ago. It was been delayed mainly for licensing reasons. There is a large chunk of code that we are planning to include in that release that is licensed as MS-PL and the MS-PL is not compatible with the GPL. I have some program managers and our legal department working on it and hope we can find an answer very soon.
I am very sorry for the delay and appreciate your patience. I am very committed to the .NET/Mono community and have been given full support from Sun. I have also been told that I will perhaps be getting some additional developer support in the near future. That will certainly help to speed things up.
Again, I apologize for the delay. I am not trying to duck your questions in this forum but have just been working hard on the 6.0 release. Even with the delay I think everyone will be pleased with it. The main features are:
1. Completely rewritten visual studio integration with improved table editing including change script generation
2. Improved performance of the connector in many scenarios (faster than libmysql in some cases). This is a _very_ big deal.
3. Entity framework support

That's good news!  Working for corporations with legal departments often means being extremely careful of what one says in the public forum so I'm willing to give Reggie the benefit of the doubt for his radio silence on certain topics.   This means I can actually start moving ahead on some personal projects of mine that use MySQL for $$ reasons.  MySQL should be ready to rock before I am done fighting with CSS.

Tags:

On The Market

by Administrator 5. December 2008 20:22

I have removed my previous comments regarding certain events.

Myself as well as some other folks, were impacted by a reorganization.

At this point I'm looking to start networking; I'm looking for my next opportunity.  I have posted my resume below.  If you need a Software Architect, technical team lead, or a Web/Silverlight/WPF/WinForms/parallelism/Mobile developer I'm available in January.

I am also collecting the personal contact information of my current teammates in order to hopefully help them make connections.  If you are looking for some great graphic designers, a Scrum Master, support & fulfillment personnel, or expert LAMP-stack developers, I can put you in touch with some great folks that I can vouch for.

Resume posted here.

Tags:

MSDN DevCon

by Administrator 4. December 2008 20:23

I will be at the "Mini PDC" MSDN developer conference on January 13th in Chicago, IL. 

http://msdndevcon.com/Pages/Chicago.aspx

It looks like I know several of the speakers and some of the content has likely already been seen online, but I'm eager to see this stuff in person and getting Windows 7 Beta is worth the train ride down!  The PDC was huge this year and it's nice to have a chance to hit the highlights.

I'm thinking a reservation at Fogo de Chão will be in order for after the show...

Tags:

About the author

Damon Payne is a Microsoft MVP specializing in Smart Client solution architecture. 

INETA Community Speakers Program

Month List

Page List

flickr photostream