Example #1
0
        protected override void CreateChildElements()
        {
            base.CreateChildElements();
            this.stackLayout = new StackLayoutPanel();
            this.stackLayout.Orientation = Orientation.Horizontal;
            this.stackLayout.EqualChildrenWidth = false;

            this.labelPrefix = new RadLabelElement();
            this.labelPrefix.Text = "+7";
            this.labelPrefix.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.stackLayout.Children.Add(this.labelPrefix);

            this.textBoxNumber = new RadMaskedEditBoxElement();
            this.textBoxNumber.Font = new System.Drawing.Font("Segoe UI", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(204)));
            this.textBoxNumber.MinSize = new Size(200,0);
            this.textBoxNumber.TextChanged += textBoxNumber_TextChanged;
            this.textBoxNumber.MaskType = MaskType.Standard;
            this.textBoxNumber.MouseUp += textBoxNumber_MouseUp;
            this.textBoxNumber.Border.Visibility = ElementVisibility.Hidden;
            this.textBoxNumber.TextRenderingHint = TextRenderingHint.SystemDefault;
            this.textBoxNumber.Mask = "(000) 000-0000";
            this.textBoxNumber.Text = "";
            this.stackLayout.Children.Add(this.textBoxNumber);

            this.Children.Add(this.stackLayout);
        }
Example #2
0
 /// <summary>
 /// Seteaza imaginea in functie de dificultatea specificata intr-un label (0-3)
 /// </summary>
 /// <param name="buttonLabel">Label-ul pentru care se va seta imaginea</param>
 /// <param name="difficulty">Dificultatea</param>
 private void SetDifficultyImage(RadLabelElement buttonLabel, int difficulty)
 {
     SetStatusLabelState("", 0);
     switch (difficulty)
     {
         case 1:
             buttonLabel.Image = Properties.Resources._1_star_rating;
             break;
         case 2:
             buttonLabel.Image = Properties.Resources._2_star_rating;
             break;
         case 3:
             buttonLabel.Image = Properties.Resources._3_star_rating;
             break;
         default:
             buttonLabel.Image = Properties.Resources._0_star_rating;
             break;
     }
 }