/// <summary> /// Add image. /// </summary> public void AddImage() { var builder = new ViewBuilder(); var viewModel = new ViewModel.AddImageViewModel(this.documentFormatter); builder.Build <AddImage, ViewModel.AddImageViewModel>(viewModel).ShowDialog(); }
public static View FromBuilder(ViewBuilder vw) { var v = new View() { _view = vw.Build() }; v._view.Dock = DockStyle.Fill; return v; }
public static void RegisterAssemblies(IEnumerable<Assembly> assemblies) { var builder = new ViewBuilder(); builder.AddAssemblies(assemblies.ToList()); var designDocs = builder.Build(); var ddManager = new DesignDocManager(); ddManager.Create(designDocs); }
private void Application_Startup(object sender, StartupEventArgs e) { var viewName = "MainView"; var viewObject = ViewBuilder.Build <Window>(viewName, isViewModelAvailable: true); Application.Current.MainWindow = viewObject; Application.Current.MainWindow.Show(); }
public HourAndMinuteGridView(Dictionary <int, List <int> > minuteDictionary, DayType dayType) { InitializeComponent(); var vb = new ViewBuilder(); Content = vb.Build(minuteDictionary, dayType); }
public static void RegisterModelViews(IEnumerable <Assembly> assemblies) { var builder = new ViewBuilder(); builder.AddAssemblies(assemblies.ToList()); var designDocs = builder.Build(); var ddManager = new DesignDocManager(); ddManager.Create(designDocs); }
public void BuildTest() { var vb = new ViewBuilder(); var minuteDictionary = GetMinuteDictionary(); var scrollView = vb.Build(minuteDictionary, DayType.Weekday); Assert.NotNull(scrollView); Assert.NotNull(scrollView.Content); }
static void Main(string[] args) { var assemblies = ConfigParser.GetAssemblies(); var builder = new ViewBuilder(); builder.AddAssemblies(assemblies.ToList()); var designDocs = builder.Build(); var ddManager = new DesignDocManager(); ddManager.Create(designDocs, (s) => Console.WriteLine("Created {0} design doc", s)); var ddfManager = new DesignDocFileManager(); ddfManager.Create(Environment.CurrentDirectory, designDocs); var runner = new ViewRunner(); runner.Run(designDocs, (k, v, s) => Console.WriteLine("[{0}::{1}] Key {2}", k, v, s["key"]), 5); }
public void NavigateTo(string viewName, bool isViewModelAvailable = false) { if (string.IsNullOrEmpty(viewName)) { throw new ArgumentException(); } var viewObject = ViewBuilder.Build <Window>(viewName, isViewModelAvailable); if (viewObject != default(Window)) { viewObject.Show(); } }
public override DependencyObject CreateMainWindow() { var mainView = default(Window); if (!string.IsNullOrEmpty(mainViewName)) { mainView = ViewBuilder.Build <Window>(mainViewName, isViewModelAvailable: true); if (mainView != default(Window)) { mainView.Show(); } } return(mainView); }
static void Main(string[] args) { var assemblies = ConfigParser.GetAssemblies(); var builder = new ViewBuilder(); builder.AddAssemblies(assemblies.ToList()); var designDocs = builder.Build(); var ddManager = new DesignDocManager(); ddManager.Create(designDocs, (s) => Console.WriteLine("Created {0} design doc", s)); var ddfManager = new DesignDocFileManager(); ddfManager.Create(Environment.CurrentDirectory, designDocs); var runner = new ViewRunner(); runner.Run(designDocs, (k, v, s) => Console.WriteLine("[{0}::{1}] Key {2}", k, v, s["key"]), 5); }
protected virtual ViewLinkHelper createPageFor(IPageViewModel viewModel) { var view = ViewBuilder.Build <Page> (viewModel); return(new ViewLinkHelper(view, viewModel, this)); }