At the time of this writing, Apple iTunes download page doesn’t display a direct download link for the application, even if you are unable to download using the current window popup download system. To make things worse, if you head on to the support page, Apple provides you help disabling eventual popup blockers instead. So, getting straight to the point, for those who require a direct download link for the 93Mb Apple iTunes x64 setup file, here’s the link:
http://appldnld.apple.com/iTunes9/061-8727.20100722.Cde32/iTunes64Setup.exe
For clumsy connections this would be a welcome addition for download managers with resume download support.
Technorati Tags: Apple
Microsoft just made available the July release of the Microsoft Ribbon for WPF in MSDN. This is the RTW release of the Ribbon control, compatible with WPF 3.5sp1 and WPF 4.
This release is a managed implementation of the Ribbon for WPF. The Ribbon is a command bar that organizes the features of an application into a series of tabs at the top of the application window, is designed to help you quickly find the commands that you need to complete a task. The Ribbon user interface (UI) increases discoverability of features and functions, enables quicker learning of the application, and helps users feel more in control of their experience with the application. The Ribbon replaces the traditional menu bar and toolbars.
Besides the Ribbon download itself, there’s also a sample installer available. These samples include:
- RibbonWindow Wordpad Sample This sample illustrates a Ribbon control hosted within a RibbonWindow that emulates the Wordpad appearance.
- RibbonWindow MVVM Sample This sample illustrates a Ribbon control hosted within a RibbonWindow that is completely populated from a view-model collection.
- RibbonBrowser Wordpad sample This sample illustrates a Ribbon control hosted within a browser window that emulates the Wordpad appearance.
- RibbonBrowser MVVM sample This sample illustrates a Ribbon control hosted within a browser window that is completely populated from a view model collection.
You can download WPF Ribbon Control for WPF here.
Technorati Tags: WPF
Yesterday I found myself looking into sharepoint 2010′s OData integration features, and I stumbled upon some articles posted by Alex James, Program Manager at Microsoft. OData (Open Data Protocol) is an open protocol for sharing data. It provides a way to break down data silos and increase the shared value of data by creating an ecosystem in which data consumers can interoperate with data producers in a way that is far more powerful than currently possible, enabling more applications to make sense of a broader set of data. Every producer and consumer of data that participates in this ecosystem increases its overall value.
As you might know, ADO.NET Data Services 1.5 and SharePoint 2010 allow developers to write applications against SharePoint Lists using the familiar Data Services Client programming model. In order to use Data Services with SharePoint 2010, ADO.NET Data Services 1.5 must be installed on your server. From there on, you should fint your Data Services endpoint and add a service reference to your project, using the location of the Data Service that exposes SharePoint data. You will then have CLR classes representing the types in each list, and you will have a strongly typed Data Service Context that allows you to access the data.
Here are some articles I followed during yesterday’s reading.
Using Data Services over SharePoint 2010 – Part 1 – Getting Started
Using Data Services over SharePoint 2010 – Part 2 – CRUD
Technorati Tags: OData, Sharepoint, Sharepoint 2010
In this article, I’ll be reviewing 5 different advertising networks that can help you monetize your traffic. If you’re either a novice webmaster or an ad tycoon, there’s enough for everyone.
Since I started blogging, it soon became clear I could use my articles to generate some income and make my blog pay for itself and cover hosting and domain expenses. So I, as a webmaster, started investigating a bit and try to find the best solution to monetize my content. I’m now sharing some advertising networks I read to be the most common and reliable, also generating some extra pageviews while I’m at it
Text Link Ads: Text Link/In-Link Advertising
This network sells paid text links which are typically placed in sidebars and headers. Major advantages are you don’t need banners, they pay on time and expose earnings in a practical and effective way, and they are generally transparent to your audience. No TLA references whatsoever. The downside to it, from what I’ve read, but not actually verified, is that using TLA can get you penalized in search engines. For small publishers this won’t be a significant issue, but if you depend on a strong positioning in search engines and is critical for your business, this should be a consideration. There’s a plug-in for WordPress if you use it. See it here.
Comission Junction
This company is set on affiliate marketing. In this kind of business, advertisers (online merchants that sell products or services) pay publishers (independent parties that promote the products or services of an advertiser on their Web site) only for results, such as a visitor making a purchase or filling out a form, rather than paying simply to reach a particular audience. The publisher is paid a commission by the respective advertiser when a visitor takes a specific action such as filling out a form, subscribing to a service (both lead examples) or making a purchase (a sale). More info here.
Adsense: Contextual Ad Network
Google’s contextual ads are the most commonly seen ad network on the web. The reason is that they are one size fits all, no matter what your site Google probably has an ad for you. Not only that, their fill rate is superb and they are an easy network to get into. What’s the downside? It’s easy to outgrow them, you will eventually find that Google’s payout for many verticals isn’t as good as you could be making elsewhere. At that point, it might be time to start looking at other providers and using Google as a remnant to fill your unsold inventory. Either way, get informed here.
The Lounge Advertising Network
The Lounge Advertising Network from ZerkMedia is focused on publishers and advertisers that are somehow exclusively targeting Microsoft products and technologies. If your site is all about it and you have at least 8k page views per month get in the boat.
Kontera
Kontera can help you if your site context is textually heavy. The downside is you will have a ton of double underlined ads at random locations in your text. For some readers it can be a nuisance and will sure downgrade the overall quality of your website. The code is simple to install and there’s a plug-in for everyone who use WordPress engine. I’ve tested it and its simple to setup and configure. More info here.
In the previous article I demonstrated how to fully style a GridView column header in a ListView. In this next article, I’ll be covering row styling and final wrap ups, focusing on maintaining every behavior that’s expected from a typical grid row.
This time around, I’ll create and customize a template for each column, thus overriding all the visual aspects of a single row. The first step is to change the GridView column declarations and set the CellTemplate attribute to a local resource instead of the previous simpler approach, that used DisplayMembershipBinding and simple TextBlock based data templates. So for starters, I’ll change the ListView xaml declaration to reference new DataTemplates in each column:
<ListView Name="ListView" ItemsSource="{Binding}" ItemContainerStyle="{DynamicResource ListViewItemContainerStyle}">
<ListView.View>
<GridView>
<GridViewColumn CellTemplate="{StaticResource PersonItemTemplate}" Header="Name"/>
<GridViewColumn CellTemplate="{StaticResource AgeItemTemplate}" Header="Age" />
<GridViewColumn CellTemplate="{StaticResource MovieItemTemplate}" Header="Favorite Movie" />
</GridView>
</ListView.View>
</ListView>
Notice that I’ve also referenced an ItemContainerStyle resource. This will be used to define generic row behavior upon selection and mouse over.
Now, let’s define each column style separately:
<DataTemplate x:Key="AgeItemTemplate">
<Border BorderThickness="0,0,0,0" BorderBrush="#6FBDE8">
<TextBlock Margin="2" Text="{Binding Age}" VerticalAlignment="Center" Grid.Column="1" />
</Border>
</DataTemplate>
<DataTemplate x:Key="PersonItemTemplate">
<Border BorderThickness="0,0,0,0" BorderBrush="#6FBDE8">
<Grid Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="32" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image Source="Images/person.png" Width="24" Height="24" Grid.Column="0" HorizontalAlignment="Center" />
<TextBlock Text="{Binding Name}" VerticalAlignment="Center" Grid.Column="1" />
</Grid>
</Border>
</DataTemplate>
<DataTemplate x:Key="MovieItemTemplate">
<Border BorderThickness="0,0,0,0" BorderBrush="#6FBDE8">
<Grid Margin="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="32" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image Source="Images/movie.png" Width="24" Height="24" Grid.Column="0" HorizontalAlignment="Center" />
<TextBlock Text="{Binding FavoriteMovie}" VerticalAlignment="Center" Grid.Column="1" />
</Grid>
</Border>
</DataTemplate>
Each one of these visual structures will be nested within an item container, whose style we should define in order to provide visual responses to events like row selection, mouse over, like I mentioned earlier. I’ll then define the ItemContainerStyle resource named ListViewItemCongainerStyle like so:
<Style x:Key="ListViewItemContainerStyle" TargetType="{x:Type ListViewItem}">
<Setter Property="Background" Value="#ffffff" />
<Setter Property="HorizontalContentAlignment" Value="Left" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="Margin" Value="0,0,0,0" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<Border x:Name="Bd" Background="{TemplateBinding Background}" SnapsToDevicePixels="true" BorderThickness="0,0,0,1" BorderBrush="#6FBDE8">
<GridViewRowPresenter VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsSelected" Value="true">
<Setter TargetName="Bd" Property="BorderBrush" Value="#FF143c65" />
<Setter Property="Background" TargetName="Bd">
<Setter.Value>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#FF75aac7" Offset="0"/>
<GradientStop Color="#FF143c65" Offset="1"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="Bd" Property="Background" Value="#e0eff8" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
<Condition Property="IsSelected" Value="true" />
<Condition Property="Selector.IsSelectionActive" Value="True" />
</MultiTrigger.Conditions>
<Setter Property="Background" TargetName="Bd">
<Setter.Value>
<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#FF75aac7" Offset="0"/>
<GradientStop Color="#FF143c65" Offset="1"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" TargetName="Bd" Value="#FF143c65"/>
<Setter Property="Foreground" Value="White"/>
</MultiTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Notice that the GridViewRowPresenter container object marks the place where actual row data will appear and defines its layout. Header style template can be defined through the ColumnHeaderContainerStyle property, although in the current example, we’ve already defined a generic GridViewColumnHeader template in part I of this tutorial.
This is what we have so far:

