Exemplo n.º 1
0
 /// <summary>
 /// Discover the preferred size of the element.
 /// </summary>
 /// <param name="context">Layout context.</param>
 public override Size GetPreferredSize(ViewLayoutContext context)
 {
     Debug.Assert(context != null);
     return(_drawTrackBar.TickSize);
 }
Exemplo n.º 2
0
 /// <summary>
 /// Discover the preferred size of the element.
 /// </summary>
 /// <param name="context">Layout context.</param>
 public override Size GetPreferredSize(ViewLayoutContext context)
 {
     // We want to be as wide as drop down buttons on standard controls
     return(new Size(SystemInformation.VerticalScrollBarWidth - 2, 0));
 }
 /// <summary>
 /// Perform a layout of the elements.
 /// </summary>
 /// <param name="context">Layout context.</param>
 public override void Layout(ViewLayoutContext context)
 {
     Debug.Assert(context != null);
     ClientRectangle = context.DisplayRectangle;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Discover the preferred size of the element.
 /// </summary>
 /// <param name="context">Layout context.</param>
 public override Size GetPreferredSize(ViewLayoutContext context)
 {
     // Always provide the requested fixed size
     return(FixedSize);
 }
 /// <summary>
 /// Discover the preferred size of the element.
 /// </summary>
 /// <param name="context">Layout context.</param>
 public override Size GetPreferredSize(ViewLayoutContext context)
 {
     Debug.Assert(context != null);
     return(new Size(Length, Length));
 }