| Novembre 2009 | ||||||||||
| L | M | M | J | V | S | D | ||||
| 1 | ||||||||||
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | ||||
| 9 | 10 | 11 | 12 | 13 | 14 | 15 | ||||
| 16 | 17 | 18 | 19 | 20 | 21 | 22 | ||||
| 23 | 24 | 25 | 26 | 27 | 28 | 29 | ||||
| 30 | ||||||||||
|
||||||||||
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Style x:Key="BackgroundStyle1">
<Setter Property="Button.Background"
Value="Orange"/>
</Style>
</ResourceDictionary>
|
|
<Application x:Class="WPFTypedControls.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Window1.xaml">
<Application.Resources>
<ResourceDictionary Source="StylesDictionary.xaml"/>
</Application.Resources>
</Application>
|
|
<Window x:Class="WPFTypedControls.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:ContactControls="clr-namespace:WPFTypedControls"
xmlns:MyNamespace="clr-namespace:WPFTypedControls"
Title="Window1" Height="300" Width="400" Loaded="Window_Loaded">
<WrapPanel>
<ContactControls:ContactComboBox
x:Name="contactComboBox1" Height="25" Width="150" />
<Button Name="btnGetContact" Width="170" Height="25" Content="Obtenir le contact selectionné" Click="btnGetContact_Click" Style="{StaticResource BackgroundStyle1}"/>
</WrapPanel>
</Window>
|
|
public partial class
Window1 : Window
{
public Window1()
{
InitializeComponent();
btnGetContact.Style = (Style)(Application.Current.Resources["BackgroundStyle1"]);
}
}
|