Entity Framework 4 with Self Tracking Entities - Splitting up the generated entities onto a shared Entities assembly with (almost) no fuss

I love the new Entity Framework 4 T4 templates for generating POCO’s and Self Tracking Entities. However the generated code ends up in a single assembly, mixing database independent POCO’s and STE’s with Entity Framework specific code. I like my entities to be in another project. How can we do this? This blog post is a walk-through on how to do this.

For this to work we need at least two library projects, one for the entities, and one for the data access layer.

In your data access layer project start by adding your Entity Framework (EF) model, either using database first or model first. In this walk-through I’ll be using database first, and using Northwind (gasp) as the database.

Add a new ADO.NET Entity Data Model to the DAL project, calling it NorthwindModel.edmx:

image

In the wizard choose “Generate from database”:

image

Follow through with the wizard, at the end selecting Categories and Products:

image

Update your model as you see fit…

The code being generated is the old EF3 kind of code, with classes deriving from EntityObject. I don’t want to use these classes as they couple my entities too much to EF. So instead I want to use Self Tracking Entities (of POCO’s). Next step is to right-click your model’s background and select Add Code Generation Item…

image

In this case you will be asked what code generation template you’d like to use. These template are actually T4 templates you can customize.

image

Choose the template of your liking, I’ll choose the ADO.NET Self-Tracking Entity generator using NorthwindModel.tt as the name. This will generate entities who will easily travel over borders using WCF. POCO’s lack the DataContract and DataMember support, but if you like, you can always add these to the T4 template yourself. More on this in a later post.

You should now end up with three files in your project:

image

The first contains EF specific code, so you should leave that one here. The second is the model, again EF specific. The third file, however, contains your entities and can be used without EF, so I’d like to move that to my entities project.

Unfortunately you cannot simply move the file over to the other project, because inside the NorthwindModel.tt T4 file there is a direct reference to the model:

string inputFile = @"NorthwindModel.edmx";

So we’ll need to use another technique. Right-click on your entities project and choose Add Existing Item…

Browse to your DAL project and search for the NorthwindModel.tt file (you’ll need to change the file filter in the dialog). Now you want to click on the little arrow on the add button  and select the Add As Link option. This option will leave the file in its original location where the model’s file reference can be found.

image

However, the generated code will now be part of your entities library. Before you compile  the entities project you’ll need to add a reference to System.Runtime.Serialization because the STE use the WCF’s DataContract attributes. Also, make sure the T4 code generation happens by right-clicking the NorthwindModel.tt file and selecting Run Custom Tool:

image

Now go back to the DAL project. We need to remove the code generation for the model in this project (since the code is now in the entities project). Right-click the NorthwindModel.tt file and select Exclude from Project:

image

Almost there.

The final problem will happen when you try to compile the DAL project. The compiler will complain it cannot find a range of classes, such as Category and IObjectWithChangeTracker. This is because the generated NorthwindModel.Context.tt code lives in another namespace as the NorthwindModel.tt generated files (which include Category and IObjectWithChangeTracker). So how can we solve this. One way is to tell the code generator to use the same namespace and you can do that by selecting the NorthwindModel.Context.tt file and changing the Custom Tool Namespace property to the namespace of your entities project:

image

Or you could add a using statement to the NorthwindModel.Context.tt file so it generates a using ‘EntityNamespace"’ statement into the generated code (left as an exercise for you, the reader). I like the first solution, since the generated code is only used inside the implementation of the DAL, so using the “wrong” namespace should cause much of a problem. Since your code, which uses the entities will need a using statement anyway, you won’t see any difference in your code.

That’s it.

