I'm currently working on this .Net/WPF project.
I'm trying to get the method to check to see if a skin file exists before applying. I have feeling that my address formatting my be wrong... Any ideas?
Dim lobjSPEConfigService As SPEConfigurationService = New SPEConfigurationService
Dim lobjSkinFilePath As String = CStr(lobjSPEConfigService.GetApplicationSetting("SkinFileLocation", GetType(String)))
If String.IsNullOrEmpty(lobjSkinFilePath) Then
lobjSkinFilePath = "/SPE.Infrastructure.UI/Application/Resources/Skins/LightSkin"
Else
Dim lblnFileExist = File.Exists(lobjSkinFilePath)
If lblnFileExist = False Then
lobjSkinFilePath = "/SPE.Infrastructure/SPE.Infrastructure.UI/Application/Resources/Skins/LightSkin"
End If
End If
The file is being referenced thourg the project...
If your file name and path correct (not sure I do not see your project) then the only thing I see missing is the file extension. I'm assuming it's .xaml
If you're loading anything as a resource you have to use WPF Pack URI's.
Some examples:
Absolute Path
Relative Path
Also get rid of your first else statement...you're not doing anything once you change the filename if its empty.