做课件最好的素材网站,湖南住房和城乡建设厅官网,html成品模板,网站设计 模板1、添加窗体 2、窗体布局控件 UI设计这块还是传统的表格布局#xff0c;采用5行2列 3、创建viewmodel 4、前台UI绑定viewmodel 这里要注意属性绑定和命令绑定及命令绑定时传递的参数 Window x:ClassWest.StoreMgr.Windows.EditPasswordWindowxmlnshttp…1、添加窗体 2、窗体布局控件 UI设计这块还是传统的表格布局采用5行2列 3、创建viewmodel 4、前台UI绑定viewmodel 这里要注意属性绑定和命令绑定及命令绑定时传递的参数 Window x:ClassWest.StoreMgr.Windows.EditPasswordWindowxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:localclr-namespace:West.StoreMgr.Windowsmc:IgnorabledWindowStartupLocationCenterScreenDataContext{Binding Source{StaticResource Locator},PathEditPassword}Title修改用户密码 Height450 Width700 ResizeModeNoResizeGrid Background#E4ECEFGrid Margin110 50 100 50 !--5行2列的表格--Grid.ColumnDefinitionsColumnDefinition Width0.5*/ColumnDefinition//Grid.ColumnDefinitionsGrid.RowDefinitionsRowDefinition/RowDefinition/RowDefinition/RowDefinition/RowDefinition//Grid.RowDefinitionsGrid Grid.Row0 Grid.Column0 Grid.ColumnSpan2Grid.ColumnDefinitionsColumnDefinition/ColumnDefinitionColumnDefinition/ColumnDefinitionColumnDefinition/ColumnDefinition/Grid.ColumnDefinitionsBorder Grid.Column0 Height2 Width122 HorizontalAlignmentCenter VerticalAlignmentCenter!--渐变色横条--Border.BackgroundLinearGradientBrush StartPoint0,0 EndPoint1,1GradientStop ColorRed Offset0/GradientStopGradientStop Color#6d6d6d Offset1/GradientStop/LinearGradientBrush/Border.Background/BorderTextBlock Margin20 0 0 0 Grid.Column1 HorizontalAlignmentLeft VerticalAlignmentCenter Text修改密码 FontSize30/Border Grid.Column2 Height2 Width122 HorizontalAlignmentCenter VerticalAlignmentCenter!--渐变色横条--Border.BackgroundLinearGradientBrush StartPoint0,0 EndPoint1,1GradientStop ColorRed Offset1/GradientStopGradientStop Color#6d6d6d Offset0/GradientStop/LinearGradientBrush/Border.Background/Border/Grid TextBlock Grid.Row1 Grid.Column0 HorizontalAlignmentCenter VerticalAlignmentCenter Text当前密码 FontSize20/TextBlock Grid.Row2 Grid.Column0 HorizontalAlignmentCenter VerticalAlignmentCenter Text新密码 FontSize20/TextBlock Grid.Row3 Grid.Column0 HorizontalAlignmentCenter VerticalAlignmentCenter Text确认密码 FontSize20/TextBox Grid.Row1 Grid.Column1 HorizontalAlignmentLeft VerticalAlignmentCenter Text{Binding PasswordModel.OldPassword,ModeTwoWay,UpdateSourceTriggerPropertyChanged} FontSize20 Width200 Height30/TextBox Grid.Row2 Grid.Column1 HorizontalAlignmentLeft VerticalAlignmentCenter Text{Binding PasswordModel.NewPassword,ModeTwoWay,UpdateSourceTriggerPropertyChanged} FontSize20 Width200 Height30/TextBox Grid.Row3 Grid.Column1 HorizontalAlignmentLeft VerticalAlignmentCenter Text{Binding PasswordModel.Password2,ModeTwoWay,UpdateSourceTriggerPropertyChanged} FontSize20 Width200 Height30/!--button--Button Margin0 0 0 0 Height40 Width200 Grid.Row4 Grid.Column1 HorizontalAlignmentLeft FontSize28Content修 改 Style{StaticResource ButtonStyle} CommandParameter{Binding RelativeSource{RelativeSource ModeFindAncestor,AncestorTypelocal:EditPasswordWindow}}Command{Binding EditPasswordCommand}//Grid/Grid
/Window5、运行效果 数据库存储 成功 原创不易打字不易截图不易多多点赞送人玫瑰留有余香财务自由明日实现。