brushes

    0热度

    1回答

    在WPF中,我有一个TextBox,并将BackgroundProperty设置为自定义画笔。我想给这个刷子一些TextBox的边界的视觉缓冲区。笔刷是GlyphRunBrush,其行为很像0​​,但具有栅格化字形作为笔刷源。 我该怎么做? 例子:

    2热度

    1回答

    我有一个以前的项目我有过在WPF应用程序中所有可用的颜色循环工作的一类,这是如下图所示; public class ListOfColors { public List<ComboBoxItem> SelectableColours; private PropertyInfo[] _propInfo; public List<ComboBoxItem>

    0热度

    1回答

    你好我正在使用Direct2D,而我正在使用径向渐变画笔,但我被困在一个地方。 我的径向渐变画笔代码 结构SampleWindow:DesktopWindow { //FOr Radial Gradient Brush ComPtr<ID2D1RadialGradientBrush> radialBrush; void CrateDeviceResources()

    5热度

    1回答

    我想用画笔绘制透明区域,但我的代码工作不太好。我认为有人可以帮助我。我的代码: // Handles the start of a touch - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { CGRect bounds = [self bounds]; UITouch *touch =

    2热度

    1回答

    我有一个没有标题栏和边框的WPF窗口。所以我想要改变基于它是否激活的窗口背景。 我在下面写了代码,但是我得到了消息Cannot implicitly convert type 'System.Drawing.Brush' to 'System.Windows.Media.Brush'。 你能帮我怎么做吗?谢谢! // This function used for both "Actived" an

    0热度

    2回答

    我想使图像在vb.net它是一个字符串 应当由2个色酮,为前景色另一个为围绕第一个 我应该如何使其使用彩色码? 我的结果一定是这样的形象有些东西(黄色为前景色和红色!为背景) [字符串在波斯语] 现在我首先使用使字符串 Dim result As New Bitmap(100, 100) Dim g As Graphics = Graphics.FromImage(result) g.Draw

    1热度

    2回答

    当布尔变量为true时,我需要更改标签和按钮的背景(在false时返回默认颜色)。所以我写了一个附加的属性。它看起来像这样至今: public class BackgroundChanger : DependencyObject { #region dependency properties // status public static bool GetStatu

    5热度

    4回答

    我有一个属性,允许已知颜色的字符串名称发送到我的控件。该酒店只接受适当的已知的颜色名称,比如“红”或“蓝” private KnownColor _UseColor = KnownColor.Red; /// <summary> /// Gets or sets the name of the colour /// </summary> public st

    -1热度

    1回答

    有关比较两把刷子 的Visual Studio 2012抱怨: private void SetLabel(string stText, Brushes colorBackground) { if (colorBackGround == Brushes.Yellow) ... } 错误消息:"The name 'colorBackGround' does not exist i

    -3热度

    1回答

    这里是在.NET 4.0中的另一个怪癖,我发现: 当我要检查,如果一个变量,它拥有System.Drawing.Brush,拥有一定的刷子,如: using System.Drawing; HisCell.Col == Brushes.White 它有时会失败,尽管事实上我早些时候将Brushes.White分配到HisCell.Col。 我该如何解决这个bug?