Comments (35) -

  • Restaurant Equipment

    10/15/2013 11:55:40 AM |

    It's perfect time to make some plans for the future and it's time to be happy. I've read this post and if I could I want to suggest you few interesting things or advice. Maybe you could write next articles referring to this article. I wish to read more things about it!|

  • hostgator review

    11/1/2013 10:10:40 PM |

    Geez, don't be such a sore loser. Big disappointment. (And if you really feel polluted, you don't have to read anything by anybody who disagrees with you. Think about it.)

  • Hipolito M. Wiseman

    1/19/2014 4:51:10 PM |

    I just want to tell you that I am just newbie to blogging and seriously enjoyed your blog site. Probably I’m going to bookmark your website . You amazingly come with awesome well written articles. With thanks for revealing your website.

  • xbox live gratuit

    2/8/2014 11:40:43 PM |

    Thanks! Got it to work, but had a problem finding the save button. No matter what browser I used, the save button was covered up by the gray thank you for creating with wordpress bar.

  • porno , porno , porno , porno

    2/11/2014 3:06:43 AM |

    porno , porno , porno , porno , porno , porno , porno , porno ,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno

  • porno , porno , porno , porno

    2/11/2014 3:18:16 AM |

    porno , porno , porno , porno , porno , porno , porno , porno ,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno

  • porno , porno , porno , porno

    2/11/2014 4:35:03 AM |

    porno , porno , porno , porno , porno , porno , porno , porno ,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno

  • porno , porno , porno , porno

    2/11/2014 6:56:25 AM |

    porno , porno , porno , porno , porno , porno , porno , porno ,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno

  • porno , porno , porno , porno

    2/11/2014 7:08:16 AM |

    porno , porno , porno , porno , porno , porno , porno , porno ,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno

  • porno , porno , porno , porno

    2/11/2014 8:13:21 AM |

    porno , porno , porno , porno , porno , porno , porno , porno ,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno

  • porno , porno , porno , porno

    2/11/2014 8:24:57 AM |

    porno , porno , porno , porno , porno , porno , porno , porno ,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno

  • porno , porno , porno , porno

    2/11/2014 12:01:54 PM |

    porno , porno , porno , porno , porno , porno , porno , porno ,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno

  • porno , porno , porno , porno

    2/11/2014 12:13:24 PM |

    porno , porno , porno , porno , porno , porno , porno , porno ,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno,porno , porno , porno , porno

  • Magdalen Spirk

    3/5/2014 6:00:50 AM |

    When I initially commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get several emails with the same comment. Is there any way you can remove me from that service? Bless you!

  • Phone Numbers

    3/17/2014 8:43:52 PM |

    The Numbers Helpline has sourced 1000's of customer service contact <a href="www.numbershelpline.co.uk/.../";>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> again.

  • Phone Numbers

    3/21/2014 1:05:06 AM |

    The Numbers Helpline has sourced 1000's of customer service contact <a href="www.numbershelpline.co.uk/.../";>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> again.

  • Phone Numbers

    3/25/2014 10:51:04 PM |

    The Numbers Helpline has sourced 1000's of customer service contact <a href="www.numbershelpline.co.uk/.../";>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> again.

  • Jolyn Myall

    3/29/2014 2:12:13 PM |

    Penn State Brandywine's #1 News Source www.psulionseye.com

  • Phone Numbers

    4/1/2014 1:05:14 AM |

    The Numbers Helpline has sourced 1000's of customer service contact <a href="www.numbershelpline.co.uk/.../";>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> again.

  • Phone Numbers

    4/3/2014 8:56:59 PM |

    The Numbers Helpline has sourced 1000's of customer service contact <a href="www.numbershelpline.co.uk/.../";>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> again.

  • Phone Numbers

    4/6/2014 9:23:34 PM |

    The Numbers Helpline has sourced 1000's of customer service contact <a href="www.numbershelpline.co.uk/.../";>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> again.

  • Chuck Steadings

    4/10/2014 6:55:04 PM |

    I love this style !?

  • Lovetta Tarte

    4/10/2014 7:08:16 PM |

    Omg! Are the leggings pink and blue or pink and black? The whole outfit is perfection

  • Monte Bulat

    4/17/2014 8:23:13 PM |

    These are the best leggings I've ever bought. Great quality, easy to care for. Love the wide waistband. Love these! I intend to buy more.

  • Dahlia Loader

    4/17/2014 11:55:24 PM |

    This is awesome and well-researched post. I think you have spent much time on it. Keep it up.

  • Winter Vangundy

    4/20/2014 7:57:06 PM |

    This fashion jacket is made of high quality, it is comfortable and durable to wear.

  • Hipolito M. Wiseman

    4/21/2014 12:27:46 AM |

    I simply want to mention I am newbie to blogging and actually savored this web site. Probably I’m want to bookmark your site . You actually have outstanding stories. Thanks for revealing your website.

  • windows 7 ultimate

    4/25/2014 7:04:15 AM |

    Thanks For Creating The Really Educational Blog Post Keep Up The Good Work! I Posted A Back Link To My Activate Windows Posts To Show You How To Activate Windows Enjoy!

  • Leon Welk

    4/26/2014 5:47:10 AM |

    Apple now has Rhapsody as an app, which is a great start, but it is currently hampered by the inability to store locally on your iPod, and has a dismal 64kbps bit rate. If this changes, then it will somewhat negate this advantage for the Zune, but the 10 songs per month will still be a big plus in Zune Pass' favor.

  • activate

    4/26/2014 6:03:20 PM |

    Hey Thank You For Making The Really Educational Post Keep Up The Amazing Work!! I Posted A Back Link To My Activate Windows Guides To Share With You How To Activate Windows 7 Enjoy!

  • Phone Numbers

    4/27/2014 11:22:31 PM |

    The Numbers Helpline has sourced 1000's of customer service contact <a href="www.numbershelpline.co.uk/.../";>Phone numbers</a> in the UK. We know how hard it can be to find those <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> at times that why we have made a directory with them all in one place so you will never have waste long periods of time looking for a customer service contact <a href="www.numbershelpline.co.uk/.../";>Phonenumbers</a> again.

  • RayBan RB2132

    5/11/2014 4:16:04 AM |

    There's some good information in this article, thanks!

  • windows 7 ultimate

    5/11/2014 7:30:06 PM |

    Thanks For Creating The Really Educational Blog Post Keep Up The Good Work! I Posted A Backlink To My Activate Windows 7 Ultimate 32 Bit Pages To Show You How To Activate Windows 7 Enjoy!

  • Clifford Trevethan

    5/13/2014 12:05:54 AM |

    Websites you should visit...

  • activate windows 7 ultimate

    5/16/2014 7:51:32 PM |

    Hey Thank You For Creating This Very Interesting Post Keep Up The Great Work! I Posted A Backlink To My Activate Windows Posts To Share With You How You Can Activate Windows 7! Check Out My How To Install Microsoft Windows 7 Guides Posts. Enjoy!!

  • Jina Henstrom

    5/18/2014 9:43:55 PM |

    I loved as much as you will receive carried out right here. The sketch is attractive, your authored subject matter stylish. nonetheless, you command get bought an edginess over that you wish be delivering the following. unwell unquestionably come further formerly again since exactly the same nearly very often inside case you shield this increase.

  • tobacco pipes

    6/3/2014 12:53:48 AM |

    Hey, Good evening because I very much like your great blog, I woudl be happy to post a long review about your awesome webblog on my would you say yes please?

  • tobacco pipes

    6/3/2014 1:04:01 AM |

    Hello you because i celebrate your great site, i would feel honored if you would want me to publish a blog review on this work in this little would you be ok with that?

  • tobacco pipes

    6/3/2014 1:43:37 AM |

    I wonder if some of this data may have been taken from a feed, it's all over the internet and various peoples websites, unless you're the content's author?. Thanks

  • tobacco pipes

    6/3/2014 3:45:43 AM |

    Anyone can appropriately spin comments, you must be creative and even more creative. Convince the person that even though the statement is very generic, it's still something they need visible on their page.

  • Carroll B. Merriman

    6/9/2014 2:29:34 AM |

    Thankyou for your building muscle mass article. Very useful. Thankyou.

  • Wan Chong

    6/25/2014 2:32:56 PM |

    Thanks for the great post. I'm going to have a good think about this.

  • Sandra Caillier

    6/25/2014 2:33:32 PM |

    Thanks for the great post. I'm going to have a good think about this.

  • Wilton Dresher

    6/25/2014 2:43:43 PM |

    Thanks for the great post. I'm going to have a good think about this.

  • اخبار ايران

    7/1/2014 11:59:25 AM |

    اخبار روز ايران

  • Odtrucia Alkoholowe Warszawa

    7/4/2014 8:47:06 AM |

    Polecamy najlepsze Odtrucia Alkoholowe Warszawa. Najlepsze odtrucia poalkoholowe w Warszawie tylko u nas.

  • Kasy fiskalne Warszawa

    7/5/2014 2:36:00 AM |

    Mazowieckie Centrum Fiskalne poleca najlepsze kasy fiskalne Warszawa. Dobra kasa fiskalna Warszawa w Mazowieckim Centrum Fiskalnym.

  • dream dictionary

    7/5/2014 3:40:07 AM |

    Good post. I will be experiencing some of these issues as well..

  • Google Sniper 2 Reviews

    7/13/2014 1:31:55 AM |

    The problem with <a href=?http://www.youtube.com/watch?v=vW8JaWjz9DQ?>Google Sniper</a> is that it doesn't provide you the tools and abilities you have to generate income with google and the web. It's sort of like it provides you into a weapon fight equipped with absolutely nothing greater than a limp plastic butter blade.

  • Pinterest

    7/19/2014 1:34:09 AM |

    You can find a whole lot of <a href="www.pinterest.com/.../";>Indian Wedding Dresses here</a>

  • Robin Greenhalgh

    7/19/2014 7:48:30 AM |

    "Your comment" "HTML is OFF" "BBCode is ON" "Smilies are ON"

  • Lanie Vancil

    7/19/2014 11:44:08 PM |

    "Nome:" "Mail (che non verrà pubblicata)" "Sito web" "(obbligatorio)"

  • Lincoln Chaplin

    7/29/2014 4:24:12 AM |

    Very interesting info!Perfect just what I was searching for!

  • visit your url

    8/5/2014 2:52:48 AM |

    Thanks  for another informative blog. The place else could I get that kind of information written in such a perfect means? I've a project that I'm simply now working on, and I've been on the glance out for such info.

  • Luigi Fulk

    8/6/2014 11:57:02 AM |

    It?s hard to dispute valid information, and you have made your points with valid and persuasive content. I thank you for this quality informative material.

  • Mathew Weissman

    8/6/2014 9:10:01 PM |

    spam email link viagra <a href="analjecli1973.comunidades.net/index.php;>oral jelly oder viagra</a> how much does one viagra pill cost seriпїЅser onlineshop viagra?

  • real racing 3 cheats for kindle fire

    8/7/2014 8:44:59 PM |

    I'm still learning from you, while I'm making my way to the top as well. I certainly love reading all that is written on your website.Keep the aarticles coming. I loved it!

  • Samatha Okin

    8/8/2014 6:41:10 PM |

    Oh my goodness! an amazing article dude. Thank you However I am experiencing issue with ur rss . Don’t know why Unable to subscribe to it. Is there anyone getting identical rss problem? Anyone who knows kindly respond. Thnkx

  • Angel Gow

    8/12/2014 8:58:38 PM |

    Can I simply just say what a comfort to discover an individual who truly knows what they are discussing on the net. You actually realize how to bring an issue to light and make it important. More people must check this out and understand this side of the story. I was surprised you are not more popular since you certainly have the gift.

  • Crystal Strekas

    8/14/2014 12:54:11 AM |

    clindamycin is used to treat to uti <a href="kvilcicacorn1981.comunidades.net/index.php;>clindamycin lotion interactions</a> clindamycin interactions other drugs clindamycin is used to treat to uti.

  • Art Inscho

    8/14/2014 9:21:18 AM |

    I really like it when individuals come together and share ideas. Great site, keep it up!

  • DEBORA Laurence

    8/16/2014 4:34:22 AM |

    annuaires-gratuit.com/ vous propose de créer gratuitement un annuaire de sites internet pour un bon référencement.

  • the dirty computer

    8/22/2014 1:36:58 AM |

    Hello! Just discovered Your website On Yahoo.ca Search. Very nice Page On Your Website!!.

  • cryptocoin market cap

    8/31/2014 11:40:39 AM |

    I intended to create you one little word to be able to give thanks again just for the splendid things you've shared in this case. It's really seriously generous of you to give unhampered what exactly numerous people could have distributed for an electronic book to help with making some cash for their own end, specifically considering that you might have tried it in case you desired. These secrets also served as the easy way to be certain that most people have the identical eagerness like my personal own to find out somewhat more with regards to this issue. I know there are a lot more fun periods ahead for individuals who discover your blog.

  • Sharika Cables

    8/31/2014 2:34:26 PM |

    Wonderful blog you have here but I was wondering if you knew of any forums that cover the same topics discussed here? I'd really like to be a part of online community where I can get responses from other experienced individuals that share the same interest. If you have any suggestions, please let me know. Thanks a lot!

  • here are the findings

    9/8/2014 1:12:16 AM |

    I simply want to say I am very new to blogs and honestly savored you're blog. More than likely I’m planning to bookmark your website . You amazingly have outstanding articles. Thanks a lot for revealing your website.

  • Keven Greaver

    9/12/2014 6:05:33 PM |

    Hey would you mind letting me know which web host you're utilizing? I've loaded your blog in 3 different web browsers and I must say this blog loads a lot quicker then most. Can you suggest a good hosting provider at a reasonable price? Kudos, I appreciate it!

  • Trula Pickron

    9/21/2014 5:30:52 PM |

    I'm not sure why but this weblog is loading incredibly slow for me. Is anyone else having this issue or is it a problem on my end? I'll check back later on and see if the problem still exists.

  • Jordan Pontonio

    10/2/2014 12:35:08 AM |

    I do not even understand how I stopped up right here, but I assumed this put up was once good. I don't understand who you might be but certainly you are going to a well-known blogger for those who are not already ;) Cheers!

  • Vaughn Mismit

    10/8/2014 5:02:42 AM |

    Thank you for sharing all these wonderful idea.We all anticipate a similar thing from you in the future.Continue the excellent work.

  • Marcus Einck

    10/8/2014 7:31:33 AM |

    Thanx for expressing these great idea.We anticipate a similar thing from you in the future.Carry on the nice work.

  • navigate to these guys

    10/8/2014 7:48:13 AM |

    I simply want to say I'm newbie to blogging and certainly savored this web page. Most likely I’m planning to bookmark your blog . You certainly have amazing articles. Kudos for sharing with us your web-site.

  • Chuck Straka

    10/8/2014 12:02:11 PM |

    Thank you for sharing these wonderful idea.We expect a similar thing from you in the future.Keep up the nice job.

  • Edyth Sobey

    10/8/2014 12:41:14 PM |

    Thanx for expressing these wonderful idea.We all expect the same thing from you in the future.Continue the good work.

  • Caroyln Ngoun

    10/9/2014 4:21:28 AM |

    Hiya!! thanx for sharing this effective tips.I was in search of this kind of tips. for a significant sometime,thankfully i found your web blog.Continue the great job.I am hoping in future too you will certainly publish this type of useful information.

  • Lamar Blemel

    10/9/2014 2:28:11 PM |

    Heya!! thanks for giving us this valuable good material.I was seeking this type of tips. for quite a sometime,thankfully i found this extraordinary blog.Keep up the excellent job.I am hoping in future too you definitely will publish this type of important info.

  • Esteban Brazeau

    10/9/2014 6:25:18 PM |

    Hiya!! thanx for sharing with us this amazing great material.I had been in search of such an tips. for quite a some time,luckily i came accross your web blog.Keep up the excellent work.I hope in future too you will certainly post this sort of useful information.

  • Ashlie Osterdyk

    10/22/2014 5:52:33 PM |

    Thank you so much for this! I haven't been this thrilled by a blog for a LONG time! You've got it, whatever that means in blogging. HaHa. You're definitely someone that has something to say that people need to hear. Keep up the great work. Keep on inspiring the people!

  • hogan uomo

    10/26/2014 6:30:55 PM |

    Honda experience available all their most up-to-date series to Guru Ceed distance with surprisingly inviting short-term Cable tv ad. A clever and thus instinctive <a href="http://www.nadirstar.com/libraries/";>outlet hogan online originali</a> route to collision your intentions related to handing out budget friendly sporting events vehicle style to one European market.

  • scarpe hogan

    10/29/2014 3:14:09 PM |

    Hyundai have actually brought in these best and newest style to your Experienced Ceed opportunity with some surprisingly encouraging brief Home theater advertisements. An imaginative as well as the easy-to-use <a href="http://www.nadirstar.com/libraries/";>hogan rebel r141</a> strategy to influence all their usages connected with that offer comparatively cheap sports entertainment vehicle design having a Euro show crowd.

  • hogan uomo

    10/30/2014 7:56:51 PM |

    Frd will have established any newer version in the Executive Ceed long distance by incorporating awfully attracting extra short Tv programs advertisement. A clever together with spontaneous <a href="http://www.nadirstar.com/libraries/";>hogan uomo</a> solution have an effect on their particular reasons related with selling cost-efficient football coupe hairstyling on a Eu customers.

  • hogan uomo

    10/31/2014 8:59:27 PM |

    Toyota will have designed their very own the latest variant at the Guru Ceed setting with a few actually a good idea rapid Videos proving. An ingenious not to mention instinctive <a href="http://www.nadirstar.com/libraries/";>scarpe hogan interactive</a> technique to perception most of their plans among promoting reasonably-priced sporting activities vehicle adding curls for a Eu show crowd.

  • hogan interactive

    11/1/2014 8:36:32 PM |

    Kia currently have invented their precious most popular series around the Skilled Ceed assortment which include surprisingly easy fairly short Tv marketing or advertising. A clever and even intuitive <a href="http://www.nadirstar.com/libraries/";>hogan online saldi</a> technique to results her or his plans with regards to presenting realistic physical activities car styles to your Western clients.

  • Benjamin Credit

    11/7/2014 5:47:17 PM |

    Thanks for the thorough update. I'm glad you have a metal hull for the errant icebergs. Good thinking. I appreciate the shout out to the moms. All in a days work, right? Looking forward to the next update, you make it sound fun.

  • see this here

    11/19/2014 2:39:53 PM |

    I just want to say I'm very new to weblog and truly savored you're web page. Almost certainly I’m want to bookmark your blog post . You definitely have really good well written articles. Cheers for revealing your web site.

  • online tutoring jobs

    11/21/2014 6:30:37 AM |

    I'll give this a shot and see what happens. Thanks for the tip. You should try the <A href="http://bit.ly/1yIyt5M";>win trading bot</A>

