我想知道如何在XAML代码中获取列摘要。我可以使用附件或图片中提到的代码获取行摘要。 但我不知道如何添加“a1”,“b1”和“c1”中的内容以仅在XAML代码中获取“摘要”而不使用代码隐藏。我正在使用Infragistics xamDataGrid
答案 0 :(得分:0)
您需要library("shiny")
library("shinydashboard")
# header
header <- dashboardHeader(title = "Changing the font size of valueBoxes", titleWidth = 450)
# sidebar
sidebar <- dashboardSidebar(disable = TRUE)
# body
body <- dashboardBody(
valueBox(
value = "90k",
subtitle = "some long descritptive text",
icon = icon("car")
),
valueBox(
value = tags$p("90k", style = "font-size: 150%;"),
subtitle = tags$p("some long descritptive text", style = "font-size: 150%;"),
icon = icon("car fa-lg")
),
valueBox(
value = tags$p("90k", style = "font-size: 200%;"),
subtitle = tags$p("some long descritptive text", style = "font-size: 200%;"),
icon = icon("car fa-2x")
),
valueBoxOutput(outputId = "mybigbox")
)
# server
server <- function(input, output) {
output$mybigbox <- renderValueBox({
valueBox(
value = tags$p("90k", style = "font-size: 300%;"),
subtitle = tags$p("some long descritptive text", style = "font-size: 300%;"),
icon = icon("car fa-3x")
)
})
}
shinyApp(ui = dashboardPage(header, sidebar, body), server = server)
和MultiBinding
。下面的示例计算Num1和Num2属性的总和,并显示它们的总和。
MultiValueConverter
转换器:
<DataGridTextColumn Header="Sum">
<DataGridTextColumn.Binding>
<MultiBinding Converter="{StaticResource SumCnvKey}">
<Binding Path="Num1"/>
<Binding Path="Num2"/>
</MultiBinding>
</DataGridTextColumn.Binding>
</DataGridTextColumn>