随笔分类 -  .Net-WPF

WPF的知识
摘要:一、为什么称MVVM被滥用 1、什么是MVVM? MVVM是Model-View-ViewModel的简写。它本质上就是MVC的改进版。MVVM模式有助于将应用程序的业务和表示逻辑与用户界面 (UI) 清晰分离。 保持应用程序逻辑和UI之间的清晰分离有助于解决许多开发问题,并使应用程序更易于测试、维 阅读全文
posted @ 2024-07-22 16:23 ꧁执笔小白꧂ 阅读(980) 评论(0) 推荐(2) 编辑
摘要:1、HelixToolkit 2、Microsoft.Direct3D.D3D12 3、SharpDX.Direct3D12 与 SharpDX 阅读全文
posted @ 2023-05-23 17:36 ꧁执笔小白꧂ 阅读(104) 评论(0) 推荐(0) 编辑
摘要:dockPanel1.LastChildFill=true; 阅读全文
posted @ 2023-03-10 12:43 ꧁执笔小白꧂ 阅读(108) 评论(0) 推荐(0) 编辑
摘要:txt1.ClipToBounds=true; 阅读全文
posted @ 2023-03-10 11:10 ꧁执笔小白꧂ 阅读(91) 评论(0) 推荐(0) 编辑
摘要:代码如下: <Window x:Class="WpfApp1.Test1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/20 阅读全文
posted @ 2023-01-30 17:46 ꧁执笔小白꧂ 阅读(514) 评论(0) 推荐(0) 编辑
摘要:代码: <Path Margin="0" Width="14" Height="14" Stretch="Fill" Fill="#40568d" Data="M344 576v-192L56 624l288 240v-192h240a384 384 0 1 0 0-768H152v96h432a2 阅读全文
posted @ 2023-01-30 15:49 ꧁执笔小白꧂ 阅读(720) 评论(0) 推荐(0) 编辑
摘要:<ListView.Resources> <Style TargetType="{x:Type GridViewColumnHeader}"> <Setter Property="Visibility" Value="Collapsed"/> </Style> </ListView.Resource 阅读全文
posted @ 2023-01-13 09:46 ꧁执笔小白꧂ 阅读(231) 评论(0) 推荐(1) 编辑
摘要:private void trvw_MouseDown(object sender, MouseButtonEventArgs e) { if (e.Source is TreeViewItem treeViewItem) { if (e.RightButton == MouseButtonStat 阅读全文
posted @ 2023-01-10 15:31 ꧁执笔小白꧂ 阅读(338) 评论(0) 推荐(0) 编辑
摘要:一、原代码: XAML: <TreeView x:Name="trvwProjectList" Margin="0,0,0,0" VerticalAlignment="Stretch" VerticalContentAlignment="Stretch" BorderBrush="DarkGray" 阅读全文
posted @ 2023-01-10 11:34 ꧁执笔小白꧂ 阅读(264) 评论(0) 推荐(0) 编辑
摘要:示例: <Button Margin="10,10,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Content="按钮_具有右键菜单"> <Button.ContextMenu> <ContextMenu StaysOpen="tr 阅读全文
posted @ 2023-01-10 09:09 ꧁执笔小白꧂ 阅读(610) 评论(0) 推荐(0) 编辑
摘要:App.xaml: <Application x:Class="ZhiBiXiaoBai.App" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft. 阅读全文
posted @ 2023-01-06 16:00 ꧁执笔小白꧂ 阅读(215) 评论(0) 推荐(0) 编辑
摘要:一、原因: ‘_’在WPF中用于表示访问键。 二、对策: 建立新样式,并关闭lable对快捷键的自动处理:RecognizesAccessKey="True"=》"False",如下: <!-- 不对下划线进行处理 --> <Style x:Key="LabelStyle1" TargetType= 阅读全文
posted @ 2023-01-05 17:01 ꧁执笔小白꧂ 阅读(503) 评论(0) 推荐(0) 编辑
摘要:public partial class App : Application { /// <summary> /// 异常处理 /// </summary> protected override void OnStartup(StartupEventArgs e) { base.OnStartup( 阅读全文
posted @ 2022-10-27 15:01 ꧁执笔小白꧂ 阅读(162) 评论(0) 推荐(0) 编辑
摘要:Window window1 = new Window(); window1.Title = "新窗口"; window1.Background = Brushes.LightBlue; // SolidColorBrush brush1 = new SolidColorBrush(Colors.Y 阅读全文
posted @ 2022-10-25 21:48 ꧁执笔小白꧂ 阅读(256) 评论(0) 推荐(0) 编辑
摘要:Log4Net官方文档 1.创建MS SQL Server日志表 CREATE TABLE [dbo].[Log] ( [Id] [int] IDENTITY (1, 1) NOT NULL, [Date] [datetime] NOT NULL, [Thread] [varchar] (255) 阅读全文
posted @ 2022-10-19 13:39 ꧁执笔小白꧂ 阅读(292) 评论(0) 推荐(0) 编辑
摘要:一、阿里巴巴图标矢量库(https://www.iconfont.cn/) 1、创建字体工程 2、往工程里添加图标 3、生成并下载字体文件 点击上图的“下载到本地”按钮。 4、window下安装字体库并查看查看对应的unicode码 ① 双击“iconfont.ttf”文件安装字体: ② 打开“控制 阅读全文
posted @ 2022-10-14 14:28 ꧁执笔小白꧂ 阅读(1394) 评论(0) 推荐(0) 编辑
摘要:TextBox样式(放到<Window.Resources/>里): <SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3"/> <SolidColorBrush x:Key="TextBox.MouseOver.Border 阅读全文
posted @ 2022-05-23 14:30 ꧁执笔小白꧂ 阅读(598) 评论(0) 推荐(0) 编辑
摘要:一、样式一:方型 1、样式代码: <Style x:Key="CheckBoxStyle" TargetType="{x:Type CheckBox}"> <Setter Property="Background" Value="#FF26405B"/> <Setter Property="Temp 阅读全文
posted @ 2022-05-23 14:20 ꧁执笔小白꧂ 阅读(180) 评论(0) 推荐(0) 编辑
摘要:代码如下: <Style x:Key="ButtonStyle" TargetType="{x:Type Button}"> <Setter Property="Cursor" Value="Hand"/> <Setter Property="Template"> <Setter.Value> <C 阅读全文
posted @ 2022-05-23 14:11 ꧁执笔小白꧂ 阅读(343) 评论(0) 推荐(0) 编辑
摘要:取值(字符串): string str = new TextRange(richtextbox.Document.ContentStart, richtextbox.Document.ContentEnd).Text; 赋值: // 方式一 string srt="12356457"; Paragr 阅读全文
posted @ 2022-03-25 18:06 ꧁执笔小白꧂ 阅读(698) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示