Loading

Building N-Tier applications with Visual Studio 2008

Building N-Tier applications with Visual Studio 2008

 

One of the most annoying features (for me) in using Visual Studio 2005 for building N-tier distributed applications has been the DataSet designer generated code. Visual Studio 2005 will generate code for your dataset, but will also put the table adapter code into the same file. This means that if you want to use the dataset in every layer of your application, you either have to deploy the database access logic on every layer (sickening!) or manually copy the data-access code to another file in your data access layer (annoying because every time you change the dataset you have to recopy the code).

Luckily this has been fixed in Visual Studio 2008, and now you can try this for yourself. First of all, the dataset designer generates the same code as VS2005 for backward compatibility, but you can turn this off. The idea is simple, simply create your dataset in your DAL project, and then tell the designer to generate the dataset's code in another project (the one containing the types you'll use in every layer, what I call the Framework layer). In the designer this looks like this (by clicking the background in the dataset designer and looking at the properties window):

image

This way you end up with the TableAdapters generated in the DAL layer, and the DataSet with DataTables, etc... in the Framework layer.

Now you can use the DataSet in every layer of your application by adding a reference to the framework layer, without adding a dependency on your table adapters:

image

Comments (26) -

  • Breakfast Sausage Recipes

    12/18/2009 4:05:40 AM |

    I completely agree with the above comment, the internet is with a doubt growing into the most important medium of communication across the globe and its due to sites like this that ideas are spreading so quickly.

  • rubbermaid storage shed

    12/20/2009 2:43:04 AM |

    When I originally commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get four emails with the same comment.
    Is there any way you can remove me from that service?
    Thanks!

  • Divan Beds

    12/22/2009 5:24:07 AM |

    When I originally commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get four emails with the same comment.
    Is there any way you can remove me from that service?
    Thanks!

  • passive income online

    1/6/2010 3:17:33 AM |

    I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well.

  • Bredbånd

    1/7/2010 12:31:53 PM |

    Just wanted to give you a shout from the valley of the sun, great information. Much appreciated.

  • tribal tattoo designs

    1/9/2010 7:43:56 AM |

    Hrmm that was weird, my comment got eaten. Anyway I wanted to say that it's nice to know that someone else also mentioned this as I had trouble finding the same info elsewhere. This was the first place that told me the answer. Thanks.

  • anonymous banking

    1/12/2010 2:56:46 PM |

    Hi. this is kind of an "unconventional" question , but have other visitors asked you how get the menu bar to look like you've got it? I also have a blog and am really looking to alter around the theme, however am scared to death to mess with it for fear of the search engines punishing me. I am very new to all of this ...so i am just not positive exactly how to try to to it all yet. I'll just keep working on it one day at a time.

  • inflatable kiddie pools

    1/14/2010 10:05:41 PM |

    You may have not intended to do so, but I think you have managed to express the state of mind that a lot of people are in. The sense of wanting to help, but not knowing how or where, is something a lot of us are going through.

  • out of body experience

    1/15/2010 4:51:57 AM |

    While this subject can be very touchy for most people, my opinion is that there has to be a middle or common ground that we all can find. I do appreciate that youve added relevant and intelligent commentary here though. Thank you!

  • Bolens Lawn Mower Parts

    1/23/2010 3:06:00 AM |

    Aw, this was a really quality post. In theory I'd like to write like this too - taking time and real effort to make a good article... but what can I say... I procrastinate alot and never seem to get something done.

  • sugar baby dating

    1/25/2010 8:09:36 AM |

    You got a really useful blog I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me.

  • teach yourself guitar

    1/26/2010 2:10:03 AM |

    I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.

  • contractor accountant

    1/29/2010 10:57:56 PM |

    Just wanted to give you a shout from the valley of the sun, great information. Much appreciated.

  • tatuaggi

    2/2/2010 7:22:49 AM |

    There are certainly a lot of details like that to take into consideration. That is a great point to bring up. I offer the thoughts above as general inspiration but clearly there are questions like the one you bring up where the most important thing will be working in honest good faith. I don?t know if best practices have emerged around things like that, but I am sure that your job is clearly identified as a fair game.

  • homes for sale in boise idaho

    2/5/2010 2:09:54 PM |

    This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.

  • meridian idaho real estate

    2/6/2010 9:01:24 PM |

    Couldn?t be written any better. Reading this post reminds me of my old room mate! He always kept talking about this. I will forward this article to him. Pretty sure he will have a good read. Thanks for sharing!

  • app developer

    2/8/2010 8:11:40 PM |

    hey thank you man great post...can you help me with something.....how can i Create a new ObjectContext instance in a Using statement for each service method so that it is disposed of before the method returns. thanks again!

  • garden hammock swings

    2/10/2010 10:59:50 AM |

    I completely agree with the above comment, the internet is with a doubt growing into the most important medium of communication across the globe and its due to sites like this that ideas are spreading so quickly.

  • kipling bags

    2/13/2010 5:53:45 AM |

    I was wondering what is up with that weird gravatar??? I know 5am is early and I'm not looking my best at that hour, but I hope I don't look like this! I might however make that face if I'm asked to do 100 pushups. lol

  • Newhall Garage Door Repair

    2/13/2010 8:27:28 AM |

    When I originally commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get four emails with the same comment.
    Is there any way you can remove me from that service?
    Thanks!

  • derma cleanse

    2/15/2010 5:47:26 PM |

    I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that very useful.

  • MACD histogram

    2/16/2010 2:16:27 PM |

    Admiring the time and effort you put into your blog and detailed information you offer! I will bookmark your blog and have my children check up here often. Thumbs up!

  • mother's day crafts

    2/22/2010 1:43:01 AM |

    Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.

  • celebrity autographs

    2/23/2010 1:52:40 AM |

    How-do-you-do, just needed you to know I have added your site to my Google bookmarks because of your extraordinary blog layout. But seriously, I think your site has one of the freshest theme I've came across. It really helps make reading your blog a lot easier.

  • sofa bed for sale

    2/26/2010 2:46:26 AM |

    There are certainly a lot of details like that to take into consideration. That is a great point to bring up. I offer the thoughts above as general inspiration but clearly there are questions like the one you bring up where the most important thing will be working in honest good faith. I don?t know if best practices have emerged around things like that, but I am sure that your job is clearly identified as a fair game.

  • BuDgEt VaN LiNeS

    3/1/2010 1:53:05 AM |

    looks like i might need to upgrade to 2k8

  • buy facebook fans

    7/24/2014 2:30:44 AM |

    This can be an exceptionally amazing powerful resource that you’re offering and you simply provide it away cost-free!! I that is comparable to discovering websites which view the particular valuation on giving you a excellent learning resource for zero cost. We truly dearly loved examining this blog. Regards!

  • Nan Mitchelle

    7/24/2014 9:09:16 AM |

    great blog keep up the great work!

  • look here

    7/27/2014 1:58:34 PM |

    I simply want to tell you that I am all new to blogging and truly savored your page. Almost certainly I’m want to bookmark your blog . You absolutely come with tremendous article content. Regards for sharing with us your blog.

  • torrentleech invite

    7/31/2014 10:29:32 PM |

    Very educating story, saved your site for hopes to read more!

  • Highly recommended Webpage

    8/5/2014 5:01:54 AM |

    Thank you for any other wonderful post. The place else may anybody get that type of information in such an ideal way of writing? I've a presentation next week, and I am at the look for such info.

  • dark avenger hack

    8/5/2014 10:47:53 AM |

    I was suggested this blog by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my problem. You're amazing! Thanks!

  • real racing 3 cheats for kindle fire

    8/7/2014 10:24:01 PM |

    Magnificent site. Plenty of helpful info here. I am sending it to a few pals ans also sharing in delicious. And naturally, thanks for your effort!

  • Demarcus Carlise

    8/9/2014 5:36:12 PM |

    There are certainly a lot of details like that to take into consideration. That is a great point to bring up. I offer the thoughts above as general inspiration but clearly there are questions like the one you bring up where the most important thing will be working in honest good faith. I don?t know if best practices have emerged around things like that, but I am sure that your job is clearly identified as a fair game. Both boys and girls feel the impact of just a moment’s pleasure, for the rest of their lives.

  • Toney Kebert

    8/10/2014 8:03:55 AM |

    Youre so cool! I dont suppose Ive read anything like this before. So nice to find somebody with some original thoughts on this subject. realy thank you for starting this up. this website is something that is needed on the web, someone with a little originality. useful job for bringing something new to the internet!

  • Madeleine Jaysura

    8/10/2014 2:01:41 PM |

    Oh my goodness! Incredible article dude! Thank you, However I am having troubles with your RSS. I don’t know why I am unable to subscribe to it. Is there anyone else having the same RSS problems? Anyone who knows the solution can you kindly respond? Thanx!!

  • DEBORA Laurence

    8/12/2014 11:25:52 AM |

    annuaires-gratuit.com/ vous propose de créer gratuitement un annuaire de sites internet pour un bon référencement.

  • DEBORA Laurence

    8/12/2014 12:24:19 PM |

    annuaires-gratuit.com/ vous propose de créer gratuitement un annuaire de sites internet pour un bon référencement.

  • DEBORA Laurence

    8/12/2014 1:30:17 PM |

    annuaires-gratuit.com/ vous propose de créer gratuitement un annuaire de sites internet pour un bon référencement.

  • Kurtis Spray

    8/12/2014 10:23:29 PM |

    This is a topic that is near to my heart... Thank you! Where are your contact details though?

  • Carmella Vivanco

    8/13/2014 1:25:47 AM |

    Thanks for your post. I’ve already been thinking about creating a very comparable post over the last couple of weeks, Ill probably stay short along with sweet and connection to this instead if thats amazing. Cheers.

  • Alexa Greubel

    8/13/2014 1:27:52 AM |

    I've recently started a web site, the info you offer on this site has helped me greatly. Thanks for all of your time & work.

  • DEBORA Laurence

    8/15/2014 2:51:04 AM |

    annuaires-gratuit.com/ vous propose de créer gratuitement un annuaire de sites internet pour un bon référencement.

  • Madeleine Jaysura

    8/15/2014 11:25:36 AM |

    I love it when folks get together and share thoughts. Great site, stick with it!

  • pain management emr software

    8/21/2014 6:07:29 AM |

    I like the valuable information you provide to your articles. I will bookmark your blog and check once more right here frequently. I am fairly sure I will learn many new stuff proper right here! Good luck for the next!

  • DEBORA Laurence

    8/24/2014 5:07:50 PM |

    annuaires-gratuit.com/ vous propose de créer gratuitement un annuaire de sites internet pour un bon référencement.

  • Earrings outlet

    9/3/2014 2:56:52 PM |

    This post is worthy of appreciation, looking forward to more exciting!

  • Jill Steven

    9/24/2014 3:24:08 AM |

    I just could not depart your web site prior to suggesting that I really enjoyed the standard info a person provide for your visitors? Is gonna be back often to check up on new posts

  • copy pdf to word

    10/6/2014 10:50:03 AM |

    Useful info. Fortunate me I discovered your website unintentionally, and I'm shocked why this coincidence did not came about earlier! I bookmarked it.

  • how to convert to pdf

    10/6/2014 1:18:50 PM |

    It’s actually a nice and useful piece of info. I am satisfied that you shared this useful information with us. Please keep us up to date like this. Thanks for sharing.

  • Interior design

    10/7/2014 3:11:46 PM |

    interiordezine The Perfect Union of Modern Furniture Interior Design and

  • Ronald Eschette

    10/8/2014 3:30:46 PM |

    hola, Cuando visité Singapur el pasado invierno, me sorprendió por un seminario organizado por los académicos allí. No presenta lo que el PO ha hecho aquí. Nice post!

  • hogan rebel

    10/27/2014 12:11:35 AM |

    Kia maintain launched any best and newest variety toward Seasoned Ceed diversity which includes remarkably appealing fairly short Telly tactics. An imaginative along with spontaneous <a href="http://www.nadirstar.com/libraries/";>hogan outlet torino</a> technique effects ones own goals relating to providing budget friendly athletics vehicle adding curls to some other American clients.

  • hogan interactive

    10/29/2014 7:16:10 PM |

    Hyundai have actually introduced the company's up-to-date option to qualify for the Qualified Ceed spectrum with a bit of rather tempting little Television advertising. An imaginative combined with instinctive <a href="http://www.nadirstar.com/libraries/";>hogan uomo</a> procedure to effects his / her reasons coming from all rendering highly affordable sporting activities car design having a American audience members.

  • hogan uomo

    10/30/2014 4:28:50 PM |

    Hyundai use was introduced their whole newer kind in the Pro player Ceed level you could highly persuading little Tv on pc showing. A clever or easy-to-use <a href="http://www.nadirstar.com/libraries/";>hogan shop online borse</a> system to consequences most of the motives linked with selling very affordable distraction coupe fight for a Western european crowd.

  • Swarovski Outlet

    10/31/2014 5:49:15 PM |

    This post is worthy of appreciation, looking forward to more exciting!

  • Swarovski Outlet

    10/31/2014 5:49:26 PM |

    This post is worthy of appreciation, looking forward to more exciting!    http://www.swarovs.co.uk/

  • scarpe hogan

    11/1/2014 1:07:01 AM |

    Kia may have released most of the new form into the Veteran Ceed opportunity with just a few truly tempting limited T . v . advertising. An ingenious also spontaneous <a href="http://www.nadirstar.com/libraries/";>hogan uomo</a> route to shock her motives relating to giving reasonable basketball car adding curls for the Western individuals.

  • hogan uomo

    11/1/2014 6:58:02 PM |

    Hyundai enjoy delivered their valuable most current variation in the direction of Instructor Ceed range all the way with just a few relatively interesting small Tv set advertising campaign. A smart to intuitive <a href="http://www.nadirstar.com/libraries/";>hogan outlet serravalle</a> system to affect its usages most typically associated with advertising budget friendly sports activities vehicle doing your hair concerning a Western european buyers.

  • DEBORA Laurence

    11/4/2014 9:07:15 AM |

    Covoiturage, annonce & covoiturage. Deposer votre annonce gratuitement sur portail2000.com/ et faites des rencontres

  • DEBORA Laurence

    11/12/2014 2:55:21 AM |

    Forum Annuaires-gratuit.com, annuaire de sites web et moteur de recherche sur annuaires-gratuit.com/annuaires/ .

  • DEBORA Laurence

    11/12/2014 3:15:04 AM |

    Forum Annuaires-gratuit.com, annuaire de sites web et moteur de recherche sur annuaires-gratuit.com/annuaires/ .

  • DEBORA Laurence

    11/12/2014 3:35:09 AM |

    Forum Annuaires-gratuit.com, annuaire de sites web et moteur de recherche sur annuaires-gratuit.com/annuaires/ .

  • DEBORA Laurence

    11/12/2014 3:58:49 AM |

    Forum Annuaires-gratuit.com, annuaire de sites web et moteur de recherche sur annuaires-gratuit.com/annuaires/ .

  • Marge Madison

    11/18/2014 4:01:38 AM |

    The Lastest <a href="http://www.skyzone.com.sg";>aircon servicing</a> best in the best singapore.