Now if you notice closely, you can see that the ListView column header row has a slight left and right offset of about 2px. After inspecting this with Snoop, it becomes clear that the GridViewHeaderRowPresenter object, which is the object used to define the layout of our row of column headers, has a margin set to 2,0,2,0.

To counter this, we must also override the ScrollViewer style for the ListView, exposing all the layout attributes and customize them at our will. In this style I’ll set margin to zero and fine tune column header offset:
<Style x:Key="{x:Static GridView.GridViewScrollViewerStyleKey}" TargetType="ScrollViewer">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ScrollViewer">
<Grid Background="{TemplateBinding Background}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<DockPanel Margin="{TemplateBinding Padding}">
<ScrollViewer DockPanel.Dock="Top" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden" Focusable="false">
<GridViewHeaderRowPresenter Margin="0,0,0,0" Columns="{Binding Path=TemplatedParent.View.Columns,
RelativeSource={RelativeSource TemplatedParent}}" ColumnHeaderContainerStyle="{Binding Path=TemplatedParent.View.ColumnHeaderContainerStyle, RelativeSource={RelativeSource TemplatedParent}}"
ColumnHeaderTemplate="{Binding Path=TemplatedParent.View.ColumnHeaderTemplate,RelativeSource={RelativeSource TemplatedParent}}"
ColumnHeaderTemplateSelector="{Binding Path=TemplatedParent.View.ColumnHeaderTemplateSelector, RelativeSource={RelativeSource TemplatedParent}}"
AllowsColumnReorder="{Binding Path=TemplatedParent.View.AllowsColumnReorder, RelativeSource={RelativeSource TemplatedParent}}"
ColumnHeaderContextMenu="{Binding Path=TemplatedParent.View.ColumnHeaderContextMenu, RelativeSource={RelativeSource TemplatedParent}}"
ColumnHeaderToolTip="{Binding Path=TemplatedParent.View.ColumnHeaderToolTip, RelativeSource={RelativeSource TemplatedParent}}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</ScrollViewer>
<ScrollContentPresenter Name="PART_ScrollContentPresenter"
KeyboardNavigation.DirectionalNavigation="Local"
CanContentScroll="True" CanHorizontallyScroll="False"
CanVerticallyScroll="False"/>
</DockPanel>
<ScrollBar Name="PART_HorizontalScrollBar" Orientation="Horizontal" Grid.Row="1" Maximum="{TemplateBinding ScrollableWidth}" ViewportSize="{TemplateBinding ViewportWidth}" Value="{TemplateBinding HorizontalOffset}" Visibility="{TemplateBinding ComputedHorizontalScrollBarVisibility}"/>
<ScrollBar Name="PART_VerticalScrollBar" Grid.Column="1" Maximum="{TemplateBinding ScrollableHeight}" ViewportSize="{TemplateBinding ViewportHeight}" Value="{TemplateBinding VerticalOffset}" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Now to complete styling I will customize the style for the ListView itself, adding a custom background and border. You can then extend this as you wish:
<Style x:Key="{x:Type ListView}" TargetType="ListView">
<Setter Property="SnapsToDevicePixels" Value="true"/>
<Setter Property="OverridesDefaultStyle" Value="true"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListView">
<Border Name="Border" BorderThickness="1" BorderBrush="#999999" Background="#DFDFDF">
<ScrollViewer Style="{DynamicResource {x:Static GridView.GridViewScrollViewerStyleKey}}">
<ItemsPresenter />
</ScrollViewer>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsGrouping" Value="true">
<Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter TargetName="Border" Property="Background" Value="#BBBBBB"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
And this is the final result:

