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