<Window
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	Title="WPF Basic version" 
	Height="430" Width="340" 
	ResizeMode="NoResize">
<Grid>
<StackPanel Orientation="Vertical" Margin="10,10,10,0" HorizontalAlignment="Center">
	<StackPanel Orientation="Horizontal"  FlowDirection="LeftToRight" Margin="0,5,0,0" HorizontalAlignment="Center">
		<Label Content="Notre interface WPF " Margin="0,0,0,0" FontSize="20"/>
	</StackPanel>	
	 <GroupBox Header="Choisissez une valeur" FlowDirection="RightToLeft" Height="60" Margin="0,10,0,0" Width="300" HorizontalAlignment="left">
		<StackPanel Orientation="Horizontal"  FlowDirection="LeftToRight" Margin="0,5,0,0" HorizontalAlignment="Center">
			<ComboBox x:Name="Choose_DS" SelectedIndex="0" Height="25" Width="280" Margin="0,0,0,0">
				<ComboBoxItem x:Name="value1" Margin="0,0,0,0">Notre première valeur</ComboBoxItem>
				<ComboBoxItem x:Name="value2" Margin="0,0,0,0">Notre seconde valeur</ComboBoxItem>
			</ComboBox>
		</StackPanel>
	</GroupBox>
	<GroupBox Header="Choix des sources" FlowDirection="RightToLeft" Height="60" Margin="0,5,0,0" Width="300" HorizontalAlignment="left">
		<StackPanel Orientation="Horizontal" FlowDirection="LeftToRight" Margin="0,5,0,0" HorizontalAlignment="Center">
			<Button x:Name="Browse" Content="Browse" Height="25" Margin="0,0,0,0" Width="80"></Button>
			<TextBox x:Name="TextBox" Margin="5,0,0,0" Width="195" Height="25"></TextBox>
		</StackPanel>							
	</GroupBox>
	<GroupBox Header="CheckBox options" HorizontalAlignment="Left" Margin="0,5,0,0" Height="45" FlowDirection="RightToLeft"  Width="300">
		<StackPanel Orientation="Horizontal"  FlowDirection="LeftToRight" Margin="0,5,0,0" HorizontalAlignment="Center">
			<CheckBox x:Name="Paris" Content="Paris" Margin="4,0,0,0" Width="70" Height="19"></CheckBox>
			<CheckBox x:Name="Rennes" Content="Rennes" Margin="4,0,0,0" Width="70" Height="19"></CheckBox>
			<CheckBox x:Name="Toulouse" Content="Toulouse" Margin="4,0,0,0" Width="70" Height="19"></CheckBox>
		</StackPanel>
	</GroupBox>	
	<TabControl x:Name="Tab_Control" HorizontalAlignment="Left" Height="130" VerticalAlignment="Top" Width="300" Margin="0,10,0,0">
		<TabItem Header="Infos" Margin="0,0,0,0">
			<Grid>
				<DataGrid SelectionMode="Single"  Name="DataGrid_XML" ColumnWidth="*" ItemsSource="{Binding}"  Margin="2,2,2,2" >
					<DataGrid.Columns>
						<DataGridTextColumn Header="ID" Binding="{Binding ID}"/>
						<DataGridTextColumn Header="Prénom" Binding="{Binding Prenom}"/>
						<DataGridTextColumn Header="Nom" Binding="{Binding Nom}"/>
					</DataGrid.Columns>
				</DataGrid>
			</Grid>
		</TabItem>
		<TabItem Header="Details" Margin="0,0,0,0">
		</TabItem>
		<TabItem Header="Autre" Margin="0,0,0,0">
		</TabItem>
	</TabControl>
</StackPanel>        
</Grid>
</Window>

<Window.Resources>
	<ResourceDictionary>
		<ResourceDictionary.MergedDictionaries>
			<ResourceDictionary Source=".\resources\Icons.xaml" />
			<ResourceDictionary Source=".\resources\custom.xaml" /> 
			<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
			<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
			<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
			<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Cobalt.xaml"/>
			<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml"/>
		</ResourceDictionary.MergedDictionaries>
	</ResourceDictionary>
</Window.Resources>

<Controls:MetroWindow 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
	Title="WPF/Mahapps version" 
	Height="470" Width="340" 
	ResizeMode="NoResize">
 <Window.Resources>
	<ResourceDictionary>
		<ResourceDictionary.MergedDictionaries>
			<ResourceDictionary Source=".\resources\Icons.xaml" />
			<ResourceDictionary Source=".\resources\custom.xaml" /> 
			<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
			<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
			<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
			<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Cobalt.xaml"/>
			<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
		</ResourceDictionary.MergedDictionaries>
	</ResourceDictionary>