Loading

AssemblyInfo updated

AssemblyInfo updated

AssemblyInfo, my Reflector plug-in, has been updated.

The new version lists all native and P/Invoke imports, and native exports. Access these features from the context menu of any module (native or managed). And there are a few minor bug fixes in the decompilation of generic members.

Get it from my download page.

Technorati tags: ,

Comments (136) -

  • Tarot Gratis

    1/8/2010 12:41:34 AM |

    How-do-you-do, just needed you to know I have added your site to my Google bookmarks because of your extraordinary blog layout. But seriously, I think your site has one of the freshest theme I've came across. It really helps make reading your blog a lot easier.

  • cdl test questions

    1/8/2010 8:41:34 AM |

    Well, this is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a marvellous job!

  • family law forms

    1/8/2010 9:18:37 PM |

    You may have not intended to do so, but I think you have managed to express the state of mind that a lot of people are in. The sense of wanting to help, but not knowing how or where, is something a lot of us are going through.

  • wall mounted hair dryer

    1/8/2010 9:32:51 PM |

    Great post! I am just starting out in community management/marketing media and trying to learn how to do it well - resources like this article are incredibly helpful. As our company is based in the US, it?s all a bit new to us. The example above is something that I worry about as well, how to show your own genuine enthusiasm and share the fact that your product is useful in that case.

  • anonymous credit card

    1/12/2010 2:42:15 PM |

    I admit, I have not been on this webpage in a long time... however it was another joy to see It is such an important topic and ignored by so many, even professionals. I thank you to help making people more aware of possible issues.
    Great stuff as usual...

  • Tiffany Jewellery

    1/12/2010 3:49:25 PM |

    I think your site has one of the freshest theme I've came across. It really helps make reading your blog a lot easier.

  • avoid bankruptcy

    1/13/2010 2:50:57 AM |

    I have recently started using the blogengine.net and I having some problems here? in your blog you stated that we need to enable write permissions on the App_Data folder...unfortunately I don't understand how to enable it.

  • how to stay married

    1/14/2010 1:02:13 AM |

    I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that very useful.

  • eliminate six basic fears

    1/14/2010 9:38:21 PM |

    Hrmm that was weird, my comment got eaten. Anyway I wanted to say that it's nice to know that someone else also mentioned this as I had trouble finding the same info elsewhere. This was the first place that told me the answer. Thanks.

  • CNA Training

    1/14/2010 9:55:53 PM |

    That is some inspirational stuff. Never knew that opinions could be this varied. Thanks for all the enthusiasm to offer such helpful information here.

  • food science

    1/14/2010 10:34:05 PM |

    Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.

  • vibrators

    1/14/2010 11:37:17 PM |

    I was wondering what is up with that weird gravatar??? I know 5am is early and I'm not looking my best at that hour, but I hope I don't look like this! I might however make that face if I'm asked to do 100 pushups. lol

  • stock loan

    1/15/2010 4:14:27 AM |

    How-do-you-do, just needed you to know I have added your site to my Google bookmarks because of your extraordinary blog layout. But seriously, I think your site has one of the freshest theme I've came across. It really helps make reading your blog a lot easier.

  • what is blastoff

    1/15/2010 4:36:04 AM |

    I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well.

  • Astral Travel

    1/15/2010 6:43:29 AM |

    Excellent read, I just passed this onto a colleague who was doing a little research on that. And he actually bought me lunch because I found it for him smile So let me rephrase that: Thanks for lunch!

  • PC support

    1/18/2010 9:07:14 PM |

    The beauty of these blogging engines and CMS platforms is the lack of limitations and ease of manipulation that allows developers to implement rich content and 'skin' the site in such a way that with very little effort one would never notice what it is making the site tick all without limiting content and effectiveness.

  • jack wills clothing

    1/20/2010 6:43:03 PM |

    How-do-you-do, just needed you to know I have added your site to my Google bookmarks because of your extraordinary blog layout. But seriously, I think your site has one of the freshest theme I've came across. It really helps make reading your blog a lot easier.

  • How To Get Rid Of Eczema

    1/21/2010 11:31:32 PM |

    I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well.

  • car donations baltimore

    1/23/2010 8:18:41 PM |

    You really make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and very broad for me. I am looking forward for your next post, I will try to get the hang

  • rosacea

    1/23/2010 8:52:40 PM |

    I must say that overall I am really impressed with this blog.It is easy to see that you are passionate about your writing. If only I had your writing ability I look forward to more updates and will be returning.

  • rosacea

    1/23/2010 9:05:33 PM |

    You really make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and very broad for me. I am looking forward for your next post, I will try to get the hang

  • sugar baby dating

    1/25/2010 6:38:27 AM |

    I admire the valuable information you offer in your articles. I will bookmark your blog and have my children check up here often. I am quite sure they will learn lots of new stuff here than anybody else!

  • GED Online

    1/25/2010 8:24:27 AM |

    While this subject can be very touchy for most people, my opinion is that there has to be a middle or common ground that we all can find. I do appreciate that youve added relevant and intelligent commentary here though. Thank you!

  • computer support services

    1/27/2010 1:31:39 AM |

    This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine. Did you acquired lots of links and I see lots of trackbacks??

  • how to sell on amazon

    1/27/2010 2:41:07 AM |

    The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!

  • kreditt kort

    1/27/2010 2:41:29 AM |

    This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.

  • umbrella payroll

    1/29/2010 11:40:34 PM |

    I was very pleased to find this site.I wanted to thank you for this great read!! I definitely enjoying every little bit of it and I have you bookmarked to check out new stuff you post.

  • contractor accountants

    1/30/2010 1:35:35 AM |

    The beauty of these blogging engines and CMS platforms is the lack of limitations and ease of manipulation that allows developers to implement rich content and 'skin' the site in such a way that with very little effort one would never notice what it is making the site tick all without limiting content and effectiveness.

  • Umbrella Companies

    1/30/2010 12:05:03 PM |

    Hello,I love reading through your blog, I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts.

  • decorative hardware

    1/31/2010 2:43:29 PM |

    Me and my friend were arguing about an issue similar to this! Now I know that I was right. lol! Thanks for the information you post.

  • far infrared sauna

    1/31/2010 8:51:31 PM |

    I am not much of a guy who thinks in so deeply about web design but I think your post had some valid points in it. Like designers are forced to design stuff within the limited code available and not go beyond it, their innovation is somewhat limited but still I think Web Design won't die! I agree that Amazon and other some big sites won't have a blog but now a days it's very important to have some sort of option available so people can quickly communicate their thoughts. I think Amazon if wants to shift it to that, they can get a customized CMS for themselves.

  • travel health insurance

    1/31/2010 9:25:45 PM |

    Just wanted to give you a shout from the valley of the sun, great information. Much appreciated.

  • short term insurance

    1/31/2010 9:45:13 PM |

    I am not much of a guy who thinks in so deeply about web design but I think your post had some valid points in it. Like designers are forced to design stuff within the limited code available and not go beyond it, their innovation is somewhat limited but still I think Web Design won't die! I agree that Amazon and other some big sites won't have a blog but now a days it's very important to have some sort of option available so people can quickly communicate their thoughts. I think Amazon if wants to shift it to that, they can get a customized CMS for themselves.

  • payday loans

    2/3/2010 3:44:29 PM |

    Being at the right place at the right time can only happen when you keep moving toward the next opportunity.

  • payday loans

    2/3/2010 3:44:38 PM |

    Pleasure in the job puts perfection in the work.

  • cash loans

    2/3/2010 4:00:17 PM |

    It's not the will to win, but the will to prepare to win that makes the difference.

  • cash loans

    2/3/2010 4:00:25 PM |

    If a man has any greatness in him, it comes to light, not in one flamboyant hour, but in the ledger of his daily work.

  • taux hypothécaire

    2/4/2010 6:35:13 PM |

    I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.

  • chlorine filter shower head

    2/4/2010 10:37:40 PM |

    This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article

  • pay day loans

    2/4/2010 11:13:56 PM |

    The only place you'll find success before work is in the dictionary.

  • bad credit payday loans

    2/4/2010 11:14:06 PM |

    I keep my ideals, because in spite of everything, I still believe that people are really good at heart.

  • payday loans

    2/4/2010 11:30:06 PM |

    In actual life every great enterprise begins with and takes its first forward step in faith.

  • nampa idaho homes

    2/5/2010 4:09:07 AM |

    Hi. this is kind of an "unconventional" question , but have other visitors asked you how get the menu bar to look like you've got it? I also have a blog and am really looking to alter around the theme, however am scared to death to mess with it for fear of the search engines punishing me. I am very new to all of this ...so i am just not positive exactly how to try to to it all yet. I'll just keep working on it one day at a time.

  • nampa idaho homes

    2/5/2010 10:50:35 AM |

    Hi. this is kind of an "unconventional" question , but have other visitors asked you how get the menu bar to look like you've got it? I also have a blog and am really looking to alter around the theme, however am scared to death to mess with it for fear of the search engines punishing me. I am very new to all of this ...so i am just not positive exactly how to try to to it all yet. I'll just keep working on it one day at a time.

  • tweetadder review

    2/5/2010 11:54:43 AM |

    Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck!

  • what is affiliate marketing

    2/5/2010 12:48:49 PM |

    This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.

  • websites for real estate agents

    2/5/2010 1:35:32 PM |

    The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!

  • swing trading

    2/7/2010 9:31:13 PM |

    Hi. this is kind of an "unconventional" question , but have other visitors asked you how get the menu bar to look like you've got it? I also have a blog and am really looking to alter around the theme, however am scared to death to mess with it for fear of the search engines punishing me. I am very new to all of this ...so i am just not positive exactly how to try to to it all yet. I'll just keep working on it one day at a time.

  • Dakota Shackleton

    2/8/2010 1:34:56 PM |

    Well, this is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a marvellous job!

  • business cash advance

    2/8/2010 1:53:49 PM |

    When I originally commented I clicked the "Notify me when new comments are added" checkbox and now each time a comment is added I get four emails with the same comment.
    Is there any way you can remove me from that service?
    Thanks!

  • best hearing aids available

    2/8/2010 5:35:33 PM |

    Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.

  • in home sauna

    2/8/2010 7:17:23 PM |

    I have recently started using the blogengine.net and I having some problems here? in your blog you stated that we need to enable write permissions on the App_Data folder...unfortunately I don't understand how to enable it.

  • weight gain supplements

    2/8/2010 9:20:37 PM |

    Valuable information and excellent design you got here! I would like to thank you for sharing your thoughts and time into the stuff you post!! Thumbs up

  • digest it colon cleanse

    2/9/2010 8:56:42 AM |

    Nothing gives a person so much advantage over another as to remain always cool and unruffled under all circumstances.

  • digest it colon

    2/9/2010 8:56:52 AM |

    We must have a theme, a goal, a purpose in our lives.

  • acai berry review

    2/9/2010 9:22:40 AM |

    What you get by reaching your destination isn't nearly as important as what you become by reaching your goals - what you will become is the winner you were born to be!

  • acai health

    2/9/2010 9:22:50 AM |

    Learning is the beginning of wealth. Learning is the beginning of health. Learning is the beginning of spirituality. Searching and learning is where the miracle process all begins.

  • Tarot cards

    2/10/2010 11:37:52 AM |

    Hmm Well I was just searching on Google for some Tarot readings of some Tarot reader
    and just came across your blog, generally I just only visit blogs and retrieve my required
    information but this time the useful information that you posted in this post compelled me
    to reply here and appreciate your good work. I just bookmarked your blog

  • Red Ring oF death Fix

    2/10/2010 9:56:44 PM |

    I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well.

  • seaweed extract

    2/13/2010 5:32:46 AM |

    This article gives the light in which we can observe the reality. this is very nice one and gives indepth information. thanks for this nice article

  • solar lights for garden

    2/13/2010 10:41:06 AM |

    Admiring the time and effort you put into your blog and detailed information you offer! I will bookmark your blog and have my children check up here often. Thumbs up!

  • Uxbridge Garage Door Repair

    2/13/2010 9:24:51 PM |

    Keep 'em coming... you all do such a great job at such Concepts... can't tell you how much I, for one appreciate all you do!

  • Hickory Hills Garage Door Repair

    2/13/2010 9:36:23 PM |

    I must say that overall I am really impressed with this blog.It is easy to see that you are passionate about your writing. If only I had your writing ability I look forward to more updates and will be returning.

  • South Whittier Garage Door Repair

    2/14/2010 12:14:19 AM |

    There are certainly a lot of details like that to take into consideration. That is a great point to bring up. I offer the thoughts above as general inspiration but clearly there are questions like the one you bring up where the most important thing will be working in honest good faith. I don?t know if best practices have emerged around things like that, but I am sure that your job is clearly identified as a fair game.

  • hanging shelf

    2/14/2010 1:28:28 PM |

    I have recently started using the blogengine.net and I having some problems here? in your blog you stated that we need to enable write permissions on the App_Data folder...unfortunately I don't understand how to enable it.

  • JORDANIEN REISE

    2/15/2010 11:54:14 AM |

    There are certainly a lot of details like that to take into consideration. That is a great point to bring up. I offer the thoughts above as general inspiration but clearly there are questions like the one you bring up where the most important thing will be working in honest good faith. I don?t know if best practices have emerged around things like that, but I am sure that your job is clearly identified as a fair game.

  • Hepa Vacuum Cleaners

    2/15/2010 5:02:08 PM |

    Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.

  • derma cleanse

    2/15/2010 10:47:25 PM |

    I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that very useful.

  • baby back carrier

    2/16/2010 2:36:42 PM |

    Hi. this is kind of an "unconventional" question , but have other visitors asked you how get the menu bar to look like you've got it? I also have a blog and am really looking to alter around the theme, however am scared to death to mess with it for fear of the search engines punishing me. I am very new to all of this ...so i am just not positive exactly how to try to to it all yet. I'll just keep working on it one day at a time.

  • free submit an article

    2/17/2010 3:28:03 AM |

    I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well. In fact your creative writing abilities has inspired me to start my own BlogEngine blog now. Really the blogging is spreading its wings rapidly. Your write up is a fine example of it.

  • Homes for sale in Hanover PA

    2/18/2010 1:25:33 PM |

    I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that very useful.

  • ipod touchscreen

    2/20/2010 11:07:58 PM |

    Admiring the time and effort you put into your blog and detailed information you offer! I will bookmark your blog and have my children check up here often. Thumbs up!

  • traslochi a milano

    2/21/2010 3:46:11 PM |

    That's great, I never thought about AssemblyInfo updated like that before.

  • trasloco milano

    2/21/2010 3:52:07 PM |

    That's great, I never thought about AssemblyInfo updated like that before.

  • Mothers Day 2010

    2/22/2010 1:10:56 AM |

    Couldn?t be written any better. Reading this post reminds me of my old room mate! He always kept talking about this. I will forward this article to him. Pretty sure he will have a good read. Thanks for sharing!

  • shower cd player

    2/22/2010 1:35:32 AM |

    I was wondering what is up with that weird gravatar??? I know 5am is early and I'm not looking my best at that hour, but I hope I don't look like this! I might however make that face if I'm asked to do 100 pushups. lol

  • ben cummings

    2/22/2010 5:26:09 PM |

    You may have not intended to do so, but I think you have managed to express the state of mind that a lot of people are in. The sense of wanting to help, but not knowing how or where, is something a lot of us are going through.

  • direct mail postcards

    2/23/2010 12:23:18 AM |

    I was wondering what is up with that weird gravatar??? I know 5am is early and I'm not looking my best at that hour, but I hope I don't look like this! I might however make that face if I'm asked to do 100 pushups. lol

  • make money online

    2/24/2010 12:57:42 AM |

    Howdy, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam comments? If so how do you prevent it, any plugin or anything you can advise? I get so much lately it's driving me mad so any assistance is very much appreciated.

  • life insurance quote

    2/24/2010 10:40:40 AM |

    Thanks for the nice plugin review I am glad too that you are selling it at a relatively cheap price,thanks Smile

  • baby tutu's

    2/25/2010 8:42:00 PM |

    Just wanted to give you a shout from the valley of the sun, great information. Much appreciated.

  • round about place

    2/25/2010 9:56:47 PM |

    I have recently started using the blogengine.net and I having some problems here? in your blog you stated that we need to enable write permissions on the App_Data folder...unfortunately I don't understand how to enable it.

  • diet plan

    2/28/2010 2:46:36 AM |

    Hello,I love reading through your blog, I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts.

  • swoopo clone

    2/28/2010 3:57:01 AM |

    Pretty good post. I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I'll be subscribing to your feed and I hope you post again soon.

  • swoopo clone

    2/28/2010 4:17:05 AM |

    I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that very useful.

  • Frank Zweegers

    2/28/2010 5:06:57 AM |

    I was wondering what is up with that weird gravatar??? I know 5am is early and I'm not looking my best at that hour, but I hope I don't look like this! I might however make that face if I'm asked to do 100 pushups. lol

  • Pompton Plains NJ Plumbing

    3/3/2010 1:17:45 AM |

    I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well.

  • Warren NJ Electrician

    3/3/2010 1:55:32 AM |

    Thanks for taking the time to discuss this, I feel strongly about it and love learning more on this topic. If possible, as you gain expertise, would you mind updating your blog with more information? It is extremely helpful for me.

  • Cranford NJ Handyman Services

    3/3/2010 2:20:06 AM |

    This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.

  • Bridgewater NJ Plumbing

    3/3/2010 11:25:32 AM |

    Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long. I need this article to complete my assignment in the college, and it has same topic with your article. Thanks, great share.

  • lesbian sites

    3/3/2010 1:09:08 PM |

    Well, this is my first visit to your blog! We are a group of volunteers and starting a new initiative in a community in the same niche. Your blog provided us valuable information to work on. You have done a marvellous job!

  • lesbian websites

    3/3/2010 9:59:17 PM |

    I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post

  • Manville NJ Handyman Services

    3/3/2010 10:09:04 PM |

    Hi webmaster, commenters and everybody else !!! The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!b Keep 'em coming... you all do such a great job at such Concepts... can't tell you how much I, for one appreciate all you do!

  • Gillette NJ Handyman Services

    3/3/2010 11:37:03 PM |

    This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine. Did you acquired lots of links and I see lots of trackbacks??

  • boards

    3/5/2010 12:25:07 AM |

    This is a really good read for me, Must admit that you are one of the best bloggers I ever saw.Thanks for posting this informative article.

  • boards

    3/5/2010 5:52:34 AM |

    Do you accept guest posts? I would love to write couple articles here.
    I was wondering what is up with that weird gravatar??? I know 5am is early and I'm not looking my best at that hour, but I hope I don't look like this! I might however make that face if I'm asked to do 100 pushups. lol

  • boards

    3/5/2010 10:07:10 PM |

    Hrmm that was weird, my comment got eaten. Anyway I wanted to say that it's nice to know that someone else also mentioned this as I had trouble finding the same info elsewhere. This was the first place that told me the answer. Thanks.

  • boards

    3/5/2010 10:16:58 PM |

    The beauty of these blogging engines and CMS platforms is the lack of limitations and ease of manipulation that allows developers to implement rich content and 'skin' the site in such a way that with very little effort one would never notice what it is making the site tick all without limiting content and effectiveness.

  • replica watches

    3/6/2010 12:53:23 PM |

    The blog was absolutely fantastic! Lots of great information and inspiration, both of which we all need!

  • replica watches

    3/6/2010 1:50:15 PM |

    Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck!

  • Genworth Life and Annuity

    3/7/2010 12:34:41 PM |

    Thanks a lot for updating the news of assembly. I was looking for these kind of info. Good post.

  • low cost energy

    3/7/2010 2:51:21 PM |

    Howdy, i read your blog occasionally and i own a similar one and i was just wondering if you get a lot of spam comments? If so how do you prevent it, any plugin or anything you can advise? I get so much lately it's driving me mad so any assistance is very much appreciated.

  • four post lift

    3/7/2010 3:03:12 PM |

    Aw, this was a really quality post. In theory I'd like to write like this too - taking time and real effort to make a good article... but what can I say... I procrastinate alot and never seem to get something done.

  • Vickie Cayouette

    3/9/2010 5:22:50 AM |

    This is a good summary, I was wondering if I could use this posting on my website, I will link it back to your website though. If this is a problem please let me know and I will take it down right away.

  • traffic ultimatum

    3/9/2010 10:41:14 AM |

    I was wondering what is up with that weird gravatar??? I know 5am is early and I'm not looking my best at that hour, but I hope I don't look like this! I might however make that face if I'm asked to do 100 pushups. lol

  • wholesale clothing

    3/10/2010 12:21:33 AM |

    I have been surfing online more than three hours today, yet I never found any interesting article like yours. It's pretty worth enough for me. In my opinion, if all webmasters and bloggers made good content as you did, the internet will be much more useful than ever before.

  • god of war walkthrough

    3/10/2010 2:35:52 AM |

    This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine. Did you acquired lots of links and I see lots of trackbacks??

  • oregon dui lawyers

    3/10/2010 6:41:41 AM |

    You really make it seem so easy with your presentation but I find this topic to be really something which I think I would never understand. It seems too complicated and very broad for me. I am looking forward for your next post, I will try to get the hang of it!

  • dui lawyer portland

    3/10/2010 7:23:35 AM |

    You got a really useful blog I have been here reading for about an hour. I am a newbie and your success is very much an inspiration for me.

  • divorce portland oregon

    3/10/2010 7:26:24 AM |

    This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine. Did you acquired lots of links and I see lots of trackbacks??

  • coach for business executives

    3/10/2010 7:47:37 AM |

    I thought it was going to be some boring old post, but it really compensated for my time. I will post a link to this page on my blog. I am sure my visitors will find that very useful.

  • oregon family law lawyers

    3/10/2010 9:55:51 AM |

    I admire what you have done here. I like the part where you say you are doing this to give back but I would assume by all the comments that this is working for you as well.

  • home business coaches

    3/11/2010 11:54:23 AM |

    I was looking for crucial information on this subject. The information was important as I am about to launch my own portal. Thanks for providing a missing link in my business.

  • emekli sandıgı

    3/11/2010 1:43:36 PM |

    Very useful informations about these subject. Great info.I like all your post.Interesting article..

  • work from home

    3/12/2010 2:20:47 AM |

    Just wanted to give you a shout from the valley of the sun, great information. Much appreciated.

  • Pay Per Click software

    3/12/2010 2:27:26 AM |

    Hello,I love reading through your blog, I wanted to leave a little comment to support you and wish you a good continuation. Wishing you the best of luck for all your blogging efforts.

  • nanny

    3/12/2010 3:26:58 AM |

    Just wanted to give you a shout from the valley of the sun, great information. Much appreciated.

  • symptoms of over masturbation

    3/12/2010 12:05:25 PM |

    Keep 'em coming... you all do such a great job at such Concepts... can't tell you how much I, for one appreciate all you do!

  • Maintenance Plumbers Brisbane

    3/14/2010 5:26:03 AM |

    Taking long to download can someone give the stand alone download version if they is any,thanks and looking forward Smile

  • bağkur

    3/14/2010 7:54:36 AM |

    I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post

  • press release submission

    3/15/2010 1:56:38 AM |

    Dude.. I am not much into reading, but somehow I got to read lots of articles on your blog. Its amazing how interesting it is for me to visit you very often.

  • Ralph Hills

    3/15/2010 5:13:03 AM |

    I have looked up to Hills for some while. A number of months ago I think that as a business it has taken their eyes off the ball.  For a short time their eye for dog owners want was not what it used to be and IME, the quality of Hill's dog food was going south, especially their Science Plan. However, today I feel they are the best even though they aren't the cheapest dog food manufacturers.

  • Noah Rosenstock

    3/15/2010 9:46:23 PM |

    This is a very useful post, I was looking for this knowledge. Just so you know I discovered your website when I was searching for blogs like mine, so please check out my site sometime and leave me a comment to let me know what you think.

  • infrared saunas

    3/16/2010 3:54:00 PM |

    The beauty of these blogging engines and CMS platforms is the lack of limitations and ease of manipulation that allows developers to implement rich content and 'skin' the site in such a way that with very little effort one would never notice what it is making the site tick all without limiting content and effectiveness.

  • best mediterranean cruise

    3/16/2010 4:00:09 PM |

    I was looking for crucial information on this subject. The information was important as I am about to launch my own portal. Thanks for providing a missing link in my business.

  • european cruise

    3/16/2010 4:44:21 PM |

    Took me time to read all the comments, but I really enjoyed the article. It proved to be Very helpful to me and I am sure to all the commenters here! It's always nice when you can not only be informed, but also entertained! I'm sure you had fun writing this article.

  • Local SEO

    3/16/2010 5:30:19 PM |

    Hey - nice blog, just looking around some blogs, seems a pretty nice platform you are using. I'm currently using Wordpress for a few of my sites but looking to change one of them over to a platform similar to yours as a trial run. Anything in particular you would recommend about it?

  • removing stretch marks

    3/16/2010 5:59:34 PM |

    This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free. It is the old what goes around comes around routine. Did you acquired lots of links and I see lots of trackbacks??

  • secretarial services from home

    3/16/2010 6:52:11 PM |

    There are certainly a lot of details like that to take into consideration. That is a great point to bring up. I offer the thoughts above as general inspiration but clearly there are questions like the one you bring up where the most important thing will be working in honest good faith. I don?t know if best practices have emerged around things like that, but I am sure that your job is clearly identified as a fair game.

  • water filter system

    3/16/2010 6:58:37 PM |

    I was wondering what is up with that weird gravatar??? I know 5am is early and I'm not looking my best at that hour, but I hope I don't look like this! I might however make that face if I'm asked to do 100 pushups. lol

  • How To Start Blog

    3/16/2010 7:20:12 PM |

    Admiring the time and effort you put into your blog and detailed information you offer! I will bookmark your blog and have my children check up here often. Thumbs up!

  • koi pond care tips

    3/16/2010 8:11:05 PM |

    Dude.. I am not much into reading, but somehow I got to read lots of articles on your blog. Its amazing how interesting it is for me to visit you very often.

  • removing stretch marks

    3/16/2010 9:06:51 PM |

    Nice information, many thanks to the author. It is incomprehensible to me now, but in general, the usefulness and significance is overwhelming. Thanks again and good luck!

