<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" media="screen" href="/styles/xslt/rss.xslt"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:c9="http://channel9.msdn.com">
<channel>
	<title>Comment Feed for Channel 9 - Fluent WPF App Building, Xaml and Data Temples, need not apply...</title>
	<atom:link rel="self" type="application/rss+xml" href="http://channel9.msdn.com/coding4fun/blog/Fluent-WPF-App-Building-Xaml-and-Data-Temples-need-not-apply/RSS"></atom:link>
	<image>
		<url>http://files.channel9.msdn.com/thumbnail/cf1ecaf4-e96d-45c0-bb16-c94dc4d37547.png</url>
		<title>Channel 9 - Fluent WPF App Building, Xaml and Data Temples, need not apply...</title>
		<link></link>
	</image>
	<description>Today&#39;s wild WPF(ish) Wednesday project by Bryan Prendergast is one that might make the WPF purest cringe, might cause you to lift an eyebrow or three, but provides a very unique way of thinking about building WPF applications. If you&#39;re looking for a &amp;quot;think outside of the box&amp;quot; for building WPF applications... WPF Composites&amp;quot;WPF Composites makes WPF so easy that a baby could do it. Think of building blocks . . .&amp;quot; WPF Composites is a project designed to provide an alternative, concise, C# code-behind approach to managing UI Element composites. Composites are normally managed via WPF Databinding and DataTemplates but this library uses ID&#39;s and X-Y Coordinates instead to position elements on the screen. This is currently for synchronous apps only or apps that invoke on the UI Thread when working with Composites. This library is still alpha and under-construction. However, I welcome volunteers! NO XAML. NO DATATEMPLATES REQUIRED! ... BEGIN COMPOSITE . . . END COMPOSITEBelow is an example for creating a new composite, adding a new Rectangle (automagically instantiating it) to the composite, followed by adding two Textblocks underneath the Rectangle (all in column 0): myDockPanel.BeginComposite(myGuid)
.AddAnything&amp;lt;Rectangle, DockPanel(0,0)                
.AddText(1,0, &amp;quot;Hello World 1&amp;quot;)                
.AddText(2,0, &amp;quot;This is text at Row 2 Column 0 in the composite&amp;quot;)                
.EndComposite(new DockArgs(Dock.Left)); The entire composite is then added to myDockPanel at Dock.Left.Typically, objects retrieved from or saved to a SQL database will have a record ID associated with them, either a GUID or a basic IDENTITY number (1-...). It follows then that composites of UI Elements on the screen may also readily be associated with this same ID, the same ID as that used in the database. However, a GUID is not required (as one can be created automatically behind the scenes.) This can be an effective way of binding and retrieving a composite set of UI Elements (which may correspond to properties within a C# Class.) Within a single composite tied to an ID, identify X-Y Coordinates for positioning child elements within a Grid within a parent container. Examples? I started with a working example of this code-behind approach via extensions to the WPF ListBox. I used extension methods because I didn&#39;t want developers to have to implement a new custom control. This humble start has grown into fair support for 20 IParent controls:Code ExamplesGrid ExampleDock Panel ExampleCombo ExampleMenu ExampleTree View Example  Want to see more? See C# Demo App Screenshots here: Demo App ScreenshotsThis library isn&#39;t limited to C#. See an IronPython example here: Iron Python ExampleRemaining To-Do Items: To-Do ListTutorials and Details: Dictionaries, Easy as 1-2-3-4-5, Selectors Demo App ScreenshotsThese screenshots are taken in 1280x1024 screen resolution. The demo app should scale up fine to higher resolutions as long as they maintain this same aspect ratio (better choices could be made in terms of layout and relative positioning in a live production app.) A key thing to focus on in these screenshots is the fine-grained control over colors/styles . . . note how many little pieces are exposed for styling via code-behind with no XAML required by the developer. In other words, my color choice may be hideous, my design skills old-school or flat, but it&#39;s just to show off what is possible, how many items you can change/modify/override? In this first shot, I showcase the Grid, TabControl, ListBox, DockPanel, TreeView, DataGrid (with Composites), GroupBox, ComboBox, Dialog, and multiple ScrollViewers.  ... A new, very different means to build WPF applications, one that might appeal to those in the WinForm world. Oh and you get the entire source behind this approach too! http://wpfcomposites.codeplex.com/SourceControl/BrowseLatest  </description>
	<link></link>
	<language>en</language>
	<pubDate>Fri, 24 May 2013 09:19:24 GMT</pubDate>
	<lastBuildDate>Fri, 24 May 2013 09:19:24 GMT</lastBuildDate>
	<generator>Rev9</generator>
</channel>
</rss>