0
Im试图修改我的乐团应用程序的默认启动画面。发现SplashScreen.png默认包含在resources/images文件夹中,并用我自己的(相同的宽度和高度)覆盖它。启动画面没有改变。更改Catel + Orchestra应用程序的启动画面
我去看了Orchestra的代码,发现了SplashScreen视图。并看到你有一个companylogo的占位符。
<Image Grid.Row="3" Grid.Column="0" Source="{Binding CompanyLogoForSplashScreenUri}" HorizontalAlignment="Left"
Margin="10" VerticalAlignment="Bottom" Stretch="Uniform" Opacity="0.7"
Visibility="{Binding CompanyLogoForSplashScreenUri, Converter={catel:ReferenceToCollapsingVisibilityConverter}}"/>
在视图模型我发现了构造函数调用的IAboutInforService
public SplashScreenViewModel(IAboutInfoService aboutInfoService)
{
Argument.IsNotNull(() => aboutInfoService);
var aboutInfo = aboutInfoService.GetAboutInfo();
CompanyLogoForSplashScreenUri = aboutInfo.CompanyLogoForSplashScreenUri;
}
但在AboutInfo对象的CompanyLogoForSplashScreenUri酒店需要从GetAboutInfo返回总是空。构造函数永远不会将uri引用添加到它。
public AboutInfo GetAboutInfo()
{
var aboutInfo = new AboutInfo(new Uri("pack://application:,,,/Resources/Images/CompanyLogo.png", UriKind.RelativeOrAbsolute));
return aboutInfo;
}
public AboutInfo(Uri companyLogoUri = null, string logoImageSource = null, string url = null, Assembly assembly = null, Uri companyLogoForSplashScreenUri = null)
那么我能做些什么来添加companylogo到splashscreen?