Hi All,
There seems to be a problem with the New-UDImageCarousel for version 2.9.0. It doesn’t take the Styling @{} parameter anymore. Here is my sample code.
$Colors = @{
BackgroundColor = “#252525”
FontColor = “#FFFFFF”
}
$Theme = New-UDTheme -Name “Test” -Definition @{
“.ud-navbar” = @{
BackgroundColor = “#006A4D”
FontColor = “#FFFFF”
}
“.ud-footer” = @{
display = “none”
}
}
$apjpjpasswordgraph = New-UDEndpointSchedule -Every 3 -Second
$apjpjpasswordgraphpoints = New-UDEndpoint -Schedule $apjpjpasswordgraph -Endpoint {
$Cache:Folder = Publish-UDFolder -Path “.\Image” -RequestPath “/Image”
}
$EDT = New-UDDashboard -Title ‘TEST’ -BackgroundColor “#000000” -FontColor “#FFFFFF” -Theme $Theme -Content {
Slide1= @{
BackgroundSize = 'contain'
BackgroundRepeat = 'no-repeat'
BackgroundPosition = 'center'
BackgoundImage = 'Image/1.PNG'
}
New-UDImageCarousel -FullScreen -Interval 5000 -Indicators -items {
New-UDImageCarouselItem @Slide1
}
}
Get-UDDashboard | where{_.Port -eq 1002} | Stop-UDDashboard
Start-UDDashboard -Port 1002 -PublishedFolder $Cache:Folder -Dashboard $EDT -AutoReload -Force -Endpoint $apjpjpasswordgraphpoints
start http://localhost:1002/home
Error:
PS C:\Users\Christian.Jardiolin\Desktop\To do\Dashboard Remodel\MessageBoard> C:\Users\Christian.Jardiolin\Desktop\To do\Dashboard Remodel\MessageBoard\dashboard.ps1
New-UDDashboard : Exception calling “Invoke” with “0” argument(s): “A parameter cannot be found that matches parameter name ‘BackgroundPosition’.”
At C:\Users\Christian.Jardiolin\Desktop\To do\Dashboard Remodel\MessageBoard\dashboard.ps1:20 char:8
- $EDT = New-UDDashboard -Title ‘TEST’ -BackgroundColor “#000000” -Font …
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- CategoryInfo : SyntaxError: (UniversalDashboard.Models.Dashboard:Dashboard) [New-UDDashboard], CmdletInvocationException
- FullyQualifiedErrorId : UniversalDashboard.Cmdlets.NewDashboardCommand
Name Port Running DashboardService
Dashboard0 1002 True UniversalDashboard.Services.DashboardService