Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/299.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 如何控制单选按钮的背景图像大小?_C#_.net_User Interface - Fatal编程技术网

C# 如何控制单选按钮的背景图像大小?

C# 如何控制单选按钮的背景图像大小?,c#,.net,user-interface,C#,.net,User Interface,我有外观设置为按钮的单选按钮。我添加了背景图像。现在点击的效果并不明显,因为背景在按钮上方,不会受到影响 我认为最好将图像缩小,以便更清楚地知道选择了哪一个,但最好是整个单选按钮看起来自然按下7高亮显示/任何效果 谢谢 this.radioButton3.Appearance = System.Windows.Forms.Appearance.Button; this.radioButton3.BackgroundImageLayout = System.Windows.Forms.Im

我有外观设置为按钮的单选按钮。我添加了背景图像。现在点击的效果并不明显,因为背景在按钮上方,不会受到影响

我认为最好将图像缩小,以便更清楚地知道选择了哪一个,但最好是整个单选按钮看起来自然按下7高亮显示/任何效果

谢谢

  this.radioButton3.Appearance = System.Windows.Forms.Appearance.Button;
  this.radioButton3.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
  this.radioButton3.Location = new System.Drawing.Point(137, 111);
  this.radioButton3.Name = "radioButton3";
  this.radioButton3.Size = new System.Drawing.Size(80, 31);
  this.radioButton3.TabIndex = 2;
  this.radioButton3.TabStop = true;
  this.radioButton3.UseVisualStyleBackColor = true;
  this.radioButton3.CheckedChanged += new    
  System.EventHandler(this.radioButton1_CheckedChanged);
当点击时,我想要改变

      if (control is RadioButton) {
      RadioButton radio = control as RadioButton;
      if (radio.Checked) {

      }
    }

让我看看你的密码,非常直接