Cycle de progression Faire (quelque chose qui marche) -> comprendre ce que l’on fait/comment cela marche -> pousser plus loin les notions
| <Window x:Class="WPFTypedControls.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="400" Loaded="Window_Loaded"> <Window.Resources> <Style x:Key="BackgroundStyle1"> <Setter Property="Button.Background" Value="Orange"/> </Style> </Window.Resources> <WrapPanel> <Button Name="btnGetContact" Width="170" Height="25" Content="Obtenir le contact selectionné" Click="btnGetContact_Click"/> </WrapPanel> </Window> |
| <Button Name="btnGetContact" Width="170" Height="25" Content="Obtenir le contact selectionné" Click="btnGetContact_Click" Style="{StaticResource BackgroundStyle1}"/> |
| public partial class Window1 : Window { public Window1() { InitializeComponent(); btnGetContact.Style = (Style)(this.Resources["BackgroundStyle1"]); } } |