« MahApps.Metro » : différence entre les versions
De Banane Atomic
Aller à la navigationAller à la recherche
(→Liens) |
|||
Ligne 70 : | Ligne 70 : | ||
| MahApps.Metro || {{boxx|MahApps.Metro}} {{boxx|ControlzEx}} | | MahApps.Metro || {{boxx|MahApps.Metro}} {{boxx|ControlzEx}} | ||
|- | |- | ||
| MahApps.Metro. | | [MahApps.Metro.IconPacks https://github.com/MahApps/MahApps.Metro.IconPacks] || {{boxx|MahApps.Metro.IconPacks}} | ||
|} | |} |
Version du 19 octobre 2021 à 17:31
Liens
Build-in styles and themes
App.xaml |
<Application> <Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <!-- MahApps.Metro resource dictionaries --> <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" /> <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" /> <!-- Accent and AppTheme --> <ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/dark.orange.xaml" /> </ResourceDictionary.MergedDictionaries> </ResourceDictionary> </Application.Resources> </Application> |
MainWindow.xaml |
<!-- Remplacer Window par MetroWindow --> <mah:MetroWindow xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls"> |
MainWindow.xaml.cs |
// Supprimer l'héritage de Window public partial class MainWindow |
Controls
MetroWindow
<!-- Normal Border --> <mah:MetroWindow xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" BorderBrush="{DynamicResource MahApps.Brushes.Accent}" BorderThickness="1"> <!-- Glow Border --> <mah:MetroWindow xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" GlowBrush="{DynamicResource MahApps.Brushes.Accent}"> |
TextBox
Watermark
<Window xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"> <TextBox Controls:TextBoxHelper.Watermark="Filtre" /> |
Clear button
<Window xmlns:Controls="http://metro.mahapps.com/winfx/xaml/controls"> <TextBox Controls:TextBoxHelper.ClearTextButton="True" /> |
Dialogs
// depuis une MetroWindow await this.ShowMessageAsync("Titre", "Message"); |
Installation via Nuget
Paquet NuGet | Contenu |
---|---|
MahApps.Metro | MahApps.Metro ControlzEx |
[MahApps.Metro.IconPacks https://github.com/MahApps/MahApps.Metro.IconPacks] | MahApps.Metro.IconPacks |