Browse by Tags

Tagged Content List
  • Blog Post: Preventing the Pivot or Panorama controls from scrolling

    The Panorama and Pivot are great, defining assets of the Windows Phone 7 user experience. Their main role is to display a wealth of information panning horizontally, and eventually enable item selection. Even though these controls are not designed to handle complex user input, you may stumble upon some...
  • Blog Post: Executing a command from an event of your choice

    To follow up on a previous post , I’m going to describe how to execute a command from any event raised by a graphical control. For this, I’ll leverage the MVVM pattern as well as the Expression Blend SDK (freely available here ). The SDK provides behaviors (triggers and actions) that allow even further...
  • Blog Post: Improving keyboard scrolling speed in selector controls (ListBox, DataGrids…) or AutoCompleteBox performance using throttling

    One of the most frequent cause of slow scrolling lists is the cost of loading the data related to the currently selected item/row. When a user holds his arrow keys down to scroll, the selected item changes very quickly, potentially triggering a large amount of expensive queries to the data source (wether...
  • Blog Post: Silverlight/WPF debugging: Determining the focused element

    When developing complex WPF or Silverlight applications, you may stumble upon the problem of not knowing where your keyboard focus is. This is also known as the “But where am I typing?!” problem, and occurs more often than not on composite applications. Silverlight You can determine which element has...
  • Blog Post: ArchiTech podcast: Discussion about RIAs

    Benjamin Guinebertière recently invited me to his ArchiTech podcast (in French), so that we could discuss Rich Internet Applications (RIA). We discuss the reasons why RIAs exist, how they are developped, and which Microsoft technologies can be leveraged to address them: mainly Silverlight, WPF...
  • Blog Post: Statically getting the UI thread in Silverlight

    Like you probably already know, all changes to an object that affects the visual tree has to be done form the UI thread. The Dispatcher , that all DependencyObjects expose, allow the execution of code on this very thread through the BeginInvoke method. Sometimes though no DependencyObject is dynamically...
  • Blog Post: Commanding with Silverlight 4

    One of Silverlight 4’s new feature is commanding support. Commanding and the MVVM pattern allow clean separation of XAML and C# code: an action can be associated to a control using the {Binding} markup, just as it is done with data. Silverlight 4’s buttons support commanding through the Command property...
  • Blog Post: Introduction to WCF Data Services

    Benoit Sarie, my franchouillardest colleague, has written a series of post about WCF Data Services (formerly known as ADO.NET Data Services). It starts off with setting up a WCFDS environment, and quickly delves into pragmatic topics such as querying , intercepting requests and of course consuming the...
  • Blog Post: Windows Live Writer Silverlight App Plugin

    I’ve been blogging about WPF and Silverlight using Windows Live Writer (WLW) for quite a while now. But there’s something I found really awkward : I never actually had some Silverlight running within a post! Since a XAP is worth way more than static screenshots, I got to work and three hours later I...
  • Blog Post: Get whole sets of vector icons using … Fonts!

    Finding icons is a tedious task for most developers. In this post I will demonstrate how to use “symbolic” fonts in your WPF or Silverlight applications, which provide the following benefits: Vector icons that are smoothly scalable Potentially better performance, using the platforms’ optimized...
  • Blog Post: Silverlight: Accessing files outside of the ClientBin directory of your website using a relative URI

    Accessing an arbitrary file on your website is a very common need in RIA scenarios. This is easily done from Silverlight when the files you are trying to access are under the ClientBin directory, or given an absolute URI path to the targeted file. Unfortunately, the ../ notation in Silverlight URIs does...
  • Blog Post: The FormatConverter, and XamlParseExceptions in Microsoft Expression Blend

    A converter we very often use and reimplement is the so-called FormatConverter, which takes a string as a value and uses with the converter’s parameter in a call to String.Format . This eases sometimes shortens the XAML by quite a bit when concatenating strings, or can also be used to apply specific...
  • Blog Post: WPF and Silverlight namescopes and DataContext differences

    When authoring a UserControl, you will more often than not end up data binding properties of objects in your XAML file to properties of your UserControl itself. The most elegant way to do this would be without any code-behind at all, using ElementName bindings . < UserControl x : Class ="NameScopeExample...
  • Blog Post: The XamlParseException AG_E_PARSER_BAD_TYPE checklist

    While running a Silverlight application, you might sometimes encounter the dreaded runtime ParseException(“AG_E_PARSER_BAD_TYPE”). Despite its rather crude description, the message actually means something close to the words it uses: during the XAML parsing phase something went wrong with a type. Here...
  • Blog Post: &quot;The configuration section for Logging cannot be found in the configuration source.&quot; or how to read an external configuration file for the Logging Application Block

    When using the Logging Application Block, using an IConfigurationSource to read your logging configuration from an external reference might throw a ConfigurationErrorsException("The configuration section for Logging cannot be found in the configuration source."), or ignore your configuration changes...
  • Blog Post: Reading a configuration file from an abitrary path

    Here a a few, but often useful, lines of code that open a .NET configuration file from any given path. Just use the OpenMappedExeConfiguration method : var configFileMap = new ExeConfigurationFileMap (); configFileMap.ExeConfigFilename = @"C:\TEMP\MyApp.config" ; var cfg = ConfigurationManager...
  • Blog Post: How to determine which TCP port Analysis Services is listening on

    While recently installing and interfacing SQL Server Analysis Services (SSAS) with Commerce Server 2009 , I had to find out on which TCP port SSAS was listening on. This is a fairly common procedure as firewalls and CS2009 resources have to be configured. The technique is simple, but not necessarily...
  • Blog Post: Enabling Hyper-V Integration Services on a VM migrated from Virtual PC

    Upon migrating a Vista or 2008 virtual machine from Virtual PC 2007 to Hyper-V, the Hyper-V Integration Services sometimes look like they are not working at all. A warning also pops up when attempting to reinstall them: A previous installation of Hyper-V integration services has been detected. Click...
  • Blog Post: Reading web.config parameters from a Silverlight application

    It is a very common ASP.NET scenario to have to read a configuration parameter from web.config. This operation is very easily implemented from ASPX using Configuratoin.AppSettings. However, this scenario does not work out of the box from a Silverlight application, which doesn’t seem to even have access...
  • Blog Post: Interacting between Powershell and a host .NET application

    An unusual topic in today’s post : interacting between Powershell and a host .NET application. The examples available on MSDN show how to host Powershell runspaces using classes from the System.Management.Automation namespace ; but it is also possible to share objects with hosted Powershell scripts paving...
  • Blog Post: Sorts and filters on ObservableCollection

    Using the ObservableCollection<T> collection is a very common practice among UI developers. Added to the fact that they allow easy UI updates, they also allow sorting and filtering operations via CollectionViews. This post describes a pattern linking an ObservableCollection to sortable and filterable...
  • Blog Post: WPF: Some terms defined for Rudy

    I received a mail from Rudy, who asked me for some clarifications on several WPF definitions: « The terms for which I would like to have some details, relations and usage are DataTemplate, ContentControl, ControlTemplate and Content » A DataTemplate is a graphical representation of an object. For...
  • Blog Post: GUI feedback when loading data asynchronously (WPF)

    Data is not always readily available for applications to display, and it is essential to notify the user when any long running process is going to hinder the smoothness of a user's workflow: it is indeed the least of things as loading time is a purely technical issue. As a rule of thumb, consider any...
  • Blog Post: Why: InvalidOperationException name cannot be found in the name scope of 'System.Windows.Controls.ControlTemplate'

    ( edit : correction following Nick's comment, about which thread actually creates the elements) This exception is confusing for multiple reasons: the code causing it does works on some occasions, the storyboard(s) referencing the infringing name are valid, an element does exist with the name, and...
  • Blog Post: Source Code Editor has XAML Intellisense support (in VS2008SP1) / L'&#233;diteur de code source dispose de l'Intellisense (dans VS2008SP1)

    Visual Studio 2008 Service Pack 1 brought numerous improvements to the IDE's WPF support, especially in regard to XAML files. Not only has the WPF designer (Cider) been made faster and more stable, but the Source Code Editor has also had its capabilities enriched with XAML Intellisense! Even though this...
Page 1 of 2 (26 items) 12