コード例 #1
0
 private void titleLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     if (args.HeightChange != 0)
     {
         this.textLabel.Top += args.HeightChange;
         textLabel_LabelHeightChanged(args);
     }
 }
コード例 #2
0
 private void titleLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     this.pictureBox1.Top += args.HeightChange;
     this.descriptionLabel.Top += args.HeightChange;
     descriptionLabel_LabelHeightChanged(args);
 }
コード例 #3
0
 private void textLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     if (args.HeightChange != 0)
     {
         this.Height += args.HeightChange;
     }
 }
コード例 #4
0
 private void descriptionLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     if (args.HeightChange != 0)
     {
         this.Height += args.HeightChange;
         this.Location = new Point(this.Location.X, this.Location.Y - args.HeightChange);
     }
 }
コード例 #5
0
 private void descriptionLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     if (args.HeightChange != 0)
     {
         int heightChange = args.HeightChange;
         int newHeight = this.Height + heightChange;
         if (newHeight < this.minHeight)
         {
             newHeight = this.minHeight;
             heightChange = newHeight - this.Height;
         }
         this.Height = newHeight;
         this.Location = new Point(this.Location.X, this.Location.Y - heightChange);
     }
 }
コード例 #6
0
 private void applicationNameLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     if (args.HeightChange != 0)
     {
         this.titleLabel.Top += args.HeightChange;
         titleLabel_LabelHeightChanged(args);
     }
 }
コード例 #7
0
 private void descriptionLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     if (args.HeightChange != 0)
     {
         this.Height = this.Height + args.HeightChange;
     }
 }
コード例 #8
0
 /// <summary>
 /// By handling the LabelHeightChanged events, you can make sure you notification window
 /// will expand properly to fit all of the text. In order to take advantage of this event,
 /// you must use ExpandingLabel class in place of normal Labels.
 /// </summary>
 private void descriptionLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     this.applicationNameLabel.Top += args.HeightChange;
     applicationNameLabel_LabelHeightChanged(args);
 }
コード例 #9
0
 /// <summary>
 /// By handling the LabelHeightChanged events, you can make sure you notification window
 /// will expand properly to fit all of the text. In order to take advantage of this event,
 /// you must use ExpandingLabel class in place of normal Labels.
 /// </summary>
 private void applicationNameLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     if (args.HeightChange != 0)
     {
         this.Size = new Size(this.Size.Width, this.Size.Height + args.HeightChange);
         this.Location = new Point(this.Location.X, this.Location.Y - args.HeightChange);
     }
 }
コード例 #10
0
 private void albumLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     this.starRating.Top += args.HeightChange;
     this.Height += args.HeightChange;
 }
コード例 #11
0
 private void artistNameLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     this.albumLabel.Top += args.HeightChange;
     this.albumLabel_LabelHeightChanged(args);
 }
コード例 #12
0
        private void descriptionLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
        {
            if (args.HeightChange != 0)
            {
                this.Size = new Size(this.Size.Width, this.Size.Height + args.HeightChange);
                this.Location = new Point(this.Location.X, this.Location.Y - args.HeightChange);

                // Recalculate our border regions.
                Region borderRegion = System.Drawing.Region.FromHrgn(CreateRoundRectRgn(0, 0, this.Width, this.Height, radius, radius));
                this.Region = borderRegion;
            }
        }
コード例 #13
0
 private void textLabel_LabelHeightChanged(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     if (args.HeightChange != 0)
     {
         int fudge = 2;
         this.textLabel.Height += fudge;
         this.Height += (args.HeightChange + fudge);
     }
 }
コード例 #14
0
 private void textLabel_LabelHeightChanged_1(ExpandingLabel.LabelHeightChangedEventArgs args)
 {
     this.Height = this.originalHeight;
 }