|
1 |
| -<UserControl x:Class="WPFDevelopers.Samples.ExampleViews.SongWordsExample" |
2 |
| - xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
3 |
| - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
4 |
| - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 |
| - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 |
| - xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews" |
7 |
| - xmlns:wpfdev="https://github.com/WPFDevelopersOrg/WPFDevelopers" |
8 |
| - xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls" |
9 |
| - mc:Ignorable="d" |
10 |
| - d:DesignHeight="450" d:DesignWidth="800" |
11 |
| - TextOptions.TextFormattingMode="Display" UseLayoutRounding="True" |
12 |
| - SnapsToDevicePixels="True" |
13 |
| - Foreground="White"> |
| 1 | +<UserControl |
| 2 | + x:Class="WPFDevelopers.Samples.ExampleViews.SongWordsExample" |
| 3 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls" |
| 6 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 7 | + xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews" |
| 8 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 9 | + d:DesignHeight="450" |
| 10 | + d:DesignWidth="800" |
| 11 | + Foreground="White" |
| 12 | + SnapsToDevicePixels="True" |
| 13 | + TextOptions.TextFormattingMode="Display" |
| 14 | + UseLayoutRounding="True" |
| 15 | + mc:Ignorable="d"> |
14 | 16 | <UserControl.Resources>
|
15 | 17 | <LinearGradientBrush x:Key="DefaultBackgroundBrush" StartPoint="0,0" EndPoint="0,1">
|
16 |
| - <GradientStop Color="#FF33B9AD" Offset="0" /> |
17 |
| - <GradientStop Color="#FF007ACC" Offset="1" /> |
| 18 | + <GradientStop Offset="0" Color="#FF33B9AD" /> |
| 19 | + <GradientStop Offset="1" Color="#FF007ACC" /> |
18 | 20 | </LinearGradientBrush>
|
19 | 21 | </UserControl.Resources>
|
20 | 22 | <controls:CodeViewer>
|
21 |
| - <Grid Background="{StaticResource DefaultBackgroundBrush}" Height="650" Width="400"> |
22 |
| - <StackPanel HorizontalAlignment="Center" Grid.Row="1"> |
23 |
| - <TextBlock Text="中华人民共和国国歌" HorizontalAlignment="Center" FontSize="20" Margin="0,10"/> |
24 |
| - <ItemsControl ItemsSource="{Binding MusicWordArray,RelativeSource={RelativeSource AncestorType=local:SongWordsExample}}"> |
25 |
| - <ItemsControl.ItemTemplate> |
26 |
| - <DataTemplate> |
27 |
| - <wpfdev:SongWords Text="{Binding SongWords}" |
28 |
| - StartDuration="{Binding StarTime}" |
29 |
| - Duration="{Binding RunTime}" |
30 |
| - Block.TextAlignment="Center" |
31 |
| - FontSize="15" Margin="0,4"/> |
32 |
| - </DataTemplate> |
33 |
| - </ItemsControl.ItemTemplate> |
34 |
| - </ItemsControl> |
35 |
| - </StackPanel> |
36 |
| - </Grid> |
| 23 | + <Grid |
| 24 | + Width="400" |
| 25 | + Height="650" |
| 26 | + Background="{StaticResource DefaultBackgroundBrush}"> |
| 27 | + <StackPanel Grid.Row="1" HorizontalAlignment="Center"> |
| 28 | + <TextBlock |
| 29 | + Margin="0,10" |
| 30 | + HorizontalAlignment="Center" |
| 31 | + FontSize="20" |
| 32 | + Text="中华人民共和国国歌" /> |
| 33 | + <ItemsControl ItemsSource="{Binding MusicWordArray, RelativeSource={RelativeSource AncestorType=local:SongWordsExample}}"> |
| 34 | + <ItemsControl.ItemTemplate> |
| 35 | + <DataTemplate> |
| 36 | + <controls:SongWords |
| 37 | + Margin="0,4" |
| 38 | + Block.TextAlignment="Center" |
| 39 | + FontSize="15" |
| 40 | + StartDuration="{Binding StarTime}" |
| 41 | + Text="{Binding SongWords}" |
| 42 | + Duration="{Binding RunTime}" /> |
| 43 | + </DataTemplate> |
| 44 | + </ItemsControl.ItemTemplate> |
| 45 | + </ItemsControl> |
| 46 | + </StackPanel> |
| 47 | + </Grid> |
37 | 48 | <controls:CodeViewer.SourceCodes>
|
38 |
| - <controls:SourceCodeModel |
39 |
| - CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/SongWordsExample.xaml" |
40 |
| - CodeType="Xaml"/> |
41 |
| - <controls:SourceCodeModel |
42 |
| - CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/SongWordsExample.xaml.cs" |
43 |
| - CodeType="CSharp"/> |
| 49 | + <controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/SongWordsExample.xaml" CodeType="Xaml" /> |
| 50 | + <controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/SongWordsExample.xaml.cs" CodeType="CSharp" /> |
| 51 | + <controls:SourceCodeModel |
| 52 | + CodeSource="/WPFDevelopers.SamplesCode;component/Controls/SongWords/SongWords.cs" |
| 53 | + CodeType="CSharp" |
| 54 | + Haader="SongWords" /> |
44 | 55 | </controls:CodeViewer.SourceCodes>
|
45 | 56 | </controls:CodeViewer>
|
46 | 57 | </UserControl>
|
0 commit comments