随笔分类 - .NET技术 / WPF
摘要:简单做个记录。有时候会忘记某个样式怎么调整; 首先写一个DataGrid,AlternatingRowBackground表示隔行更改背景色;AlternationCount表示隔的行数;: 1 <DataGrid Grid.Row="1" 2 AlternatingRowBackground="S
阅读全文
摘要:Menu菜单 1 <Menu Grid.Row="1" > 2 <MenuItem Header="通讯录1 >"> 3 <MenuItem.Items> 4 <MenuItem Header="张三"> 5 <MenuItem.Icon > 6 <Image Source="../Resource
阅读全文
摘要:思路: 1.创建一个画布,长宽100*100; <Canvas Width="100" Height="100"> 2.画布上创建一个圆,直径25,位于正上方中间,底色浅灰; <Style TargetType="Ellipse"> <Setter Property="Width" Value="2
阅读全文
摘要:首先登录阿里巴巴图标矢量图库 选择好需要的图标,然后下载素材,下载内容如下: 然后将iconfont.ttf加入到项目的Resources文件夹下; 在App.xaml的资源字典Resource中写入: 1 <Application.Resources> 2 <ResourceDictionary>
阅读全文
摘要:简单实现鼠标移过Popup自动显示和隐藏的功能; 在xaml.cs中实现,首先创建一个定时器,设置300ms的延时: 1 DispatcherTimer timer; 2 3 public Function1View() 4 { 5 InitializeComponent(); 6 7 timer
阅读全文
摘要:Prism主要用于页面的切换导航,UI界面通常分为几个区域:Header顶部区域;Menu菜单区域,Home主界面区域; 下面是使用步骤: 首先安装Prism框架或引用Dll: 对App.xaml和xaml.cs进行修改: 将Application改为prism:PrismApplication,取
阅读全文