随笔分类 -  WPF

摘要:WPF 组织机构摄像机树 全量加载 大数据量 分页加载摄像机节点 完整代码: https://gitee.com/s0611163/WpfTreeDemo 性能: 8000组织机构20万摄像机,全量加载仅需0.8秒 8000组织机构125万摄像机,全量加载仅需4秒 主要代码: TreeNodeDat 阅读全文
posted @ 2022-01-06 11:12 0611163 阅读(336) 评论(0) 推荐(0) 编辑
摘要:一、窗体变透明,需要加三个属性: AllowsTransparency="True"Background="Transparent"WindowStyle="None" 二、利用win32接口实现窗体鼠标事件穿透 Win32 API: private const int WS_EX_TRANSPAR 阅读全文
posted @ 2021-11-19 15:17 0611163 阅读(978) 评论(0) 推荐(0) 编辑
摘要:使用AdornerDecorator装饰器实现WPF水印 水印装饰器WatermarkAdorner类代码: using System; using System.Collections.Generic; using System.Globalization; using System.Linq; 阅读全文
posted @ 2021-09-09 09:08 0611163 阅读(614) 评论(1) 推荐(2) 编辑
摘要:WPF通过WindowChrome实现Window无边框窗体阴影效果 代码: <Window x:Class="SunCreate.PACP.Client.UI.GIS.CameraDetailsWin" xmlns="http://schemas.microsoft.com/winfx/2006/ 阅读全文
posted @ 2020-09-18 15:58 0611163 阅读(2371) 评论(2) 推荐(0) 编辑
摘要:TreeViewItem、TextBox、Button、RichTextBox、ComboBox、GroupBox、带Path的Button、ContextMenu样式: <!-- Separator模板 --> <ControlTemplate x:Key="tmplSeparator" Targ 阅读全文
posted @ 2020-01-16 19:24 0611163 阅读(270) 评论(0) 推荐(0) 编辑
摘要:代码: <RichTextBox CaretBrush="#fff" Background="Transparent" BorderThickness="0"> <FlowDocument FontSize="16" Foreground="#fff"> <Paragraph LineHeight= 阅读全文
posted @ 2019-08-14 18:50 0611163 阅读(1787) 评论(0) 推荐(1) 编辑
摘要:代码: public static void DoEvents(Dispatcher dispatcher) { DispatcherFrame frame = new DispatcherFrame(); dispatcher.BeginInvoke(new Action<object>((obj 阅读全文
posted @ 2019-05-27 15:53 0611163 阅读(443) 评论(0) 推荐(0) 编辑
摘要:效果图: ActiveFunItem.xaml代码: <UserControl x:Class="SunCreate.Vipf.Client.UI.ActiveFunItem" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentat 阅读全文
posted @ 2019-04-12 10:21 0611163 阅读(1236) 评论(0) 推荐(1) 编辑
摘要:和WPF数字滚动抽奖有区别,WPF数字滚动抽奖是随机的,而这里是确定的。 为了系统演示,这个效果通宵加班写了整整6个小时,中间就上了次厕所。 代码: RollingNumberItemCtrl.xaml代码: <UserControl x:Class="SunCreate.Common.Contro 阅读全文
posted @ 2019-04-02 05:07 0611163 阅读(1632) 评论(20) 推荐(7) 编辑
摘要:XAML代码(使用ItemsControl控件实现): <UserControl x:Class="SunCreate.Vipf.Client.UI.CityDoor.PageControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/p 阅读全文
posted @ 2019-03-29 17:39 0611163 阅读(1313) 评论(8) 推荐(2) 编辑
摘要:常用控件样式: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> 阅读全文
posted @ 2019-03-23 14:20 0611163 阅读(872) 评论(0) 推荐(0) 编辑
摘要:打印预览XAML代码: <controls:WindowEx x:Class="SunCreate.Vipf.Client.UI.MapPrintPreview" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xm 阅读全文
posted @ 2018-12-20 10:15 0611163 阅读(3654) 评论(0) 推荐(0) 编辑
摘要:需求场景:在查询页面,填写查询条件,查询条件包括上传的图片,根据图片的特征查询,这就需要在提交的时候,使用POST提交,因为GET提交无法提交图片数据,提交查询条件之后,在新的窗口展示查询结果。(当然查询结果页面可能不支持F5刷新页面) 表单HTML代码示意(注意method="post" targ 阅读全文
posted @ 2018-12-13 18:13 0611163 阅读(1882) 评论(0) 推荐(1) 编辑
摘要:WPF实现窗体中的悬浮按钮,按钮可拖动,吸附停靠在窗体边缘。 控件XAML代码: <Button x:Class="SunCreate.Common.Controls.FloatButton" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/p 阅读全文
posted @ 2018-11-22 16:43 0611163 阅读(6012) 评论(1) 推荐(2) 编辑
摘要:WPF自定义TabControl,TabControl美化 XAML代码: <TabControl x:Class="SunCreate.Common.Controls.TabControlEx" xmlns="http://schemas.microsoft.com/winfx/2006/xaml 阅读全文
posted @ 2018-11-21 13:50 0611163 阅读(4194) 评论(8) 推荐(4) 编辑
摘要:资源文件代码: <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> 阅读全文
posted @ 2018-11-21 13:41 0611163 阅读(5830) 评论(5) 推荐(2) 编辑
摘要:XAML代码: <Popup x:Name="popupStrategy" StaysOpen="False" PopupAnimation="Scroll" Width="190" MaxHeight="300" AllowsTransparency="True"> <Border Backgro 阅读全文
posted @ 2018-04-09 12:23 0611163 阅读(3600) 评论(6) 推荐(0) 编辑
摘要:使用HierarchicalDataTemplate递归绑定现实 XAML代码: <UserControl x:Class="SunCreate.CombatPlatform.Client.MultiSelOrgTree" xmlns="http://schemas.microsoft.com/wi 阅读全文
posted @ 2018-04-09 12:19 0611163 阅读(1580) 评论(0) 推荐(0) 编辑
摘要:代码: <Window x:Class="WpfApplication1.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.c 阅读全文
posted @ 2018-03-13 10:02 0611163 阅读(2624) 评论(7) 推荐(0) 编辑
摘要:代码: <ItemsControl ItemsSource="{Binding Info}" FontFamily="微软雅黑" FontSize="12" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Cent 阅读全文
posted @ 2017-12-26 22:56 0611163 阅读(2943) 评论(0) 推荐(0) 编辑