mahapps.metro

How to change MahApps.Metro dialog content using styles (remix)

大憨熊 提交于 2019-12-02 08:00:41
问题 sA version of this question has already been asked here. I think the answer is clear and concise, but I don't quite understand it, and I didn't think I should start a massive chain of comments trying to figure it out(as posted out is proper etiquette here) I'd like to add an extra button in my MahApps.Metro Dialog. I need a Browse button so that a user can input a directory. This answer shows how to do that, but I don't quite understand since I'm fairly new to C# and WPF. What I don't

How to change MahApps.Metro dialog content using styles (remix)

只愿长相守 提交于 2019-12-02 07:00:28
sA version of this question has already been asked here . I think the answer is clear and concise, but I don't quite understand it, and I didn't think I should start a massive chain of comments trying to figure it out(as posted out is proper etiquette here ) I'd like to add an extra button in my MahApps.Metro Dialog. I need a Browse button so that a user can input a directory. This answer shows how to do that, but I don't quite understand since I'm fairly new to C# and WPF. What I don't understand is exactly where in my xaml file I should be placing the <Style></Style> section. If I'm correct

How To Create A Custom Accent In MahApps.Metro?

旧巷老猫 提交于 2019-12-01 13:31:43
I'm trying to override the default style of the flyout. I tried to move all my styles in an own ResourceDictionary and used <Style x:Key="DefaultFlyout" TargetType="controls:Flyout" BasedOn="{StaticResource {x:Type controls:Flyout}}"> , but it always ignores what I enter in BasedOn . Directly using {StaticResource Flyout} doesn't work because it's an unknown identifier, and DynamicResource isn't supported for BasedOn . My resource dictionary Controls.xaml : <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006

Extending TextBox in WPF using MahApps keeping Style

China☆狼群 提交于 2019-12-01 09:56:40
I made a custom textbox class for validating the input of the user to only allow Hexadecimal values, and used this new textbox (HexTextBox) in the xaml. It works well, but the HexTextBox looses all the style from the Mahapps, including color scheme and TextBoxHelper. Do you know how to use this extended TexBox and keep the style? HexTextBox: public class HexTextBox : TextBox { public HexTextBox() { } /// <summary> /// Raise when a keyboard key is pressed. /// </summary> /// <param name="e">The event args.</param> protected override void OnPreviewKeyDown(KeyEventArgs e) { if (e.Key == Key.Space

Extending TextBox in WPF using MahApps keeping Style

妖精的绣舞 提交于 2019-12-01 07:50:14
问题 I made a custom textbox class for validating the input of the user to only allow Hexadecimal values, and used this new textbox (HexTextBox) in the xaml. It works well, but the HexTextBox looses all the style from the Mahapps, including color scheme and TextBoxHelper. Do you know how to use this extended TexBox and keep the style? HexTextBox: public class HexTextBox : TextBox { public HexTextBox() { } /// <summary> /// Raise when a keyboard key is pressed. /// </summary> /// <param name="e"

How to preserve mahapps metro styling when adding custom trigger?

☆樱花仙子☆ 提交于 2019-11-30 18:46:50
问题 I had a button that was styled in the default metro style. However when I added a trigger to the button, the style is overridden. How to preserve the original mahapps metro styling when adding your own style and triggers? <Button x:Name="startButton" Content="Start" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,26" Width="75" Click="startButton_Click" Height="67" Grid.Column="1"> <!--<Button.Style> <Style TargetType="Button"> <Style.Triggers> <Trigger Property=

How to bundle MahApps.Metro into single exe

拜拜、爱过 提交于 2019-11-29 07:01:49
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, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. I've spent

How to change MahApps.Metro dialog content template width?

别等时光非礼了梦想. 提交于 2019-11-27 04:40:22
I would like to change the base template of the MahApps.Metro dialogs (or create a new dialog type), because I would like to show them in a narrow login window. Right now almost all the second words in the message are in a new row, but there are nice big spaces on the right and the left side, which I would like to reduce. I've found in BaseMetroDialog.xaml that the message dialog is divided into three parts vertically: 25% space on left side, 50% for the content and 25% space on the right side. I would like to change these numbers. But how could I change the control template of BaseMetroWindow

How to change MahApps.Metro dialog content template width?

為{幸葍}努か 提交于 2019-11-26 11:18:18
问题 I would like to change the base template of the MahApps.Metro dialogs (or create a new dialog type), because I would like to show them in a narrow login window. Right now almost all the second words in the message are in a new row, but there are nice big spaces on the right and the left side, which I would like to reduce. I\'ve found in BaseMetroDialog.xaml that the message dialog is divided into three parts vertically: 25% space on left side, 50% for the content and 25% space on the right