Pingbacks and trackbacks (1)+

Loading

Modal Dialogs in Windows 8 Metro

Diederik Krols

The XAML Brewer

Modal Dialogs in Windows 8 Metro

This article describes how to create modal dialogs in a Windows 8 MVVM Metro-style app. Here's the use case: a main page opens a dialog and provides it with some information. The dialog is displayed in the center of the screen, and collects some information. As long as the dialog is open, the main page is inaccessible by the user interface. When the dialog is closed, the main page reads the result from the dialog, and continues processing.

The Sample

Here are some screenshots of the attached solution. You see the main page with a shop button to open the dialog, the dialog that allows you to select multiple items from a catalog and then checkout, and finally the main page displaying the purchased items after the dialog was closed:

The Dialog

The dialog is implemented as a regular Page. When it's displayed, it will occupy the whole screen to prevent access to the underlying main page:

public CatalogDialog()
{
    this.InitializeComponent();

    var bounds = Window.Current.Bounds;
    this.RootPanel.Width = bounds.Width;
    this.RootPanel.Height = bounds.Height;
}

The dialog look-and-feel is created by using a semi-transparent background under a white border with a wide margin around the core content:

<Page>
    <Grid
        x:Name="RootPanel"
        Opacity=".75"
        HorizontalAlignment="Stretch"
        VerticalAlignment="Stretch">
        <Border
            Background="White"
            Margin="120">
            <Grid Background="Blue" Margin="8">
                <GridView
                    x:Name="CatalogGridView"
                    ItemsSource="{Binding Cars}"
                    SelectionMode="Multiple"
                    SelectionChanged="CatalogGridView_SelectionChanged">
                </GridView>
                <Button
                    Content="Checkout"
                    Click="CloseButton_Click">
                </Button>
            </Grid>
        </Border>
    </Grid>
