珂珂的个人博客 - 一个程序猿的个人网站

最新发布

[未分类]

WPF分页控件

admin 阅读(3077) 评论(0)

这是依照网上找的资料自行修改,原来的实现很复杂,代码也很多还需要为控件赋数据源,我现在只需要为它赋值一个总条数就行了。先有一个按钮控件,就是分页上面按钮的图标<UserControlx:Class="FYJ.Winui.Pager.ImageButton" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc=" [...]   阅读全文

[未分类]

WPF的MVVM实例(五)-编辑页

admin 阅读(3397) 评论(1)

XAML代码<Windowx:Class="MyList.UI.RegisterEditWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:MyList.UI" xmlns:entity="clr-namespace:MyList.En [...]   阅读全文

[未分类]

WPF的MVVM实例(四)-列表页

admin 阅读(3232) 评论(0)

XAML代码<Pagex:Class="MyList.UI.RegisterListPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d=" [...]   阅读全文

[未分类]

WPF的MVVM实例(三)-ViewModel实现类

admin 阅读(3399) 评论(0)

usingMicrosoft.Win32; usingMyList.Common; usingMyList.Entity; usingMyList.Model; usingSystem; usingSystem.Collections.Generic; usingSystem.Collections.ObjectModel; usingSystem.Data; usingSystem.Linq; usingSystem.Threading.Tasks; usingSystem.Windows; usingSystem.Windows.Threading; names [...]   阅读全文

[未分类]

WPF的MVVM实例(二)-ViewModel基类

admin 阅读(2963) 评论(0)

usingMyList.Common; usingMyList.ViewModel.Util; usingSystem; usingSystem.Collections.ObjectModel; usingSystem.ComponentModel; usingSystem.Windows; usingSystem.Windows.Controls; usingSystem.Windows.Input; usingSystem.Windows.Threading; namespaceMyList.ViewModel { publicabstractclassBaseV [...]   阅读全文

[未分类]

WPF的MVVM实例(一)

admin 阅读(4335) 评论(0)

之前用Winform做了一个工具,主要目的是实现增删改查,现在用WPF来重构下,其实就是记录平时在网站上注册的用户名、密码、邮箱和电话绑定,以便忘记的时候查找,密码太多了...本来之前是做的开支记录和收藏夹,不过后来有了成熟的工具就没做了。至于要重构成WPF主要是想WPF的一个实例。我所理解的MVVM 基本就是靠Command属性来实现界面和后台代码的分离,不知道对不对.下面是登录界面,当然是用了FYJ.Winui下面是主界面当然是实现了数据变 界面也会自动变得。我这里做的是异步加载,网上找的很多都不是,中间也遇到了不少问题。编辑界面,做了验证 [...]   阅读全文

[未分类]

WPF九宫格切图

admin 阅读(4196) 评论(0)

在做界面的时候,有时是很小的一张图片,我们不能直接将其放大,而是需要九宫格处理,所以android就原生支持.这是网上找的一段代码,自己经过一些修改。一个帮助类usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Windows; usingSystem.Windows.Controls; usingSystem.Windows.Data; usingSystem.Windows.Documents; usingSystem.Windows.I [...]   阅读全文

[未分类]

FYJ.Winui系列(五)-主窗体

admin 阅读(3406) 评论(0)

基窗体写好,后面已经很简单了XAML代码<local:BaseWindowx:Class="FYJ.Winui.MainWindow" x:Name="mainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:FYJ.Winui&qu [...]   阅读全文

[未分类]

FYJ.Winui系列(四)-基窗体

admin 阅读(3117) 评论(0)

这当然也是费时间很多的一个点,我还在想着winform的继承思想,由于要继承不能有XAML代码,不过我们可以用变种方法来实现。WPF做界面确实比Winform好太多了.我们可以把窗体写成一个Style<ResourceDictionaryxmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:FY [...]   阅读全文

[未分类]

FYJ.Winui系列(三)-换肤控件

admin 阅读(3853) 评论(0)

这个事比较复杂,不过相对与FYJ.Winfrom中实现的可是简单许多了,这之前有点小问题,就是启动后要点两次才会换色,后来就一次,始终没打找到原因privatevoidCanvImage_sMouseDown(objectsender,MouseButtonEventArgse) { Pointp=e.GetPosition((IInputElement)sender); this.ellipsePixel_s.SetValue(Canvas.LeftProperty,p.X-4); this.ellipsePixel_s.SetValue(Canvas.TopProperty,p. [...]   阅读全文