Yet another blog about WPF, Surface, SL, MVVM, NUI.... - Tag - exampleIn this blog we talk about WPF, Natural User Interface(NUI), Microsoft Surface, WIndows 7, Multitouch, Touchless, JavaFX, MVVM, patterns, tips, tricks .... and a lot of other things !2024-02-26T15:40:43+01:00Jonathan ANTOINEurn:md5:627146f22bec1346990949372a159bfaDotclearVS Tip : how to locate the active document in the solution explorer using a shortcuturn:md5:8528a0336d20cda80f60db7cdd7f5ce32010-11-04T12:39:00+01:002010-11-04T13:44:05+01:00JonathanANTOINE@falsemail.com.NETexamplehow tohow-totipstrickVisual Studio <p>When you have multiple projects in your solution, you often want to locate the active document in the solution explorer. There is a great option in Visual Studio which can do it for you all the time : “View.TrackActivityInSolutionExplorer”.
But if you do not want (as me) to turn it on all the time, there is no specific option or shortcut. So I... <a href="http://blog.lexique-du-net.com/index.php?post/2010/11/04/VS-Tip-%3A-how-to-locate-the-active-document-in-the-solution-explorer-using-a-shortcut"><em>Read</em> VS Tip : how to locate the active document in the solution explorer using a shortcut</a></p>http://blog.lexique-du-net.com/index.php?post/2010/11/04/VS-Tip-%3A-how-to-locate-the-active-document-in-the-solution-explorer-using-a-shortcut#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/65Introducing the amazing WPF controls library on Codeplex !urn:md5:38e0ac0a863f442767c1a2a1d9bf34312010-10-25T01:19:00+02:002011-01-12T00:08:30+01:00JonathanANTOINE@falsemail.comWPFcontrolsdemoexampleWindows Presentation FoundationWPF <p>Hello everyone,
I am pleased to announce you the creation of the Amazing WPF controls library on Codeplex !
It will contains the differents controls I describe and/or peel on this blog. I will try to make an article for each control added to the library.
Here is a list of the currently available controls :
An headered control (the one... <a href="http://blog.lexique-du-net.com/index.php?post/2010/10/25/Introducing-the-amazing-WPF-controls-library-on-Codeplex-%21"><em>Read</em> Introducing the amazing WPF controls library on Codeplex !</a></p>http://blog.lexique-du-net.com/index.php?post/2010/10/25/Introducing-the-amazing-WPF-controls-library-on-Codeplex-%21#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/63How to create your own control library (how-to + tips)urn:md5:9ed22011e4c8dd030431d70034af03422010-10-03T23:27:00+02:002010-10-04T17:42:57+02:00JonathanANTOINE@falsemail.comWPFBindingContentControlcontrolscustomdataBindingDataTemplateDependencyPropertyeventsexamplehow tohow-toLibrarysampleTemplatetipstrickWindows Presentation FoundationWPFXAML <p>Reusability and factorizing are maybe the most commons things you want and use when you are developing applications. In WPF it often means creating controls library (i don’t mean UserControl) that will be easy to use in multiple applications.
In this post we'll see all the step to create a control library useable in differents projects.
The... <a href="http://blog.lexique-du-net.com/index.php?post/2010/10/04/How-to-create-your-own-control-library"><em>Read</em> How to create your own control library (how-to + tips)</a></p>http://blog.lexique-du-net.com/index.php?post/2010/10/04/How-to-create-your-own-control-library#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/59WPF tip : How can I use static/dynamic resources in my testsurn:md5:4a3dab56d52a0b0385223e6db58a46ec2010-09-24T12:33:00+02:002010-09-24T12:56:03+02:00JonathanANTOINE@falsemail.comWPF.NET4.0examplehow tohow-totesttestingtestsunitWPF <p>You are surely, as I am, creating a lot of units tests in your WPF applications. Some of the tests may use statics or dynamics resources declared in your application and when you launch the tests, all you get is an XamlParseException exception thrown.
System.Windows.Markup.XamlParseException: 'Provide value on... <a href="http://blog.lexique-du-net.com/index.php?post/2010/09/24/WPF-tip-How-can-I-use-static/dynamic-resources-in-my-tests"><em>Read</em> WPF tip : How can I use static/dynamic resources in my tests</a></p>http://blog.lexique-du-net.com/index.php?post/2010/09/24/WPF-tip-How-can-I-use-static/dynamic-resources-in-my-tests#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/58How to create an animated expanderurn:md5:2ae908d20a12760560980c024eaabac72010-09-21T14:02:00+02:002010-09-21T15:03:55+02:00JonathanANTOINE@falsemail.comWPFanimationContentControlexamplesamplescalescalingTemplatetipstrickWindows Presentation FoundationWPFXAML <p>The expander control can be used in a lot of situations but the one proposed by default is quite "rigid".
In this post we will discover how to animate it quite simply just via XAML !
The WPF engine lets us redefine the template of the controls and we'll just do that.
The goal aimed
What we aim is to get the same functionnality as the... <a href="http://blog.lexique-du-net.com/index.php?post/2010/09/21/Create-an-animated-expander"><em>Read</em> How to create an animated expander</a></p>http://blog.lexique-du-net.com/index.php?post/2010/09/21/Create-an-animated-expander#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/56Execute a command on a specified control when clicking on a buttonurn:md5:d120a96b6da17f34e9dcdd2044d853d92010-06-16T15:07:00+02:002010-06-16T15:39:39+02:00JonathanANTOINE@falsemail.comWPFAttachedPropertyBindingdataBindingDependencyObjectDependencyPropertyeventsexamplehow tohow-toM-V-VMMouseEventMVVMOnPropertyChangedpatternpatternssampletipstrickWindows Presentation FoundationWPFXAML <p>Today another example of the powerful ramora pattern : execute a RoutedCommand on an Control when you click on a button outside of the aimed control scope.
When is it useful ? : for example when you use the infragistics grid (xamdatagrid) and you want to execute the command which remove the selected row from a button outside of the grid. You... <a href="http://blog.lexique-du-net.com/index.php?post/2010/06/16/Execute-a-command-on-a-specified-control-when-clicking-on-a-button"><em>Read</em> Execute a command on a specified control when clicking on a button</a></p>http://blog.lexique-du-net.com/index.php?post/2010/06/16/Execute-a-command-on-a-specified-control-when-clicking-on-a-button#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/52[Performance tips] Use the system shadows instead of your ownurn:md5:6ce9a6fcf6a9fa653286c4c02a507fc72010-04-27T23:52:00+02:002010-04-28T00:24:05+02:00JonathanANTOINE@falsemail.comWPFaerodemoexamplehow tohow-toperformanceshadowshadowstipstrickWindows Presentation FoundationWPFXAML <p>Today a fast and easy tip about shadows and performance.
In a project I have recently made, we've told the designer not to use BitmapEffects because they are performance killer. He so decided to create it's own shadows by duplicating each shape and make them looks like shadows(designer magic, voodoo things, etc...). I was then surprised to see... <a href="http://blog.lexique-du-net.com/index.php?post/2010/04/27/Performance-tips-Use-the-system-shadows-instead-of-your-own"><em>Read</em> [Performance tips] Use the system shadows instead of your own</a></p>http://blog.lexique-du-net.com/index.php?post/2010/04/27/Performance-tips-Use-the-system-shadows-instead-of-your-own#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/50Freeze brushes directly in the XAML to improve your application's performancesurn:md5:9e20a96580288c5ab39762cf98c5d3562010-04-12T22:53:00+02:002010-04-14T18:10:46+02:00JonathanANTOINE@falsemail.comWPFexamplefreezehow tohow-toperformancetipstrickWindows Presentation FoundationWPFXAML <p>When you read the MSDN guidelines to improve WPF's performances you can find that it's a good idea to freeze Freezable objects.
It's a quite easy thing to do via the code but it's quite harder to do it directly in the XAML. In this post we will see how to do so.
What are freezable objects
One upon a time, the MSDN said :
A Freezable is a... <a href="http://blog.lexique-du-net.com/index.php?post/2010/04/12/Freeze-brushes-directly-in-the-XAML-to-improve-your-application-s-performances"><em>Read</em> Freeze brushes directly in the XAML to improve your application's performances</a></p>http://blog.lexique-du-net.com/index.php?post/2010/04/12/Freeze-brushes-directly-in-the-XAML-to-improve-your-application-s-performances#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/49Simple properties Mapper by reflection : stop copying manually each property of your objects !urn:md5:c953a7caee3d6372fc5d0b3b3150e49b2010-04-08T23:14:00+02:002010-04-09T01:32:10+02:00JonathanANTOINE@falsemail.com.NETdemoexamplehow tohow-totipstrickWCFWindows Presentation FoundationWPF <p>There is time when you have to copy each property of an object to one another. This is called mapping and it's very fastidious to do it by hand.
In this post we'll see how to create a method extension which do it for you in one line of code !
When can it be useful
Here is a non exhaustive list of usage you can find to this snippet:
You want... <a href="http://blog.lexique-du-net.com/index.php?post/2010/04/08/Simple-properties-Mapper-by-reflection"><em>Read</em> Simple properties Mapper by reflection : stop copying manually each property of your objects !</a></p>http://blog.lexique-du-net.com/index.php?post/2010/04/08/Simple-properties-Mapper-by-reflection#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/48Binding on a Property which is not a DependencyPropertyurn:md5:d2eadacd7db37af377f1b69c8b528bb12010-04-05T09:03:00+02:002010-04-07T20:51:22+02:00JonathanANTOINE@falsemail.comWPFAttachedPropertycustomdataBindingdemoexamplehow tohow-toOnPropertyChangedpatternpatternstipstrickWPF <p>A lot of controls expose properties which are not DependencyProperties and then you can’t put a binding on it. On some other cases, you only have a getter as accessor and you can’t put a binding on it too…
This is for example the case for the ribbon’s group of the office ribbon or the converter’s parameter.
If you ever tried to do so, you... <a href="http://blog.lexique-du-net.com/index.php?post/2010/03/31/Binding-on-a-Property-which-is-not-a-DependencyProperty"><em>Read</em> Binding on a Property which is not a DependencyProperty</a></p>http://blog.lexique-du-net.com/index.php?post/2010/03/31/Binding-on-a-Property-which-is-not-a-DependencyProperty#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/47MVVM - Creating ViewModel : create dynamic proxies with Castle (solution 3 of n)urn:md5:d3a023b93c4a2ef515d002c54361428f2010-03-11T23:09:00+01:002010-03-12T12:59:13+01:00JonathanANTOINE@falsemail.comWPFCastleDesign patternDynamic proxiesDynamic proxyexampleM-V-VMMVVMpatternpatternsWPF <p>Here is the next episode of our serie MVVM - Creating ViewModel. A list of all the article about creating a ViewModel is here..
Today we are going to see how to create dynamic proxies for our business objects.
What are Dynamic proxies ?
Readers in a hurry can directly jump to the third part "An implementation".
Proxies are a Desing Pattern... <a href="http://blog.lexique-du-net.com/index.php?post/2010/03/11/MVVM-Creating-ViewModel-%3A-create-dynamic-proxies-with-Castle"><em>Read</em> MVVM - Creating ViewModel : create dynamic proxies with Castle (solution 3 of n)</a></p>http://blog.lexique-du-net.com/index.php?post/2010/03/11/MVVM-Creating-ViewModel-%3A-create-dynamic-proxies-with-Castle#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/43MVVM - Creating ViewModel tutorialurn:md5:175290551e10776eb81123ddd0100dfa2010-03-11T11:58:00+01:002010-03-13T02:27:03+01:00JonathanANTOINE@falsemail.comWPFDesign patternexamplehow tohow-toM-V-VMMVVMpatternpatternsWPF <p>MVVM - Creating ViewModel is a serie of blogposts that talk in details about various ways to create a ViewModel to use it with the MVVM pattern.
You often do not create the business object used by the application which are created by another team and that these objects are not ready for binding.
So you must find a solution to create an object... <a href="http://blog.lexique-du-net.com/index.php?post/2010/03/11/MVVM-Creating-ViewModel-tutorial"><em>Read</em> MVVM - Creating ViewModel tutorial</a></p>http://blog.lexique-du-net.com/index.php?post/2010/03/11/MVVM-Creating-ViewModel-tutorial#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/44DependencyProperties or INotifyPropertyChanged ?urn:md5:441834c0aab7c5bc41e56298bff512192010-03-01T12:31:00+01:002010-03-10T17:05:14+01:00JonathanANTOINE@falsemail.comWPFAttachedPropertydataBindingDependencyObjectDependencyPropertyeventsexamplehow toOnPropertyChangedtipstrickWPFXAML <p>When you want to make an object binding-aware you have two choices : implement INotifyPropertyChanged or create DependencyProperties. Which one is the best ? Let's try to answer this question !
How to implement INotifyPropertyChanged
Declaring that your class is implementing INotifyPropertyChanged adds an PropertyChangedEventHandler that you... <a href="http://blog.lexique-du-net.com/index.php?post/2010/02/24/DependencyProperties-or-INotifyPropertyChanged"><em>Read</em> DependencyProperties or INotifyPropertyChanged ?</a></p>http://blog.lexique-du-net.com/index.php?post/2010/02/24/DependencyProperties-or-INotifyPropertyChanged#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/34Ambient, diffuse, emissive and specular colors : some examplesurn:md5:1927702ab98d36dad5a9e029d62ba9e22009-07-24T12:00:00+02:002009-07-27T13:43:31+02:00JonathanANTOINE@falsemail.com3D (Mogre)3DambientdefinitiondefinitionsdiffuseemissiveexamplematerialMogrespecular <p>Introduction
When you defines a material in Ogre or in 3D engines in general, you can play with at least four differents parameters : Ambient color, diffuse color, emissive color and specular color.
In this post I will give you the definitions and show you some example for those who - like me - requires some visual example to understand... <a href="http://blog.lexique-du-net.com/index.php?post/2009/07/24/AmbientDiffuseEmissive-and-specular-colorSome-examples"><em>Read</em> Ambient, diffuse, emissive and specular colors : some examples</a></p>http://blog.lexique-du-net.com/index.php?post/2009/07/24/AmbientDiffuseEmissive-and-specular-colorSome-examples#comment-formhttp://feeds.feedburner.com/JonathanAntoine/comments/26