Пример #1
0
        public MacExpander(IWidgetEventSink eventSink, ApplicationContext context) : base(eventSink, context)
        {
            Expander = new ExpanderWidget {
                AutoresizingMask = NSViewResizingMask.WidthSizable,
                Target           = this,
            };
            Box = new CollapsibleBox {
                AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable
            };

            AddSubview(Expander);
            AddSubview(Box);
        }
Пример #2
0
 public MacExpander(IWidgetEventSink eventSink, ApplicationContext context) : base(eventSink, context)
 {
     expander = new ExpanderWidget()
     {
         Frame            = new RectangleF(0, 0, 80, 21),
         AutoresizingMask = NSViewResizingMask.WidthSizable
     };
     box = new CollapsibleBox()
     {
         AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable
     };
     box.SetFrameOrigin(new PointF(0, 21));
     expander.DisclosureToggled += (sender, e) => box.Expanded = expander.On;
     AddSubview(expander);
     AddSubview(box);
 }
Пример #3
0
 public MacExpander()
 {
     SetFrameSize(new SizeF(80, 50 + CollapsibleBox.DefaultCollapsedHeight));
     expander = new ExpanderWidget()
     {
         Frame            = new RectangleF(0, 0, 80, 21),
         AutoresizingMask = NSViewResizingMask.WidthSizable
     };
     box = new CollapsibleBox()
     {
         Frame            = new RectangleF(0, 25, 80, 100),
         AutoresizingMask = NSViewResizingMask.HeightSizable | NSViewResizingMask.WidthSizable
     };
     expander.DisclosureToggled += (sender, e) => box.Expanded = expander.On;
     AutoresizesSubviews         = true;
     AddSubview(expander);
     AddSubview(box);
 }