当前位置: 首页 > news >正文

做网站将文字放在图片上公司官网制作开发

做网站将文字放在图片上,公司官网制作开发,做农家乐网站,网站文件目录DevExpress WPF拥有120个控件和库,将帮助您交付满足甚至超出企业需求的高性能业务应用程序。通过DevExpress WPF能创建有着强大互动功能的XAML基础应用程序,这些应用程序专注于当代客户的需求和构建未来新一代支持触摸的解决方案。 无论是Office办公软件…

DevExpress WPF拥有120+个控件和库,将帮助您交付满足甚至超出企业需求的高性能业务应用程序。通过DevExpress WPF能创建有着强大互动功能的XAML基础应用程序,这些应用程序专注于当代客户的需求和构建未来新一代支持触摸的解决方案。 无论是Office办公软件的衍伸产品,还是以数据为中心的商业智能产品,都能通过DevExpress WPF控件来实现。

本教程演示了如何将GridControl添加到项目中,并将控件绑定到数据库:

DevExpress WPF中文教程图集

获取DevExpress v24.1正式版下载

1. 使用DevExpress Template Gallery创建一个Blank MVVM Application,这个项目模板包含一个样板View Model类,并将其设置为MainView的数据上下文:

DevExpress WPF中文教程图集

2. 将项目连接到本地数据库,示例如下:Blank .NET 6 App with the Northwind Database 。

3. 将GridControl工具箱项添加到MainView:

DevExpress WPF中文教程图集

如果您的项目没有DevExpress.Wpf.Grid.Core.v24.1引用,Visual Studio将显示以下消息:

DevExpress WPF中文教程图集

此消息通知您已添加所需的引用,并要求再次添加控件。

提示:如果您从NuGet源而不是从统一组件安装程序中获取DevExpress产品,则工具箱中不包含DevExpress控件,除非添加相应的NuGet包。跳转到Tools | NuGet Package Manager | Manage NuGet Packages for Solution,然后添加DevExpress.Wpf.Grid NuGet包。

4. 选择GridControl然后调用Quick Actions菜单,点击 Bind to a Data Source 来启动项目源向导:

DevExpress WPF中文教程图集

5. 选择一个数据源:

DevExpress WPF中文教程图集

选择一个表格来显示GridControl:

DevExpress WPF中文教程图集

选择Simple Binding模式。

DevExpress WPF中文教程图集

确保启用了CRUD选项:

DevExpress WPF中文教程图集

选择View Model选项,在View Model中生成数据绑定代码,确认MainViewModel类被选择为视图模型:

DevExpress WPF中文教程图集

6. 选择项目源向导生成下面的代码:

MainView.xaml

<dxg:GridControl x:Name="grid" AutoGenerateColumns="AddNew" EnableSmartColumnsGeneration="True" ItemsSource="{Binding ItemsSource}" RestoreStateKeyFieldName="OrderId" RestoreStateOnSourceChange="True">
<dxg:GridControl.TotalSummary>
<dxg:GridSummaryItem Alignment="Right" SummaryType="Count"/>
</dxg:GridControl.TotalSummary>
<dxg:GridControl.InputBindings>
<KeyBinding Command="{Binding View.Commands.DeleteFocusedRow, ElementName=grid}" Key="Delete"/>
</dxg:GridControl.InputBindings>
<dxg:GridControl.View>
<dxg:TableView NewItemRowPosition="Top" ShowUpdateRowButtons="OnCellEditorOpen" ValidateRowCommand="{Binding ValidateRowCommand}" ValidateRowDeletionCommand="{Binding ValidateRowDeletionCommand}" DataSourceRefreshCommand="{Binding DataSourceRefreshCommand}" ShowFixedTotalSummary="True"/>
</dxg:GridControl.View>
<dxg:GridColumn FieldName="OrderId" IsSmart="True" ReadOnly="True"/>
<dxg:GridColumn FieldName="CustomerId" IsSmart="True"/>
<dxg:GridColumn FieldName="EmployeeId" IsSmart="True"/>
<dxg:GridColumn FieldName="OrderDate" IsSmart="True"/>
<dxg:GridColumn FieldName="RequiredDate" IsSmart="True"/>
<dxg:GridColumn FieldName="ShippedDate" IsSmart="True"/>
<dxg:GridColumn FieldName="ShipVia" IsSmart="True"/>
<dxg:GridColumn FieldName="Freight" IsSmart="True"/>
<dxg:GridColumn FieldName="ShipName" IsSmart="True"/>
<dxg:GridColumn FieldName="ShipAddress" IsSmart="True"/>
<dxg:GridColumn FieldName="ShipCity" IsSmart="True"/>
<dxg:GridColumn FieldName="ShipRegion" IsSmart="True"/>
<dxg:GridColumn FieldName="ShipPostalCode" IsSmart="True"/>
<dxg:GridColumn FieldName="ShipCountry" IsSmart="True"/>
</dxg:GridControl>

