随笔分类 -  WPF

摘要:项目中出现重启电脑后(软件自动启动)点击软件界面时偶尔出现锯齿噪点现象, 最后发现是图片硬解码绘制的BUG。使用软解就可以避开。 处理方法 :在窗口的Loaded事件加这句 var hwndSource = PresentationSource.FromVisual(this) as HwndSou 阅读全文
posted @ 2022-10-11 09:14 stweily 阅读(109) 评论(0) 推荐(0) 编辑
摘要:<Grid> <TabControl TabStripPlacement="Left"> <TabControl.Resources> <Style TargetType="{x:Type TabItem}"> <Setter Property="HeaderTemplate"> <Setter.V 阅读全文
posted @ 2022-09-14 09:21 stweily 阅读(123) 评论(0) 推荐(0) 编辑
摘要:有时候Command需要多个参数,记录一下操作方式 <Button Content="Zoom" Command="{Binding BtnCommand"> <Button.CommandParameter> <MultiBinding Converter="{StaticResource MyC 阅读全文
posted @ 2022-09-13 15:45 stweily 阅读(1513) 评论(0) 推荐(0) 编辑
摘要:在项目中有次听别人说因为GIF播放引起了重大BUG。今天看到了一个gif不知好用否,时间紧,待后面测试吧。 仓库地址:https://github.com/XamlAnimatedGif/WpfAnimatedGif Nuget 包:WpfAnimatedGif。 xaml使用 <Image gif 阅读全文
posted @ 2022-09-09 14:00 stweily 阅读(116) 评论(0) 推荐(0) 编辑
摘要:最近工作需要,边学边写WPF, 看到<Application.Resources>里的<ResourceDictionary.MergedDictionaries> ResourceDictionary source = uri 时看到URI好奇怪,查询了下 记录如下 引用自 http://www. 阅读全文
posted @ 2022-09-07 10:33 stweily 阅读(56) 评论(0) 推荐(0) 编辑