mahapps.metro

Organize Items in DropDownButton?

痞子三分冷 提交于 2019-12-23 00:31:11
问题 I've a collection of items inside an ObservableCollection , each item have a specific nation name (that's only a string). This is my collection: private ObservableCollection<League> _leagues = new ObservableCollection<League>(); public ObservableCollection<League> Leagues { get { return _leagues; } set { _leagues = value; OnPropertyChanged(); } } the League model have only a Name and a NationName properties. The Xaml looks like this: <Controls:DropDownButton Content="Leagues" x:Name=

How to call MahApps Metro Dialog box in Usercontrol in Wpf

╄→гoц情女王★ 提交于 2019-12-22 11:27:30
问题 When I tried to call MahApps Metro Dialog Boxes I am getting error while Passing Values while calling Dialog Control when Passing parameters I need to pass Metrowindow parameter But I need to call it in User control Below is the Method I will call when I need Dialog control public async void ShowMessageDialog(object sender, RoutedEventArgs e) { // This demo runs on .Net 4.0, but we're using the Microsoft.Bcl.Async package so we have async/await support // The package is only used by the demo

Mahapps flyout not appearing with and caliburn.micro

孤街醉人 提交于 2019-12-21 05:25:13
问题 I'm trying to show a flyout in wpf using mahapps and caliburn.micro, unfortunately the view for the flyout is not being resolved, and all I get is the type name of the view model displayed in the flyout. I need the to display the flyout based on which is ActiveItem in the shell, for example the company search flyout is different to the contact search flyout. Any ideas how I can make this work. public void ShowSearchFlyout() { var supportsSearch = ActiveItem as ISupportSearch; if

How to bundle MahApps.Metro into single exe

痞子三分冷 提交于 2019-12-18 04:53:04
问题 I'm having a really hard time bundling all of my dependencies in my C# WPF project into a single exe, using SmartAssembly 6 (evaluation/trial), because of MahApps.Metro. This conclusion was drawn when creating a completely empty project with nothing but MahApps.Metro, and still not being able to bundle it. It throws an exception with an inner exception System.IO.FileNotFoundException: Could not load file or assembly 'System.Windows.Interactivity, Version=4.5.0.0, Culture=neutral,

How to add a passwordbox to dialog in Mahapp

给你一囗甜甜゛ 提交于 2019-12-12 18:35:28
问题 inside my wpf application i have a dialog(Mahapp control) and i need to add a passwordbox to this dialog instead of the textinput.Any ideas of how to do that. private async void ShowModalDialog_Click(object sender, RoutedEventArgs e) { popup.IsEnabled = false; this.MetroDialogOptions.ColorScheme = UseAccentForDialog.IsEnabled ? MetroDialogColorScheme.Accented : MetroDialogColorScheme.Theme; var result = await this.ShowInputAsync("FERMETURE DE L'APPLICATION.", "Tu dois demander à tes parents

Application icon stretches to title bar height when using MahApps.Metro

蹲街弑〆低调 提交于 2019-12-12 08:01:18
问题 How to prevent application icon from stretching to the height of the title bar when using MahApps.Metro? No spaces between icon and title bar edges no matter what size of icon used. I have also tried using multi-sized icons and this does not work. Here is an example out of the box of what it looks like: 回答1: Strongly inspired from mahapps punker76's code, you can do this: <MahApps:MetroWindow.IconTemplate> <DataTemplate> <Grid Width="{TemplateBinding Width}" Height="{TemplateBinding Height}"

How to change tile background on mouse over in WPF?

杀马特。学长 韩版系。学妹 提交于 2019-12-12 07:05:20
问题 Using the code provided in this post: lighten background color on button click per binding with converter I have written the following code to change the background of a MahApps Tile on MouseOver: <local:ColorLightConverter x:Key="colorLightConverter" /> <Style x:Key="aaa" TargetType="mah:Tile"> <Style.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="{Binding Path=Background.Color, RelativeSource={RelativeSource TemplatedParent}, Mode=OneTime,

WPF Extended Toolkit PropertyGrid: Change font color in rows and search box

北战南征 提交于 2019-12-12 04:23:47
问题 I am using the WPF Extended Toolkit PropertyGrid in a WPF app which also uses MahApps. I have set the application theme to BaseDark . When I display PropertyGrid, the text in the first column of the grid and in the Search textbox is white on a white background. I would like to change the Foreground color of this text to black. I have tried applying this Foreground color to various target controls (i.e. TextBlock , TextBox , DataGridCell ) in PropertyGrid.Resources.Style but this has not

SimpleChildWindows binded to View Model

心不动则不痛 提交于 2019-12-12 04:22:30
问题 I'm using MVVM Light, MahApps and SimpleChildWindows. I want to be able to create a CRUD Form in a modal popup. This CRUD form must be binded to its own ViewModel and called by a command in another ViewModel. I don't succeed to do this with SimpleChildWindows... So... Is it possible? 回答1: How I solved similar problem for myself, taking advantage of Dependency Injection: I used Unity and registered dependency to 'Func': public partial class App { protected override void OnStartup

Change Background in MetroWindow (MahApp)

为君一笑 提交于 2019-12-11 18:15:49
问题 How can I change the background of a MetroWindow? <ResourceDictionary 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" xmlns:Behaviours="clr-namespace:MahApps.Metro.Behaviours" xmlns:Converters="clr-namespace:MahApps.Metro.Converters" xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"> <Style BasedOn="{StaticResource {x:Type