- Home /
How to set WindowStyle (hide MINIMIZE and MAXIMIZE buttons)
Hi, I'm trying to make a little interactive experience (Windows only) inside a tiny window.
My aim is to have a window with only the TITLE and the CLOSE BUTTON (so I want to hide MAXIMIZE and MINIMIZE buttons).
I've tried using this WPF property: https://docs.microsoft.com/en-us/dotnet/api/system.windows.window.windowstyle?view=netcore-3.1
public System.Windows.WindowStyle myWindow = WindowStyle.ToolWindow;
However, it seems like Mono isn't compatible with the .NET properties that rely on PresentationFramework.dll. I've tried importing this DLL file manually, but I get tons of errors. For example:
Failed to extract System.Windows.DeferredAppResourceReference class of base type System.Windows.DeferredResourceReference when inspecting Assets/PresentationFramework.dll
UnityEditor.AssemblyHelper:ExtractAllClassesThatAreUserExtendedScripts(String, String[]&, String[]&, String[]&)
UnityEditorInternal.InternalEditorUtility:ProjectWindowDrag(HierarchyProperty, Boolean)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
Assembly 'Assets/Scripts/PresentationFramework.dll' will not be loaded due to errors:
Unable to resolve reference 'PresentationCore'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'UIAutomationProvider'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'UIAutomationTypes'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'ReachFramework'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'PresentationUI'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
Unable to resolve reference 'System.Printing'. Is the assembly missing or incompatible with the current platform?
Reference validation can be disabled in the Plugin Inspector.
What am I doing wrong? Maybe this is a noob question, but this is the first time that I use DLLs and .NET libraries.
Thanks :-)
Comment