Project

General

Profile

代码规范

Added by yanhua over 2 years ago

1. 编写语言C#
2. UI编码风格WPF MVVM 模式
2.1 WPF基础介绍
https://www.cnblogs.com/chillsrc/p/4464023.html
2.2参考样例代码:JZUserControls\Defect\UCClassificationSetting.xaml.cs
关键字:数据绑定、依赖属性
3. UI注意事项-需支持中英文切换
1行放3个 button 的样例(1.用Grid控制控件的位置,2.用style控制控件的外观)
<Grid Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<Button Style="{StaticResource RecipeBtnStyle}" Content="{DynamicResource CreatePattern}" Grid.Column="0" Margin="5"/>
<Button Style="{StaticResource RecipeBtnStyle}" Content="{DynamicResource CreateMask}" Grid.Column="1" Margin="5"/>
<Button Style="{StaticResource RecipeBtnStyle}" Content="{DynamicResource TestRecognize}" Grid.Column="2" Margin="5"/>
</Grid>
备注:已经写了很多控件风格了 - Styles.xaml,重复的代码放置在这些控件风格里。


Comments