Esempio n. 1
0
            protected override bool OnDrawn(Cairo.Context cr)
            {
                var alloc = new Gdk.Rectangle()
                {
                    X      = 0,
                    Y      = 0,
                    Width  = Allocation.Width,
                    Height = Allocation.Height
                };

                theme.DrawListBackground(cr, alloc, true);
                theme.DrawFrameBorder(cr, alloc);
                return(true);
            }
 protected override bool OnExposeEvent(Gdk.EventExpose evnt)
 {
     Cairo.Context cr = null;
     try {
         var alloc = new Gdk.Rectangle()
         {
             X      = Allocation.X,
             Y      = Allocation.Y,
             Width  = Allocation.Width,
             Height = Allocation.Height
         };
         cr = Gdk.CairoHelper.Create(evnt.Window);
         theme.DrawListBackground(cr, alloc, true);
         theme.DrawFrameBorder(cr, alloc);
     } finally {
         CairoExtensions.DisposeContext(cr);
     }
     return(true);
 }