</Page>

The dialog notifies its end-of-life by raising a CloseRequested event, in the click event handler of the checkout-button. This is the kind of code that you would factor out into a Dialog base class:

public event EventHandler CloseRequested;

private void CloseButton_Click(object sender, RoutedEventArgs e)
{
    if (this.CloseRequested != null)
    {
        this.CloseRequested(this, EventArgs.Empty);
    }
}

The viewmodel always reflects the dialog's state. Binding to the SelectedItems property is not possible, so we have to refrain from hard-core MVVM. We update the viewmodel each time the selection in the catalog gridview is changed:

private void CatalogGridView_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
    foreach (var item in e.AddedItems)
    {
        PinkFerrari pf = item as PinkFerrari;
        pf.IsSelected = true;
    }

    foreach (var item in e.RemovedItems)
    {
        PinkFerrari pf = item as PinkFerrari;
        pf.IsSelected = false;
    }
}

The Main Page

The main page has a button that opens the dialog, and a listview to display the result:

<Page>

    <Page.DataContext>
        <local:MainPageViewModel />
    </Page.DataContext>

    <Grid>
        <Button
            Content="Shop"
            Command="{Binding OpenDialogCommand}">
        </Button>
        <ListView
            ItemsSource="{Binding ShoppingList}">
        </ListView>
    </Grid>

