該篇是 [C#] 控件智能標籤 延續,加入 ControlDesigner.SelectionRules 說明。
SelectionRules 定義設定時期兩件事情
- 控件縮放
- 控件移動
該筆記紀錄控件縮放方框,在 ControlDesigner 內加入下面的 Code 來觀察
namespace UCControlDesignerExample
{
public class ColorLabelControlDesigner : ControlDesigner
{
/// <summary>
/// 控制項選擇規則
/// 控件滑鼠移動 (SelectionRules.Moveable)
/// 控件鍵盤移動 (SelectionRules.Visible)
/// 控件縮放 (SelectionRules.AllSizeable)
/// </summary>
public override SelectionRules SelectionRules
{
get { return SelectionRules.Moveable | SelectionRules.Visible; }
}
}
}
把控件截圖來觀察- 上圖:沒有進行任何設定,控件四周有拉取方框
- 下圖:設定只能移動,控件四周沒有拉取方框
控件能不能縮放還是看控件本身,不是有拉取方框就一定能縮放

![[SQL] Like - Constant Scan](https://live.staticflickr.com/65535/51240375029_f5184edf9e_z.jpg)
![[SQL] Like - 結尾字元搜尋改善](https://live.staticflickr.com/65535/51236824270_3cdb2738be_z.jpg)
![[SQL] Foreign Key - Insert-2](https://live.staticflickr.com/65535/51236111289_4ec43d562a_z.jpg)
![[SQL] Foreign Key - Insert-1](https://live.staticflickr.com/65535/51236420510_83142e21a4_z.jpg)
![[SQL] Foreign Key - Join-1](https://live.staticflickr.com/65535/51230106765_2983663daf_z.jpg)
![[SQL] Foreign Key - Join-2](https://live.staticflickr.com/65535/51229804474_f2130892f4_z.jpg)
![[SQL] 擴充事件 - 死結 - 排除特定 DB-1](https://live.staticflickr.com/65535/51215739625_3212676f2a_z.jpg)
![[SQL] 擴充事件 - 死結 - 排除特定 DB-2](https://live.staticflickr.com/65535/51215739615_f5388ed198_z.jpg)
![[SQL] Like - 估計、實際資料-3](https://live.staticflickr.com/65535/51240344084_bc34664cfa_z.jpg)
![[SQL] Like - 估計、實際資料-1](https://live.staticflickr.com/65535/51217333652_5b793497f8_z.jpg)
![[SQL] Like - 估計、實際資料-2](https://live.staticflickr.com/65535/51218811989_3a00b63cd2_w.jpg)
![[SQL] Like _ 萬用字元 - sp_executesql-2](https://live.staticflickr.com/65535/51216797773_6f65d8620e_z.jpg)
![[SQL] Like _ 萬用字元 - sp_executesql-1](https://live.staticflickr.com/65535/51217656240_9abab4f767_z.jpg)