public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string image = parameter as string ?? value as string; if (image == null) { throw new NullReferenceException("parameter"); } return(ResourceImageHelper.GetResourceImage(image)); }
protected LoginViewModel() { Icon = ResourceImageHelper.GetResourceImage("User.png"); UserName = "******"; }
void InitializeInDesignMode() { Caption = "Sales"; Description = "Revenue" + Environment.NewLine + "Snapshots"; Glyph = ResourceImageHelper.GetResourceImage("Sales.png"); }
static void InitModules() { ModuleManager.DefaultManager.Register( Regions.Navigation, new DevExpress.Mvvm.ModuleInjection.Module(Modules.Dashboard, () => NavigationItemViewModel.Create(Modules.Dashboard, "Sales", "Revenue" + Environment.NewLine + "Snapshots", ResourceImageHelper.GetResourceImage("Sales.png")), typeof(NavigationItemView))); ModuleManager.DefaultManager.Register( Regions.Navigation, new DevExpress.Mvvm.ModuleInjection.Module(Modules.Products, () => NavigationItemViewModel.Create(Modules.Products, "Products", "Revenue" + Environment.NewLine + "by Products", ResourceImageHelper.GetResourceImage("Products.png")), typeof(NavigationItemView))); ModuleManager.DefaultManager.Register( Regions.Navigation, new DevExpress.Mvvm.ModuleInjection.Module(Modules.Sectors, () => NavigationItemViewModel.Create(Modules.Sectors, "Sectors", "Revenue" + Environment.NewLine + "by Sectors", ResourceImageHelper.GetResourceImage("Sectors.png")), typeof(NavigationItemView))); ModuleManager.DefaultManager.Register( Regions.Navigation, new DevExpress.Mvvm.ModuleInjection.Module(Modules.Regions, () => NavigationItemViewModel.Create(Modules.Regions, "Regions", "Revenue" + Environment.NewLine + "by Regions", ResourceImageHelper.GetResourceImage("Regions.png")), typeof(NavigationItemView))); ModuleManager.DefaultManager.Register( Regions.Navigation, new DevExpress.Mvvm.ModuleInjection.Module(Modules.Channels, () => NavigationItemViewModel.Create(Modules.Channels, "Channels", "Revenue" + Environment.NewLine + "by Sales Channels", ResourceImageHelper.GetResourceImage("Channels.png")), typeof(NavigationItemView))); ModuleManager.DefaultManager.Register(Regions.Main, new DevExpress.Mvvm.ModuleInjection.Module(Modules.Dashboard, () => SalesDashboardViewModel.Create(), typeof(SalesDashboard))); ModuleManager.DefaultManager.Register(Regions.Main, new DevExpress.Mvvm.ModuleInjection.Module(Modules.Products, () => ProductsViewModel.Create(), typeof(ProductsView))); ModuleManager.DefaultManager.Register(Regions.Main, new DevExpress.Mvvm.ModuleInjection.Module(Modules.Sectors, () => SectorsViewModel.Create(), typeof(SectorsView))); ModuleManager.DefaultManager.Register(Regions.Main, new DevExpress.Mvvm.ModuleInjection.Module(Modules.Regions, () => RegionsViewModel.Create(), typeof(RegionsView))); ModuleManager.DefaultManager.Register(Regions.Main, new DevExpress.Mvvm.ModuleInjection.Module(Modules.Channels, () => ChannelsViewModel.Create(), typeof(ChannelsView))); ModuleManager.DefaultManager.Inject(Regions.Navigation, Modules.Dashboard); ModuleManager.DefaultManager.Inject(Regions.Navigation, Modules.Products); ModuleManager.DefaultManager.Inject(Regions.Navigation, Modules.Sectors); ModuleManager.DefaultManager.Inject(Regions.Navigation, Modules.Regions); ModuleManager.DefaultManager.Inject(Regions.Navigation, Modules.Channels); ModuleManager.DefaultManager.Inject(Regions.Main, Modules.Dashboard); ModuleManager.DefaultManager.Inject(Regions.Main, Modules.Products); ModuleManager.DefaultManager.Inject(Regions.Main, Modules.Sectors); ModuleManager.DefaultManager.Inject(Regions.Main, Modules.Regions); ModuleManager.DefaultManager.Inject(Regions.Main, Modules.Channels); ModuleManager.DefaultManager.Navigate(Regions.Navigation, Modules.Dashboard); }