You now have full control over the ListView visual template. Extend it, play with it but most of all, have fun.
You can download the sample solution here. And here’s the summary of all tutorial articles:
WPF ListView Styling Tutorial Part I
WPF ListView Styling Tutorial Part II
Technorati Tags: Silverlight, Silverlight 4, WPF
For those who are still having questions regarding the new 3D technology affecting movies, games and apps, I’ll leave you with two links I found useful in explaining what this emerging technology is all about.
Whether you buy into the hype or not, it’s plain fact that 3D is everywhere these days. From movies and games to laptops and handhelds, pretty much every screen in the house is going to be 3D-capable in a year or so, even if you opt not to display any 3D content on it. Those of you who choose that path may stop reading now, and come back a little later when you change your mind. Because if you have kids or enjoy movies and games, there will be a point where you’re convinced, perhaps by a single standout piece of media, that 3D is worth it at least some of the time.
CrunchGear: A guide to 3D display technology: its principles, methods, and dangers
AVForums: A Guide to 3DTV: AVForums FAQ
I’ve recently developed with my team a new UI for setting application preferences. Before we got started, it was important to define not only how we were going to do both technically and visually but also what we would be doing. For such an important piece of UI It was important to define the actual look and feel of the interface we were about to create. So, besides Blend, we found the occasion appropriate SketchFlow, and soon created a new work methodology with it, that served both our team and curtomers.
I thought of sharing three resources I read at the time in order to learn SketchFlow essencials:
Technorati Tags: Expression Blend, Silverlight, WPF
I made available a small utility that allows you to script SQL Server data onto sql/txt files. It’s an old tool I used on several real world scenarios and it worked pretty well. It saved me a lot of time on many ocasions.
Although it isn’t finished, I thought of posting it so that you can save some time as well. Feel free to comment and don’t forget: use it at your own discretion.
Some of the features included are:
- SQL Server 2000 and 2005 support (2008 version’s new datatypes are yet to be added)
- Lists database tables, stored procedures and views
- Shows table schema info
- Dumps SQL Server table data onto configurable sql/txt files
- Set file size limit
- File per table option
- Maximum file size setting allows you to generate several, smaller, files
- View and Stored Procedure viewer and editor
From the PowerSQL homepage: “Keep in mind that this is a small utility I’ve made for my daily usage, and It’s still buggy, so use it at your discretion. I’ve used it successfully for several times in big production databases, but there’s allways room for error. Leave some feedback if you encounter urgent bugs, I’ll try to fix them. In the meantime I’ll try to get the time to make it a v1…”
Check out PowerSQL Homepage to download, and don’t forget to leave some feedback.
Technorati Tags: C#, SQL Server
This quick article will enable you to take full advantage of the ListView control by creating a simple data model and through a step-by-step incremental approach. I will try to be concise and direct in order for you to keep this article as future development reference.
Lets start by creating a new WPF Window and define a base data model for our sample. We’ll create a ListView control named “ListView”:
<ListView Name="ListView" ItemsSource="{Binding}" />
Window and data context setup:
public partial class ListViewStylingWindow : Window
{
public ListViewStylingWindow()
{
InitializeComponent();
ListView.DataContext = new ObservableCollection<Person>()
{
new Person() {Name = "Peter", Age = 22, FavoriteMovie = "Transformers"},
new Person() {Name = "Anne", Age = 19, FavoriteMovie = "Lord of the Rings"},
new Person() {Name = "John", Age = 25, FavoriteMovie = "Titanic"}
};
}
}
public class Person
{
public string Name { get; set; }
public int Age { get; set; }
public string FavoriteMovie { get; set; }
}
I’ve added an ObservableCollection with initialized 3 Person class objects to the Data Context of the control. Now let’s configure the ListView layout to accommodate the data structure we’re passing into the control’s DataContext. For this example, the GridView view mode of the ListView will be used.
<ListView Name="ListView" ItemsSource="{Binding}">
<ListView.View>
<GridView>
<GridViewColumn Header="Name" DisplayMemberBinding="{Binding Name}" />
<GridViewColumn Header="Age">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=Age}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
<GridViewColumn Header="Favorite Movie">
<GridViewColumn.CellTemplate>
<DataTemplate>
<TextBlock Text="{Binding Path=FavoriteMovie}" />
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
</GridView>
</ListView.View>
</ListView>
Notice that in the Age and Movie columns, I’ve purposefully used a CellTemplate definition to show you cell data templating. This is what we have so far:

