去年,我们建立了自己的C#编码规范,我说服同事遵循我写的编码规范。或许我是一个偏执狂吧,如果我看到有人不遵守我写的编码规范,而是去修改它,我可能通宵都睡不着。
<ListView.GroupStyle> <GroupStyle> <GroupStyle.HeaderTemplate> <DataTemplate> <Grid Margin="7,7,0,0"> <Button AutomationProperties.Name="Group Title" Click="Header_Click" Style="{StaticResource TextPrimaryButtonStyle}"> <StackPanel Orientation="Horizontal"> <TextBlock Text="{Binding Title}" Margin="3,-7,10,10" Style="{StaticResource GroupHeaderTextStyle}" /> <TextBlock Text="{StaticResource ChevronGlyph}" FontFamily="Segoe UI Symbol" Margin="0,-7,0,10" Style="{StaticResource GroupHeaderTextStyle}"/> </StackPanel> </Button> </Grid> </DataTemplate> </GroupStyle.HeaderTemplate> </GroupStyle> </ListView.GroupStyle>
<Grid Height="250" VerticalAlignment="Top"> <Image Source="{Binding FeatureArticle1.Thumbnail}" Style="{StaticResource ImageThumbnailStyle}" /> <StackPanel Style="{StaticResource StackPanelSummaryStyle}"> <TextBlock FontSize="22" Style="{StaticResource TextBlockAuthorStyle}" Text="{Binding FeatureArticle1.Author}" /> <TextBlock FontSize="26" Height="70" Style="{StaticResource TextBlockSummaryStyle}" Text="{Binding FeatureArticle1.Title}" /> </StackPanel> </Grid>
<Grid.ColumnDefinitions> <ColumnDefinition Width="200" /> <ColumnDefinition Width="200" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="200" /> <RowDefinition Height="140" /> </Grid.RowDefinitions>
<TextBlock FontWeight="Bold" Foreground="White" HorizontalAlignment="Right" Margin="0,0,12,0" Text="{Binding ArticlesCountText}" TextWrapping="Wrap" />
<Image Source="/Assets/Shares/NeutralImage.png" Height="125" HorizontalAlignment="Center" Width="125" Stretch="UniformToFill" VerticalAlignment="Center" />
<Button Grid.Column="1" Grid.Row="2" Command="{Binding ShowWriterCommand}" CommandParameter="{Binding WriterAshley}" Style="{StaticResource HubTileButtonStyle}" />
<Style x:Key="GridFeatureStyle" TargetType="Grid"> <Setter Property="Height" Value="194" /> <Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="Width" Value="194" /> </Style>