[Mono-osx] Make a window without titlebar and border
De Santis Luca
farolfo at hotmail.com
Fri Aug 19 13:19:58 EDT 2011
Thank you, I've solved yesterday, I've seen the example "RoundedTransparentWindow" in the monomac source code. I've many difficult, Cocoa in much different of GTK and winforms :)
regards
Luca
Date: Fri, 19 Aug 2011 11:40:46 +0300
From: mrgutis at gmail.com
To: mono-osx at lists.ximian.com
Subject: Re: [Mono-osx] Make a window without titlebar and border
You must create other constructor and in Initialize do not set style mask:
//removes style from window
[Export("initWithContentRect:styleMask:backing:defer:")]
public MainWindow (RectangleF rect, NSWindowStyle style, NSBackingStore backing, bool defer) :
base(rect, NSWindowStyle.Borderless, backing, defer)
{
Initialize ();
}
On Thu, Aug 18, 2011 at 5:53 PM, De Santis Luca <farolfo at hotmail.com> wrote:
Hi, I'm try make a window without border and title bar with Monomac. I've read a this thread on stackoverflow:
http://stackoverflow.com/questions/2018147/hide-nswindow-title-bar
I created a simple project with MonoDevelop and I tried to set the value of StyleMask property like the thread on stackoverflow, but it dosen't work. Someone can help me with this problem ?
Thank you
using System;
using System.Collections.Generic;using System.Linq;using MonoMac.Foundation;
using MonoMac.AppKit;
namespace QuickTime.Mac.VideoPlayer
{ public partial class MainWindow : MonoMac.AppKit.NSWindow {
#region Constructors
// Called when created from unmanaged code
public MainWindow (IntPtr handle) : base(handle) {
Initialize (); }
// Called when created directly from a XIB file [Export("initWithCoder:")]
public MainWindow (NSCoder coder) : base(coder) {
Initialize (); }
// Shared initialization code void Initialize ()
{ this.StyleMask=NSWindowStyle.Borderless;
} #endregion
}}
Sorry for my bad english and if question is stupid but I use Mono only with GTK and Winform and I don't know Cocoa very well
_______________________________________________
Mono-osx mailing list
Mono-osx at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-osx
_______________________________________________
Mono-osx mailing list
Mono-osx at lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-osx
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-osx/attachments/20110819/8940d03e/attachment.html
More information about the Mono-osx
mailing list