LoadImage() static private méthode

static private LoadImage ( string resource ) : MonoMac.AppKit.NSImage
resource string
Résultat MonoMac.AppKit.NSImage
Exemple #1
0
        public override void Initialize()
        {
            base.Initialize();

            var resource = "maintoolbarbg.png";

            Window.Realized += delegate {
                NSWindow w = GtkQuartz.GetWindow(Window);
                w.IsOpaque = false;
                NSImage img = MacPlatformService.LoadImage(resource);
                w.BackgroundColor = NSColor.FromPatternImage(img);
                w.StyleMask      |= NSWindowStyle.TexturedBackground;
            };

            toolbar                = new CustomToolbar();
            toolbar.Background     = MonoDevelop.Components.CairoExtensions.LoadImage(typeof(MacPlatformService).Assembly, resource);
            toolbar.TitleBarHeight = MacPlatformService.GetTitleBarHeight();
            MainBox.PackStart(toolbar, false, false, 0);
            ((Gtk.Box.BoxChild)MainBox [toolbar]).Position = 0;
        }