本文整理匯總了C#中ColorSetWindow.SetColor方法的典型用法代碼示例。如果您正苦於以下問題:C# ColorSetWindow.SetColor方法的具體用法?C# ColorSetWindow.SetColor怎麽用?C# ColorSetWindow.SetColor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ColorSetWindow
的用法示例。
在下文中一共展示了ColorSetWindow.SetColor方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: button_colorTitle2_Click
private void button_colorTitle2_Click(object sender, RoutedEventArgs e)
{
ColorSetWindow dlg = new ColorSetWindow();
dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
Color item = custTitleColor2;
dlg.SetColor(item);
if (dlg.ShowDialog() == true)
{
dlg.GetColor(ref item);
custTitleColor2 = item;
titleColor2.Color = custTitleColor2;
}
}
示例2: button_Color_Click
private void button_Color_Click(object sender, RoutedEventArgs e)
{
var btn = sender as Button;
var dlg = new ColorSetWindow();
dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
Color item = (btn.Background as SolidColorBrush).Color;
dlg.SetColor(item);
if (dlg.ShowDialog() == true)
{
dlg.GetColor(ref item);
(btn.Background as SolidColorBrush).Color = item;
}
}
示例3: button9_Click
private void button9_Click(object sender, RoutedEventArgs e)
{
ColorSetWindow dlg = new ColorSetWindow();
dlg.Owner = (Window)PresentationSource.FromVisual(this).RootVisual;
Color item = custColorList[9];
dlg.SetColor(item);
if (dlg.ShowDialog() == true)
{
dlg.GetColor(ref item);
custColorList[9] = item;
backColor9.Color = custColorList[0x09];
}
}
示例4: button_Color_Click
private void button_Color_Click(object sender, RoutedEventArgs e)
{
var btn = sender as Button;
var dlg = new ColorSetWindow();
dlg.Owner = CommonUtil.GetTopWindow(this);
Color item = (btn.Background as SolidColorBrush).Color;
dlg.SetColor(item);
if (dlg.ShowDialog() == true)
{
dlg.GetColor(ref item);
(btn.Background as SolidColorBrush).Color = item;
}
}