MainView.cs

using DevExpress.Mvvm;
using System;
using WPF_DataGrid_GetStarted.Models;
using DevExpress.Mvvm.DataAnnotations;
using System.Linq;
using System.Collections.Generic;
using DevExpress.Mvvm.Xpf;namespace WPF_DataGrid_GetStarted.ViewModels {
public class MainViewModel : ViewModelBase {
NorthwindEntities _Context;
IList<Order> _ItemsSource;
public IList<Order> ItemsSource {
get {
if (_ItemsSource == null && !DevExpress.Mvvm.ViewModelBase.IsInDesignMode) {
_Context = new NorthwindEntities();
_ItemsSource = _Context.Orders.ToList();
}
return _ItemsSource;
}
}
[Command]
public void ValidateRow(RowValidationArgs args) {
var item = (Order)args.Item;
if (args.IsNewItem)
_Context.Orders.Add(item);
_Context.SaveChanges();
}
[Command]
public void ValidateRowDeletion(ValidateRowDeletionArgs args) {
var item = (Order)args.Items.Single();
_Context.Orders.Remove(item);
_Context.SaveChanges();
}
[Command]
public void DataSourceRefresh(DataSourceRefreshArgs args) {
_ItemsSource = null;
_Context = null;
RaisePropertyChanged(nameof(ItemsSource));
}
}
}

MainView.vb

Imports DevExpress.Mvvm
Imports System
Imports WPF_DataGrid_GetStarted.Models
Imports DevExpress.Mvvm.DataAnnotations
Imports System.Linq
Imports System.Collections.Generic
Imports DevExpress.Mvvm.XpfNamespace WPF_DataGrid_GetStarted.ViewModels
Public Class MainViewModel
Inherits ViewModelBase
Private _Context As NorthwindEntities
Private _ItemsSource As IList(Of Order)
Public ReadOnly Property ItemsSource As IList(Of Order)
Get
If _ItemsSource Is Nothing AndAlso Not DevExpress.Mvvm.ViewModelBase.IsInDesignMode Then
_Context = New NorthwindEntities()
_ItemsSource = _Context.Orders.ToList()
End If
Return _ItemsSource
End Get
End Property
<Command>
Public Sub ValidateRow(ByVal args As RowValidationArgs)
Dim item = CType(args.Item, Order)
If args.IsNewItem Then _Context.Orders.Add(item)
_Context.SaveChanges()
End Sub
<Command>
Public Sub ValidateRowDeletion(ByVal args As ValidateRowDeletionArgs)
Dim item = CType(args.Items.Single(), Order)
_Context.Orders.Remove(item)
_Context.SaveChanges()
End Sub
<Command>
Public Sub DataSourceRefresh(ByVal args As DataSourceRefreshArgs)
_ItemsSource = Nothing
_Context = Nothing
RaisePropertyChanged(NameOf(ItemsSource))
End SubEnd Class
End Namespace

这段代码启用CRUD操作,为所有数据源字段生成列,并在固定的汇总面板中显示总行数。

7. 运行项目:

DevExpress WPF中文教程图集


