Prism应用程序的多个项目

时间:2017-05-02 11:53:25

标签: xamarin.forms prism

我想创建一个新的Prism / Xamarin.Forms应用程序,但我想创建多个便携式项目。

我想要实现的目标如下:

  • MyProject.Models :包含业务对象(模型)的可移植项目。
  • MyProject.ViewModels :包含viewmodels的可移植项目(引用 MyProject.Models )。
  • MyProject.Views :包含视图的可移植项目(引用 MyProject.ViewModels )。
  • MyProject.Droid MyProject.UWP :可执行项目。

这个组织在Prism解决方案中是否可行?模板是否可以在此设置中使用?

事实上,我尝试将MvvmLight项目转换为Prism,这就是我目前的解决方案。

非常感谢你的回答,
于连

1 个答案:

答案 0 :(得分:1)

是的,它会正常工作。您的项目结构如何并不重要。注册页面进行导航时,请确保使用明确的require(shiny) require(ggplot2) # data df <- data.frame(ID=c(1,2),x=c(33,7),y=c(50,16),name=c("Vid1","Vid2"),link=c("https://www.youtube.com/embed/Gyrfsrd4zK0","https://anotherlink.com"), stringsAsFactors=FALSE) # video is explicitly embedded with the youtube link (i.e. not dynamic) ui <- basicPage( plotOutput("plot", click = "plot_click"), verbatimTextOutput("selection"), conditionalPanel("plot_click!=null", h4(textOutput("nametext")), HTML('<iframe width="200" height="100" src="https://www.youtube.com/embed/Gyrfsrd4zK0" frameborder="0" allowfullscreen></iframe>')) ) server <- function(input, output,session) { output$plot <- renderPlot({ ggplot(data=df,aes(x=x,y=y))+ geom_point()+ scale_x_continuous(limits = c(0, 68))+ scale_y_continuous(limits = c(0, 52.5)) }) output$selection <- renderPrint({ nearPoints(df, input$plot_click) }) info <- reactive({ t <- as.data.frame(nearPoints(df, input$plot_click)) s <- t[1,4] u <- t[1,5] list(s=s,u=u) }) output$nametext <- renderText({if(!is.na(info()$s)){info()$s}}) output$urltext <- renderText({if(!is.na(info()$u)){info()$u}}) } runApp(shinyApp(ui, server), launch.browser = TRUE) 方法。

相关问题