首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏hbbliyong

    WPF中ListView如何改变选中条背景颜色

    -- Foreground for Selected ListViewItem --> <SolidColorBrush x:Key="{x:Static <em>SystemColors</em>.HighlightTextBrushKey -- Background for Selected ListViewItem --> <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey TargetType="ListViewItem"> <Style.Resources> <SolidColorBrush x:Key="{x:Static <em>SystemColors</em>.ControlBrushKey }" Color="Yellow"/> <SolidColorBrush x:Key="{x:Static <em>SystemColors</em>.HighlightBrushKey} <Setter.Value> <DynamicResource ResourceKey="{x:Static SystemColors.ControlBrushKey

    4.4K70发布于 2018-03-05
  • 来自专栏跟着阿笨一起玩NET

    C# DataGridView样式 (蓝色)

    = System.Drawing.Color.Navy;             dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight ;             dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; this.DataGridView1.EnableHeadersVisualStyles = false;             this.DataGridView1.GridColor = System.Drawing.SystemColors.GradientInactiveCaption

    3.3K20发布于 2018-09-19
  • 来自专栏hbbliyong

    WPF --TextBox--圆角、水印、带单位

    TargetType="{x:Type TextBox}"> <Setter Property="Background" Value="{DynamicResource {x:Static <em>SystemColors</em>.WindowBrushKey StaticResource TextBox.Static.Border}"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static <em>SystemColors</em>.ControlTextBrushKey MultiTrigger.Conditions> <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static <em>SystemColors</em>.InactiveSelectionHighlightBrushKey

    1.4K30发布于 2019-09-25
  • 来自专栏技术之路

    WPF之TreeList的实现方法(一)

    <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static <em>SystemColors</em>.HighlightBrushKey /> <Setter Property="Foreground" Value="{DynamicResource {x:Static <em>SystemColors</em>.HighlightTextBrushKey <Setter TargetName="Bd" Property="Background" Value="{DynamicResource {x:Static <em>SystemColors</em>.ControlBrushKey "/> <Setter Property="Foreground" Value="{DynamicResource {x:Static <em>SystemColors</em>.ControlTextBrushKey "> <Setter Property="Foreground" Value="{DynamicResource {x:Static <em>SystemColors</em>.GrayTextBrushKey

    2.5K50发布于 2018-01-31
  • 来自专栏c#Winform自定义控件系列

    (三十四)c#Winform自定义控件-Tab页

    new LinearGradientBrush( 6 this.Bounds, 7 SystemColors.ControlLightLight , 8 SystemColors.ControlLight, 9 LinearGradientMode.Vertical , SystemColors.ControlLight, System.Drawing.Drawing2D.LinearGradientMode.Vertical); 52 , 97 SystemColors.ControlLight, 98 LinearGradientMode.Vertical , SystemColors.ControlLight, System.Drawing.Drawing2D.LinearGradientMode.Vertical); 142

    2K20发布于 2019-09-11
  • 来自专栏dino.c的专栏

    [WPF自定义控件库]以Button为例谈谈如何模仿Aero2主题

    <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static <em>SystemColors</em>.ControlTextBrushKey StaticResource Button.Static.Border}"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static <em>SystemColors</em>.ControlTextBrushKey <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static <em>SystemColors</em>.HighlightBrushKey 3.2 颜色 从Button的控件模板可以看到Button的字体颜色使用了{DynamicResource {x:Static <em>SystemColors</em>.ControlTextBrushKey}}。 <em>SystemColors</em>,包含与系统显示元素相对应的系统颜色、系统画笔和系统资源键。 SystemParameters,包含可用来查询系统设置的属性。 使用方式可以参考资源帮助主题。

    1.7K40发布于 2019-05-29
  • 来自专栏技术之路

    WPF-实现TextBox和PasswordBox显示背景文字

    <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static <em>SystemColors</em>.ControlBrushKey }}"/> <Setter Property="Foreground" Value="{DynamicResource {x:Static <em>SystemColors</em>.GrayTextBrushKey

    57410编辑于 2024-04-23
  • 来自专栏Java架构师必看

    捕捉DataGrid的双击事件

    BeginInit(); this.SuspendLayout(); // // dataGrid1 // this.dataGrid1.CaptionBackColor = System.Drawing.SystemColors.Info ; this.dataGrid1.CaptionForeColor = System.Drawing.SystemColors.WindowText; this.dataGrid1.CaptionVisible = false; this.dataGrid1.DataMember = ""; this.dataGrid1.HeaderForeColor = System.Drawing.SystemColors.ControlText

    2.2K40发布于 2021-03-22
  • 来自专栏全栈程序员必看

    c#之splitcontainer类(接口)

    splitContainer1.Dock = System.Windows.Forms.DockStyle.Fill; splitContainer1.ForeColor = System.Drawing.SystemColors.Control splitContainer1.Panel1.BackColor = System.Drawing.SystemColors.Control; // Add a TreeView control treeView1.Dock = System.Windows.Forms.DockStyle.Fill; treeView1.ForeColor = System.Drawing.SystemColors.InfoText

    90330编辑于 2022-09-09
  • 来自专栏跟着阿笨一起玩NET

    WinForm开发中针对TreeView控件改变当前选择节点的字体与颜色

    = null)             {                 theLastNode.ForeColor = SystemColors.WindowText;                 

    2.7K10发布于 2018-09-19
  • 来自专栏Niuery的技术日记

    WPF --- 重写圆角DataGrid样式

    x:Name="Border" Fill="{DynamicResource {x:Static SystemColors.ControlBrushKey <Setter TargetName="Border" Property="Stroke" Value="{DynamicResource {x:Static <em>SystemColors</em>.ControlDarkBrushKey <Setter TargetName="Border" Property="Fill" Value="{DynamicResource {x:Static <em>SystemColors</em>.ControlDarkBrushKey SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static <em>SystemColors</em>.ControlTextBrushKey ScrollBar.Static.Border}" /> <Setter Property="Foreground" Value="{DynamicResource {x:Static <em>SystemColors</em>.ControlTextBrushKey

    1.4K20编辑于 2023-10-22
  • 来自专栏独立观察员博客

    .NET 9 中为 WPF 新增的功能

    这些可通过 System.Windows.SystemColors 访问: Color Color Resource Key Brush Brush Resource Key Accent AccentColor 以下是将前景色设置为用户选择的强调色的 UI:TextBlock <TextBlock Text="First Name:" Foreground="{DynamicResource {x:Static <em>SystemColors</em>.AccentColorBrushKey

    1.3K10编辑于 2024-11-23
  • 来自专栏DotNet NB && CloudNative

    WPF for .NET 9 中的新增功能

    这些可通过 System.Windows.SystemColors 访问: Color Color Resource Key Brush Brush Resource Key Accent AccentColor 以下是将前景色设置为用户选择的强调色的 UI:TextBlock <TextBlock Text="First Name:" Foreground="{DynamicResource {x:Static <em>SystemColors</em>.AccentColorBrushKey

    1K10编辑于 2024-11-23
  • 来自专栏数据结构和算法

    C# 截取图片斜距形

    { // 清除图片原本背景,并以系统背景色填充 seatG.Clear(SystemColors.AppWorkspace

    56810编辑于 2023-11-30
  • 来自专栏Kiba518

    WPF滑块控件(Slider)的自定义样式

    <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static <em>SystemColors</em>.HighlightBrushKey Canvas Margin="-6,-1"> <Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static <em>SystemColors</em>.HighlightBrushKey

    4.5K30发布于 2019-08-02
  • 来自专栏葡萄城控件技术团队

    WPF的消息机制(三)- WPF内部的5个窗口之处理激活和关闭的消息窗口以及系统资源通知窗口

    用途:处理当操作系统的Theme发生改变后,以及诸如SystemColors,SystemFonts,电源,显示器等跟系统关联的资源发生改变时,更新WPF这边的表现。

    2.3K90发布于 2018-01-10
  • 来自专栏dino.c的专栏

    [WPF自定义控件库] 给WPF一个HyperlinkButton

    Hyperlink}"> <Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static <em>SystemColors</em>.HotTrackBrushKey <Setter Property="TextElement.Foreground" Value="{DynamicResource {x:Static <em>SystemColors</em>.GrayTextBrushKey

    1.7K20发布于 2019-08-23
  • 来自专栏liulun

    WinForm企业应用框架设计【四】动态创建业务窗体

    public void SelectMe() { IsSelected = true; this.BackColor = SystemColors.Info mf.MainContainerP.Controls.Clear(); mf.MainContainerP.Controls.Add(this); SubMenu.BackColor = SystemColors.Info

    1.1K30编辑于 2022-05-09
  • 来自专栏全栈程序员必看

    C#*.bmp,*.jpg,*.png指定颜色,转换为透明背景的png[通俗易懂]

    label3 // this.label3.AutoSize = true; this.label3.BackColor = System.Drawing.SystemColors.ActiveCaption , System.Drawing.GraphicsUnit.Point, ((byte)(128))); this.label4.ForeColor = System.Drawing.SystemColors.HotTrack = System.Drawing.SystemColors.ActiveCaption) { bmp.MakeTransparent(Color.FromArgb EventArgs e) { this.pictureBox1.Image = null; this.label3.BackColor = System.Drawing.SystemColors.ActiveCaption

    4.8K20编辑于 2022-09-13
  • 来自专栏liulun

    WinForm企业应用框架设计【三】框架窗体设计;动态创建菜单;

    var lb = sender as Label; lb.BackColor = Color.Transparent; lb.ForeColor = SystemColors.ControlText object sender, EventArgs e) { var lb = sender as Label; lb.BackColor = SystemColors.Info

    1.2K30编辑于 2022-05-09
领券