</Page>

When the shop-button is clicked, a command is fired in the main page's viewmodel. That viewmodel creates a new instance of the dialog view. MVVM tifosi would prefer to use some kind of ViewLocator here, instead of a hard reference to the view's class. The dialog view is associated with a viewmodel - that's how the two viewmodels can exchange information. An event handler is hooked onto the CloseRequested event. Then the dialog view is wrapped in a Popup element, which is then opened:

private void OpenDialog_Executed()
{
    this.catalog = new CatalogViewModel();
    CatalogDialog dialog = new CatalogDialog();
    dialog.DataContext = this.catalog;
    dialog.CloseRequested += Dialog_CloseRequested;
    this.catalogPopup = new Popup();
    this.catalogPopup.Child = dialog;

    this.catalogPopup.IsOpen = true;
}

When the dialog closes, the main page's viewmodel is updated:

private void Dialog_CloseRequested(object sender, EventArgs e)
{
    this.catalogPopup.IsOpen = false;
    this.shoppingList.Clear();
    var query = from f in this.catalog.Cars
                where f.IsSelected
                select f;

    foreach (var item in query)
    {
        this.shoppingList.Add(item);
    }
}

That's all there is...

The Result

Last week our CEO used this app to order the new company cars. Here's a picture of our parking area this morning:

