< UserControl x:Class ="HelloWorld.Silverlight.Shell" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml" Width ="400" Height ="300" > < Grid x:Name ="LayoutRoot" Background ="White" > </ Grid > </ UserControl >
* This source code was highlighted with Source Code Highlighter .
< UserControl x:Class ="HelloWorld.Silverlight.Shell" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml" Width ="400" Height ="300" > < Grid x:Name ="LayoutRoot" Background ="White" > </ Grid > </ UserControl >
* This source code was highlighted with Source Code Highlighter .< UserControl x:Class ="HelloWorld.Silverlight.Shell" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml" Width ="400" Height ="300" > < Grid x:Name ="LayoutRoot" Background ="White" > </ Grid > </ UserControl >
* This source code was highlighted with Source Code Highlighter .< UserControl x:Class ="HelloWorld.Silverlight.Shell" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml" Width ="400" Height ="300" > < Grid x:Name ="LayoutRoot" Background ="White" > </ Grid > </ UserControl >
* This source code was highlighted with Source Code Highlighter .< UserControl x:Class ="HelloWorld.Silverlight.Shell" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml" Width ="400" Height ="300" > < Grid x:Name ="LayoutRoot" Background ="White" > </ Grid > </ UserControl >
* This source code was highlighted with Source Code Highlighter .< UserControl x:Class ="HelloWorld.Silverlight.Shell" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml" Width ="400" Height ="300" > < Grid x:Name ="LayoutRoot" Background ="White" > </ Grid > </ UserControl >
* This source code was highlighted with Source Code Highlighter .< UserControl x:Class ="HelloWorld.Silverlight.Shell" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml" Width ="400" Height ="300" > < Grid x:Name ="LayoutRoot" Background ="White" > </ Grid > </ UserControl >
* This source code was highlighted with Source Code Highlighter .< UserControl x:Class ="HelloWorld.Silverlight.Shell" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml" Width ="400" Height ="300" > < Grid x:Name ="LayoutRoot" Background ="White" > </ Grid > </ UserControl >
* This source code was highlighted with Source Code Highlighter .< UserControl x:Class ="HelloWorld.Silverlight.Shell" xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x ="http://schemas.microsoft.com/winfx/2006/xaml" Width ="400" Height ="300" > < Grid x:Name ="LayoutRoot" Background ="White" > </ Grid > </ UserControl >
* This source code was highlighted with Source Code Highlighter .
- xmlns: Regions = "clr-namespace: Microsoft.Practices.Composite.Presentation.Regions; assembly = Microsoft.Practices.Composite.Presentation"
* This source code was highlighted with Source Code Highlighter .
- < UserControl x: Class = "HelloWorld.Silverlight.Shell"
- xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns: Regions = "clr-namespace: Microsoft.Practices.Composite.Presentation.Regions; assembly = Microsoft.Practices.Composite.Presentation"
- Width = "400" Height = "300" >
- < ItemsControl Name = "MainRegion" />
- </ UserControl >
* This source code was highlighted with Source Code Highlighter .
- < ItemsControl Name = "MainRegion" Regions: RegionManager . RegionName = "MainRegion" />
* This source code was highlighted with Source Code Highlighter .
- class Bootstrapper: UnityBootstrapper
- {
- }
* This source code was highlighted with Source Code Highlighter .
- protected override DependencyObject CreateShell ()
- {
- Shell shell = Container.Resolve <Shell> ();
- Application.Current.RootVisual = shell;
- return shell;
- }
* This source code was highlighted with Source Code Highlighter .
- protected override IModuleCatalog GetModuleCatalog ()
- {
- ModuleCatalog catalog = new ModuleCatalog ();
- return catalog;
- }
* This source code was highlighted with Source Code Highlighter .
- private void Application_Startup ( object sender, StartupEventArgs e)
- {
- Bootstrapper bootstrapper = new Bootstrapper ();
- bootstrapper.Run ();
- }
* This source code was highlighted with Source Code Highlighter .
- public class HelloWorldModule: IModule
- {
- public void Initialize () {}
- }
* This source code was highlighted with Source Code Highlighter .
- protected override IModuleCatalog GetModuleCatalog ()
- {
- ModuleCatalog catalog = new ModuleCatalog ()
- .AddModule ( typeof (HelloWorldModule.HelloWorldModule));
- return catalog;
- }
* This source code was highlighted with Source Code Highlighter .
- < UserControl x: Class = "HelloWorldModule.Views.HelloWorldView"
- xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns: x = "http://schemas.microsoft.com/winfx/2006/xaml" >
- < Grid x: Name = "LayoutRoot" Background = "White" >
- < TextBlock Text = "Hello World" Foreground = "Green" HorizontalAlignment = "Center" VerticalAlignment = "Center" FontFamily = "Calibri" FontSize = "24" FontWeight = "Bold" > </ TextBlock >
- </ Grid >
- </ UserControl >
* This source code was highlighted with Source Code Highlighter .
- public HelloWorldModule (IRegionManager regionManager)
- {
- this .regionManager = regionManager;
- }
* This source code was highlighted with Source Code Highlighter .
- public void Initialize ()
- {
- regionManager.RegisterViewWithRegion ( "MainRegion" , typeof (Views.HelloWorldView));
- }
* This source code was highlighted with Source Code Highlighter .
Source: https://habr.com/ru/post/54485/
All Articles