FAQ Database Discussion Community


StickWindow in Mahapps

wpf,mahapps.metro
I'm trying to implement snapping to edges. I've found one answer here and implemented, however it destroys the chromeless window of Mahapps MetroWindow. I've adapted the solution to use Behaviors, so I'm going to share only the Behavior snnipet (you can find StickyWindow code here): Usage: <metro:MetroWindow x:Class="Communicator.Main.Views.ShellView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"...

MahApps - How to disable automatic uppercase of default button

wpf,mahapps.metro
I have started to introduce MahApps.Metro (really awesome) in my WPF application and my favorite button is the default. The problem is that it puts all my text in uppercase and I don't want it.

How to use properties from Metrowindow above framed page

c#,wpf,mahapps.metro
Using Mahapps.metro, and stumbling into a problem. I want to page paged content, all controlled via a frame within metro window. There are two things I cannot figure out how to do, which was easy enough whilst working all within one window without the pages. First off, I want to...

Is MahApps.Metro needed for Windows 8.1 WPF app?

wpf,xaml,mahapps.metro
I am developing WPF app using Windows 7 and using MahApps.Metro library for Metro style UI. Now the default WPF app running in Windows 8.1 provides the same Metro Style, do I need to use MahApps for the styling? Is there any advantages for MahApps.Metro over default style? I don't...

WPF DataTrigger with OpacityMask

c#,wpf,mahapps.metro,visualbrush,opacitymask
i´m using Mahapps.Metro and want to change an icon depending on an Property. Here is the Mahapps sample for their Icons Setting only the Backgroundcolor("Fill") of the rectangle everything works fine. As soon as the OpacityMask is set the complete rectangle stays blank. <Rectangle Width="20" Height="20"> <Rectangle.Style> <Style TargetType="{x:Type Rectangle}">...

How to access ShowMessageAsync method of MetroWindow from ViewModel

wpf,mvvm,viewmodel,mahapps.metro
I am using MahApps.metro WPF library with MVVM. I have a ViewModel from which I need to display a Dialog. The MetroWindow has ShowMessageAsync. But what is the proper way to access it from the ViewModel? As I understand I need a View instance but passing that into the ViewModel...

UI Control Visibility Before Command Invocation?

c#,wpf,mvvm,mahapps.metro
I have a button command which sends several emails and therefore takes a few seconds for the method to execute. I want to show a progress ring Mahapps.Metro & disable the view whilst this method is executing. Here's my ProgressRing in my view: <Controls:ProgressRing IsActive="True" Visibility="{Binding IsProgressRingVisible, UpdateSourceTrigger=PropertyChanged}" /> ViewModel...

Orchestra.MahApps custom window

c#,wpf,mahapps.metro,catel,orchestra
I'm trying to create custom MahApps.Metro window with Orchestra framework. I have copied currennt ShellWindow content (both view + code behind) and created my own Window. Then in App.xaml.cs I have used my window instead of ShellWindow like this: shellService.CreateWithSplash<MyShellWindowView>() And problem is, that this window is not correctly styled...

Setting focus to input box in an InputDialog using MahApps

c#,focus,mahapps.metro
We've made our own search dialog based on the InputDialog from MahApps Dialog examples, and it does work, but there are two issues with it: When opened it does not automatically focus in the search field, so you have to click it before starting to type your search If possible,...

WPF 'Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.'

c#,wpf,nuget,mahapps.metro
My application runs fine in VS 2010 but when I copy the executable from the bin folder to another location I get this error: 'Set property 'System.Windows.ResourceDictionary.DeferrableContent' threw an exception.' Line number '15' and line position '23'. Did a bit of testing and found out that if I include the...

How to change MahApps.Metro dialog content template width?

wpf,xaml,modal-dialog,controltemplate,mahapps.metro
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...

Style “Cannot find resource 'MetroCheckBox'” in MahApps

c#,wpf,xaml,styles,mahapps.metro
I'm starting to use styles in WPF. I'm using MahApps styles as a base, which so far has been really good. I've been able to make specific modifications using the BasedOn property. One of the simpler changes is to add a default margin so when adding controls they don't touch....

ShowWindowCommandsOnTop not accessible in 1.0.0.0

mahapps.metro
Recently I upgraded to Mahapps 1.0.0.0 from 0.14.0.0 and I'm getting error on ShowWindowCommandsOnTop="False" as it is inaccessible. Where did it go?

MahApps.Metro Progress Ring speed change

wpf,mahapps.metro
I use the progress ring in XAML like in the guide: <Controls:ProgressRing IsActive="True" /> Is there any way to control the speed of a progress ring?...

Setting an image as the title bar background

c#,wpf,mahapps.metro
I can't see an obvious solution to this. I've been given an image file which includes both the "icon" and the text to be used in the title bar. Ideally I'd like to simply turn the icon off, use the image in the title bar section, and be done with...

Add ErrorTemplate to a MahApp control without overwriting its default style

c#,wpf,templates,mvvm,mahapps.metro
I am using MahApps and working on implementing validation for TextBoxes. MahApps provides some nice properties in TextBoxes, as Controls:TextBoxHelper.Watermark and Controls:TextBoxHelper.ClearTextButton. I am writing an ErrorTemplate using my style but I overwrite the default template of the TextBox and lose those Metro properties. How can I achieve my goal...

Show/hide Mahapps Flyout control

c#,.net,wpf,xaml,mahapps.metro
How can I show/hide Mahapps Flyout control? Now I have: <controls:FlyoutsControl> <controls:Flyout Header="Flyout" Position="Right" Width="200" IsOpen="True"> <TextBlock FontSize="24">Hello World</TextBlock> </controls:Flyout> </controls:FlyoutsControl> And it's open, but when I click button with arrow I can't show it again. ...

Metro.Mahapps Designer not showing

c#,xaml,mahapps.metro
Hi I've been struggling with this bug and I have no clue how to resolve this. Basically the form designer giving me this error: Error 2 Could not load file or assembly 'MahApps.Metro, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified. But the application can...