1604
This commit is contained in:
parent
47e10d2323
commit
d7cdcbe411
@ -4,6 +4,7 @@
|
|||||||
xmlns:local="clr-namespace:Wpf_AiSportsMicrospace.MyUserControl"
|
xmlns:local="clr-namespace:Wpf_AiSportsMicrospace.MyUserControl"
|
||||||
Title="Home" Height="400" Width="800">
|
Title="Home" Height="400" Width="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
<local:CoverFlowControl x:Name="coverFlow" HorizontalAlignment="Center" VerticalAlignment="Center"/>
|
|
||||||
|
<local:CoverFlowControl x:Name="coverFlow" HorizontalAlignment="Center" VerticalAlignment="Center" Height="500" Width="881" Loaded="coverFlow_Loaded"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
|
|||||||
@ -27,13 +27,13 @@ namespace Wpf_AiSportsMicrospace
|
|||||||
string albumPath = Path.Combine(projectRoot, "Resources", "Img", "Album");
|
string albumPath = Path.Combine(projectRoot, "Resources", "Img", "Album");
|
||||||
|
|
||||||
// 转换为 Uri
|
// 转换为 Uri
|
||||||
coverFlow.Images.Add(new Uri(Path.Combine(albumPath, "1.jpg")));
|
coverFlow.Images.Add(new Uri(Path.Combine(albumPath, "home_play.png")));
|
||||||
coverFlow.Images.Add(new Uri(Path.Combine(albumPath, "2.jpg")));
|
coverFlow.Images.Add(new Uri(Path.Combine(albumPath, "home_test.png")));
|
||||||
coverFlow.Images.Add(new Uri(Path.Combine(albumPath, "3.jpg")));
|
coverFlow.Images.Add(new Uri(Path.Combine(albumPath, "home_history.png")));
|
||||||
coverFlow.Images.Add(new Uri(Path.Combine(albumPath, "4.jpg")));
|
//coverFlow.Images.Add(new Uri(Path.Combine(albumPath, "4.jpg")));
|
||||||
coverFlow.Images.Add(new Uri(Path.Combine(albumPath, "5.jpg")));
|
//coverFlow.Images.Add(new Uri(Path.Combine(albumPath, "5.jpg")));
|
||||||
|
|
||||||
// 默认选中第3张
|
// 默认选中第2张
|
||||||
coverFlow.SelectedIndex = 2;
|
coverFlow.SelectedIndex = 2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -48,6 +48,8 @@ namespace Wpf_AiSportsMicrospace.MyUserControl
|
|||||||
|
|
||||||
public CoverFlowControl()
|
public CoverFlowControl()
|
||||||
{
|
{
|
||||||
|
Console.WriteLine($"SelectedIndex: {SelectedIndex}");
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
DataContext = this;
|
DataContext = this;
|
||||||
Loaded += (s, e) => UpdateLayoutWithAnimation(true);
|
Loaded += (s, e) => UpdateLayoutWithAnimation(true);
|
||||||
|
|||||||
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/home_bg.png
Normal file
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/home_bg.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 MiB |
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/home_history.png
Normal file
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/home_history.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 470 KiB |
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/home_play.png
Normal file
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/home_play.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 430 KiB |
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/home_test.png
Normal file
BIN
Wpf_AiSportsMicrospace/Resources/Img/Album/home_test.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 467 KiB |
Loading…
x
Reference in New Issue
Block a user