So this will be the base from which we will start styling. We will follow a step-by-step styling procedure for easier reference.
Step #1: ListView Column Header styling (GridViewColumn)
We’ll start by adding a few brush styles to the resources collection and then reference it in the column style. Remember that GridView columns are derived from ButtonBase, so you have access to all the behaviors derived from it.
<LinearGradientBrush x:Key="BackgroundBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#FF6FBDE8" Offset="0"/>
<GradientStop Color="#FF4385BE" Offset="1"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush x:Key="HighlightBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#FF97d3f3" Offset="0"/>
<GradientStop Color="#FF4385BE" Offset="1"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush x:Key="BorderBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#FFAFDDF6" Offset="0"/>
<GradientStop Color="#FF2969AA" Offset="1"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
<LinearGradientBrush x:Key="PressedBorderBrush" StartPoint="0,0" EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStopCollection>
<GradientStop Color="#FF75aac7" Offset="0"/>
<GradientStop Color="#FF143c65" Offset="1"/>
</GradientStopCollection>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
Before we add the final header style, we’ll first add the gripper style. This will allow us to visually define the portion of the header that will respond to column resize and dragging operations.
<Style x:Key="GridViewColumnHeaderGripper" TargetType="Thumb">
<Setter Property="Width" Value="18"/>
<Setter Property="Background" Value="#2e566b"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Thumb}">
<Border Padding="{TemplateBinding Padding}" Background="Transparent">
<Rectangle HorizontalAlignment="Center" Width="1" Fill="{TemplateBinding Background}"/>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
This will add a nice touch to the UI. Now well add the style for the GridViewColumn. This style will aggregate previous resources and provide visual responses for mouse over, press and drag events:
<Style x:Key="{x:Type GridViewColumnHeader}" TargetType="GridViewColumnHeader">
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Foreground" Value="#FFFFFF" />
<Setter Property="Padding" Value="8"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewColumnHeader">
<Grid>
<Border Name="HeaderBorder" Padding="{TemplateBinding Padding}" BorderThickness="0,1,0,1" BorderBrush="{StaticResource BorderBrush}" Background="{StaticResource BackgroundBrush}">
<ContentPresenter Name="HeaderContent" Margin="0,0,0,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
</Border>
<Thumb x:Name="PART_HeaderGripper" HorizontalAlignment="Right" Margin="0,0,-9,0" Style="{StaticResource GridViewColumnHeaderGripper}"/>
</Grid>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="HeaderBorder" Property="Background" Value="{StaticResource HighlightBackgroundBrush}"/>
</Trigger>
<Trigger Property="IsPressed" Value="true">
<Setter TargetName="HeaderBorder" Property="Background" Value="{StaticResource PressedBorderBrush}"/>
<Setter TargetName="HeaderContent" Property="Margin" Value="1,1,0,0"/>
</Trigger>
<Trigger Property="IsEnabled" Value="false">
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="Role" Value="Floating">
<Setter Property="Opacity" Value="0.7"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewColumnHeader">
<Canvas Name="PART_FloatingHeaderCanvas">
<Rectangle Fill="#60000000" Width="{TemplateBinding ActualWidth}" Height="{TemplateBinding ActualHeight}"/>
</Canvas>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="Role" Value="Padding">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="GridViewColumnHeader">
<Border Name="HeaderBorder" BorderThickness="0,1,0,1" BorderBrush="{StaticResource BorderBrush}" Background="{StaticResource BackgroundBrush}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
And this is the outcome:

This sums up the first part of this ListView styling tutorial. In the next article, I’ll be covering in-depth styling on ListView items. For now, you can download the full sample solution here.
Technorati Tags: Silverlight, WPF
Microsoft released a prototype of a new jQuery Globalization Plugin that enables you to add globalization support to your JavaScript applications. This plugin includes globalization information for over 350 cultures ranging from Scottish Gaelic, Frisian, Hungarian, Japanese, to Canadian English. This plugin will be released to the community as open-source.
Basically, the jQuery Globalization plugin enables you to easily parse and format numbers, currencies, and dates for different cultures in JavaScript. For example, you can use the Globalization plugin to display the proper currency symbol for a culture, or format dates so that the day and month appear in the right order and the day and month names are correctly translated.
You can download the prototype for the jQuery Globalization plugin from Microsoft’s Github repository:
http://github.com/nje/jquery-glob
You can also download a set of samples that demonstrate some simple use-cases with it here.
Source: ScottGu’s Blog
Technorati Tags: ASP.NET, jQuery
Page 1 of 1712345Next »...Last »