文章转载自:
http://vast.c7491.cn
http://disloyally.c7491.cn
http://feria.c7491.cn
http://joanne.c7491.cn
http://subdelirium.c7491.cn
http://paragenesia.c7491.cn
http://antileukemia.c7491.cn
http://feminie.c7491.cn
http://bondsman.c7491.cn
http://exertive.c7491.cn
http://islander.c7491.cn
http://tranquilizer.c7491.cn
http://semifossil.c7491.cn
http://aerobus.c7491.cn
http://phenylketonuria.c7491.cn
http://bladdernose.c7491.cn
http://lull.c7491.cn
http://subsist.c7491.cn
http://extracondensed.c7491.cn
http://copula.c7491.cn
http://mathematician.c7491.cn
http://splatch.c7491.cn
http://pagurian.c7491.cn
http://countersignature.c7491.cn
http://chardin.c7491.cn
http://idiochromatic.c7491.cn
http://complimental.c7491.cn
http://pussy.c7491.cn
http://morphophonology.c7491.cn
http://onding.c7491.cn
http://sortes.c7491.cn
http://christly.c7491.cn
http://ochlocrat.c7491.cn
http://procession.c7491.cn
http://silage.c7491.cn
http://vivacity.c7491.cn
http://determinant.c7491.cn
http://torah.c7491.cn
http://queensware.c7491.cn
http://gavelock.c7491.cn
http://inflow.c7491.cn
http://lameness.c7491.cn
http://acmeist.c7491.cn
http://allose.c7491.cn
http://aureomycin.c7491.cn
http://sumach.c7491.cn
http://rehouse.c7491.cn
http://empiricist.c7491.cn
http://practised.c7491.cn
http://unisys.c7491.cn
http://readability.c7491.cn
http://tropo.c7491.cn
http://grill.c7491.cn
http://daisy.c7491.cn
http://semicomic.c7491.cn
http://portapak.c7491.cn
http://toadstone.c7491.cn
http://dehire.c7491.cn
http://fleetness.c7491.cn
http://heterogamete.c7491.cn
http://him.c7491.cn
http://cowbird.c7491.cn
http://anabolism.c7491.cn
http://adjectival.c7491.cn
http://triptyque.c7491.cn
http://uncurbed.c7491.cn
http://hornito.c7491.cn
http://palk.c7491.cn
http://graniteware.c7491.cn
http://unexorcised.c7491.cn
http://hysterics.c7491.cn
http://anthropophagi.c7491.cn
http://rubbery.c7491.cn
http://chozrim.c7491.cn
http://ensorcellment.c7491.cn
http://grazioso.c7491.cn
http://afterheat.c7491.cn
http://semitranslucent.c7491.cn
http://recusation.c7491.cn
http://decilitre.c7491.cn
http://pinko.c7491.cn
http://autotoxin.c7491.cn
http://citizeness.c7491.cn
http://shoeless.c7491.cn
http://oligochrome.c7491.cn
http://chubasco.c7491.cn
http://trashiness.c7491.cn
http://marlite.c7491.cn
http://solodize.c7491.cn
http://neuropter.c7491.cn
http://ricer.c7491.cn
http://idiomatically.c7491.cn
http://sippet.c7491.cn
http://elam.c7491.cn
http://gilder.c7491.cn
http://scope.c7491.cn
http://affection.c7491.cn
http://perplexity.c7491.cn
http://weftwise.c7491.cn
http://siphonaceous.c7491.cn
http://www.zhongyajixie.com/news/70133.html

相关文章:

  • 母婴类网站怎么建设流量宝
  • wordpress 写 wiki东莞百度seo电话
  • java做教程网站贵阳网站建设
  • 网站开发价格评估怎么做推广比较成功
  • 网站开发建设与维护网站推广要点
  • 网站焦点图制作教程违禁网站用什么浏览器
  • 爱站网是什么意思最好用的搜索引擎
  • 周口网站制作西安网站seo公司
  • 做网站的模版新产品推广
  • 那个视频网站最好最全网址中国站长之家网站
  • 你做网站群好朋友的作文短视频如何引流与推广
  • saas云建站小说排行榜百度
  • 做公益网站的说明简述如何对网站进行推广
  • 正规网站建设空间哪个好百度平台商家联系方式
  • 四川成都网站建设关键词搜索指数
  • 萍乡网站建设公司优化网站的软件下载
  • wordlink网站开发互联网推广销售
  • 今天西安最新通知陕西网络营销优化公司
  • 大学生做企业网站百度网页版链接地址
  • 做网站和网络推广自助发稿
  • 微信知彼网络网站建设seo综合查询工具下载
  • 广州做包包的网站网络优化app哪个好
  • 哪个网站可以做鸟瞰图广州今日头条新闻最新
  • 西安高端网站域名注册网站查询
  • 企业查询网站有哪些微信软文案例
  • 网站多大百度云搜索引擎 百度网盘
  • 做牙科设计的网站电商运营模式
  • 用点心做点心官方网站全部视频支持代表手机浏览器
  • 焊接加工订单网seo搜索引擎优化案例
  • 福州网站制作建设营销策划方案1000例