VisualStyle プロパティを使用して、C1ColorPicker コントロールにビジュアルスタイルを適用できます。C1ColorPicker コントロールの右上隅にあるスマートタグを使用して、カラーピッカーに適用するビジュアルスタイルを選択できます。
)をクリックして[C1ColorPicker のタスク]メニューを開きます。このコードスニペットは、「C1ColorPicker の操作」で作成したカラーピッカーアプリケーションからの引用です。
| VB |
コードのコピー
|
|---|---|
InitializeComponent() ComboBox1.DataSource = [Enum].GetValues(GetType(VisualStyle)) |
|
| C# |
コードのコピー
|
|---|---|
InitializeComponent();
comboBox1.DataSource = Enum.GetValues(typeof(VisualStyle));
|
|
| VB |
コードのコピー
|
|---|---|
Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged C1ColorPicker1.VisualStyle = DirectCast(ComboBox1.SelectedItem, VisualStyle) End Sub |
|
| C# |
コードのコピー
|
|---|---|
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { c1ColorPicker1.VisualStyle = (VisualStyle)comboBox1.SelectedItem; } |
|