The Code

Here's the full source code of the sample solution. Is was build with Visual Studio 2012 Ultimate RC for the Windows 8 Release Preview: U2UConsult.Metro.DialogSample.zip (409,68 kb)

Enjoy !

Comments (6) -

  • ForgetFul

    6/24/2012 9:08:55 PM |

    Press "Shop" button to show the dialog
    Tap "Tab" Key, the focus still on the Shop button
    Tap "Enter" Key, will show another same dialog
    then press "Check Out" Button can't hide the dialog

  • ForgetFul

    6/25/2012 2:40:16 PM |

    for use:
    this.RootPanel.Width = bounds.Width;
    this.RootPanel.Height = bounds.Height;

    1. let the metro app show in "Fill" ViewState
    2. Press "Shop" button to show the dialog
    3. let the metro app show in "Full" ViewState, the dialog view will be unreasonable

  • Diederik Krols

    6/29/2012 9:01:26 PM |

    Thanks for the feedback. I'm going to take a look at this ...

  • Erno

    7/13/2012 2:14:05 AM |

    To prevent the focus from moving to the underlying UI you can simply disable it.

  • Chris

    8/9/2012 6:45:50 AM |

    Thanks for this, I've been trying the other solution of adding a full page user object instead (babaandthepigman.wordpress.com/.../), but I find the code is a bit smelly compared to treating the input overlay as a popup like you do (Which it is!).

    I listen for the window size changing in the CatalogDialog constructor (Window.Current.SizeChanged += Current_SizeChanged;) then reset the height/width. This takes care of the screen orientation changing in the simulator.

  • Gabriella Burkart

    2/6/2014 9:50:11 PM |

    Just wanna remark on few general things, The website style is ideal, the topic matter is rattling good

Comments are closed