</Window.Resources>
<Grid>
<StackPanel Orientation="Vertical" Margin="10,10,10,0" HorizontalAlignment="Center">
	<StackPanel Orientation="Horizontal"  FlowDirection="LeftToRight" Margin="0,5,0,0" HorizontalAlignment="Center">
		<Label Content="Notre interface WPF " Margin="0,0,0,0" FontSize="20"/>	
	</StackPanel>
	<GroupBox Header="Choisissez une valeur" FlowDirection="RightToLeft" Height="75" Margin="0,10,0,0" Width="300" HorizontalAlignment="left">
		<StackPanel Orientation="Horizontal"  FlowDirection="LeftToRight" Margin="0,5,0,0" HorizontalAlignment="Center">
			<ComboBox x:Name="Choose_DS" SelectedIndex="0" Height="25" Width="280" Margin="0,0,0,0">
				<ComboBoxItem x:Name="value1" Margin="0,0,0,0">Notre première valeur</ComboBoxItem>
				<ComboBoxItem x:Name="value2" Margin="0,0,0,0">Notre seconde valeur</ComboBoxItem>
			</ComboBox>
		</StackPanel>
	</GroupBox>
	<GroupBox Header="Choix des sources" FlowDirection="RightToLeft" Height="75" Margin="0,5,0,0" Width="300" HorizontalAlignment="left">
		<StackPanel Orientation="Horizontal" FlowDirection="LeftToRight" Margin="0,5,0,0" HorizontalAlignment="Center">
			<Button x:Name="Browse" Content="Browse" Height="25" Margin="0,0,0,0" Width="80"></Button>
			<TextBox x:Name="TextBox" Margin="5,0,0,0" Width="195" Height="25"></TextBox>
		</StackPanel>
	</GroupBox>
	<GroupBox Header="CheckBox options" HorizontalAlignment="Left" Margin="0,5,0,0" Height="65" FlowDirection="RightToLeft"  Width="300">
		<StackPanel Orientation="Horizontal"  FlowDirection="LeftToRight" Margin="0,5,0,0" HorizontalAlignment="Center">
			<CheckBox x:Name="Paris" Content="Paris" Margin="4,0,0,0" Width="70" Height="19"></CheckBox>
			<CheckBox x:Name="Rennes" Content="Rennes" Margin="4,0,0,0" Width="70" Height="19"></CheckBox>
			<CheckBox x:Name="Toulouse" Content="Toulouse" Margin="4,0,0,0" Width="70" Height="19"></CheckBox>
		</StackPanel>
	</GroupBox>
	<TabControl x:Name="Tab_Control" HorizontalAlignment="Left" Height="130" VerticalAlignment="Top" Width="300" Margin="0,10,0,0">	
		<TabItem Header="Infos" Margin="0,0,0,0">
			<Grid Background="DodgerBlue">
				<DataGrid SelectionMode="Single"  Name="DataGrid_XML" ColumnWidth="*" ItemsSource="{Binding}"  Margin="2,2,2,2" >
					<DataGrid.Columns>
						<DataGridTextColumn Header="ID" Binding="{Binding ID}"/>
						<DataGridTextColumn Header="Prénom" Binding="{Binding Prenom}"/>
						<DataGridTextColumn Header="Nom" Binding="{Binding Nom}"/>
					</DataGrid.Columns>
				</DataGrid>
			</Grid>
		</TabItem>
		<TabItem Header="Details" Margin="0,0,0,0"></TabItem>
		<TabItem Header="Autre" Margin="0,0,0,0"></TabItem>
	</TabControl>
</StackPanel>
</Grid>
</Controls:MetroWindow>  

$Date = (Get-Date).AddDays(-1)
$System_Log = (Get-EventLog -LogName System -After $Date -EntryType Error).count
$MyBadge.Badge = $System_Log
If ($System_Log -ne "0")
	{
		$MyBadge.BadgeBackground = "Red"
	}
Else
	{
		$MyBadge.BadgeBackground = "Green"		
	}

<Rectangle Fill="White" Height="60" Width="60">
	<Rectangle.OpacityMask>
		<VisualBrush  Stretch="Fill" Visual="{StaticResource appbar_mon_icone}" />
	</Rectangle.OpacityMask>
</Rectangle>

<Controls:Tile x:Name="MyTile1" Title="Messagerie" Background="#00a300" Width="125" Margin="3" Height="125">
	<Rectangle Fill="White" Height="60" Width="60">
		<Rectangle.OpacityMask>
			<VisualBrush  Stretch="Fill" Visual="{StaticResource appbar_office_outlook}" />
		</Rectangle.OpacityMask>
	</Rectangle>
</Controls:Tile>
<Controls:Tile x:Name="MyTile2" Title="Youtube" Background="#1BA1E2" Width="125" Margin="3" Height="125">	
<Rectangle Fill="White" Height="60" Width="60">
	<Rectangle.OpacityMask>
		<VisualBrush  Stretch="Fill" Visual="{StaticResource appbar_youtube}" />
	</Rectangle.OpacityMask>
</Rectangle>				
</Controls:Tile>

<Controls:Tile x:Name="MyTile1" Title="Desktop" Margin="3" Height="125" Width="147">
	<Controls:Tile.Background>
		 <ImageBrush ImageSource="Images/desktop.jpg" />
	</Controls:Tile.Background>
</Controls:Tile>

$Browse.Add_Click({
	$ToBeOkOrNotOk = [MahApps.Metro.Controls.Dialogs.MessageDialogStyle]::AffirmativeAndNegative
	$Mon_Choix = [MahApps.Metro.Controls.Dialogs.DialogManager]::
		ShowModalMessageExternal($Form,"Hey","On continue ?",$ToBeOkOrNotOk)
	If ($Mon_Choix -eq "Affirmative")
	{#Code si bouton OK
	}
	Else
	{#Code si bouton Cancel
	}
})