public XamlTestApp() { RegisterServices(); RegisterPlatform(); Styles = new DefaultTheme(); InitializeComponent(); }
public DesignerApp() { RegisterServices(); //For now we only support windows InitializeSubsystems(2); Styles = new DefaultTheme(); }
public App() { RegisterServices(); InitializeSubsystems(GetPlatformId()); Styles = new DefaultTheme(); InitializeComponent(); }
public App() { RegisterServices(); InitializeSubsystems((int)Environment.OSVersion.Platform); Styles = new DefaultTheme(); Styles.Add(new SampleTabStyle()); }
public App() { RegisterServices(); InitializeSubsystems((int)Environment.OSVersion.Platform); Styles = new DefaultTheme(); PerspexXamlLoader.Load(this); }
public App() { RegisterServices(); InitializeSubsystems((int)Environment.OSVersion.Platform); Styles = new DefaultTheme(); Styles.Add(new SampleTabStyle()); DataTemplates = new DataTemplates { new FuncTreeDataTemplate<Node>( x => new TextBlock {Text = x.Name}, x => x.Children), }; }
public App() { RegisterServices(); InitializeSubsystems((int)Environment.OSVersion.Platform); Styles = new DefaultTheme(); Log.Logger = new LoggerConfiguration() .Filter.ByIncludingOnly(Matching.WithProperty("Area", "Property")) .Filter.ByIncludingOnly(Matching.WithProperty("Property", "Text")) .MinimumLevel.Verbose() .WriteTo.Trace(outputTemplate: "[{Id:X8}] [{SourceContext}] {Message}") .CreateLogger(); }
/// <summary> /// Initializes a new instance of the <see cref="App"/> class. /// </summary> public App() { RegisterServices(); #if SKIA_WIN Win32Platform.Initialize(); SkiaPlatform.Initialize(); #elif SKIA_GTK GtkPlatform.Initialize(); SkiaPlatform.Initialize(); #else InitializeSubsystems((int)Environment.OSVersion.Platform); #endif Styles = new DefaultTheme(); InitializeComponent(); }
private TestApp() { RegisterServices(); var fixture = new Fixture().Customize(new AutoMoqCustomization()); var windowImpl = new Mock<IWindowImpl>(); var renderInterface = fixture.Create<IPlatformRenderInterface>(); PerspexLocator.CurrentMutable .Bind<IAssetLoader>().ToConstant(new AssetLoader()) .Bind<IPclPlatformWrapper>().ToConstant(new PclPlatformWrapper()) .Bind<IPlatformRenderInterface>().ToConstant(renderInterface) .Bind<IWindowingPlatform>().ToConstant(new WindowingPlatformMock(() => windowImpl.Object)); Styles = new DefaultTheme(); }
private TestApp() { RegisterServices(); var fixture = new Fixture().Customize(new AutoMoqCustomization()); var windowImpl = new Mock<IWindowImpl>(); var renderInterface = fixture.Create<IPlatformRenderInterface>(); var threadingInterface = Mock.Of<IPlatformThreadingInterface>(x => x.CurrentThreadIsLoopThread == true); PerspexLocator.CurrentMutable .Bind<IAssetLoader>().ToConstant(new AssetLoader()) .Bind<ILayoutManager>().ToConstant(new LayoutManager()) .Bind<IPclPlatformWrapper>().ToConstant(new PclPlatformWrapper()) .Bind<IPlatformRenderInterface>().ToConstant(renderInterface) .Bind<IPlatformThreadingInterface>().ToConstant(threadingInterface) .Bind<IStandardCursorFactory>().ToConstant(new Mock<IStandardCursorFactory>().Object) .Bind<IWindowingPlatform>().ToConstant(new WindowingPlatformMock(() => windowImpl.Object)); Styles = new DefaultTheme(); }
private void RegisterServices() { var fixture = new Fixture().Customize(new AutoMoqCustomization()); var formattedText = fixture.Create<IFormattedTextImpl>(); var globalStyles = new Mock<IGlobalStyles>(); var renderInterface = fixture.Create<IPlatformRenderInterface>(); var renderManager = fixture.Create<IRenderQueueManager>(); var theme = new DefaultTheme(); var windowImpl = new Mock<IWindowImpl>(); windowImpl.SetupProperty(x => x.ClientSize); windowImpl.Setup(x => x.MaxClientSize).Returns(new Size(1024, 1024)); globalStyles.Setup(x => x.Styles).Returns(theme); PerspexLocator.CurrentMutable .Bind<IInputManager>().ToConstant(new Mock<IInputManager>().Object) .Bind<IGlobalStyles>().ToConstant(globalStyles.Object) .Bind<ILayoutManager>().ToConstant(new LayoutManager()) .Bind<IPlatformRenderInterface>().ToConstant(renderInterface) .Bind<IPlatformThreadingInterface>().ToConstant(new Mock<IPlatformThreadingInterface>().Object) .Bind<IRenderQueueManager>().ToConstant(renderManager) .Bind<IStyler>().ToConstant(new Styler()) .Bind<IWindowImpl>().ToConstant(windowImpl.Object); }
private void RegisterServices() { var fixture = new Fixture().Customize(new AutoMoqCustomization()); var l = Locator.CurrentMutable; var formattedText = fixture.Create<IFormattedTextImpl>(); var globalStyles = new Mock<IGlobalStyles>(); var renderInterface = fixture.Create<IPlatformRenderInterface>(); var renderManager = fixture.Create<IRenderManager>(); var theme = new DefaultTheme(); var windowImpl = new Mock<IWindowImpl>(); globalStyles.Setup(x => x.Styles).Returns(theme); l.RegisterConstant(new Mock<IInputManager>().Object, typeof(IInputManager)); l.RegisterConstant(globalStyles.Object, typeof(IGlobalStyles)); l.RegisterConstant(new LayoutManager(), typeof(ILayoutManager)); l.RegisterConstant(renderInterface, typeof(IPlatformRenderInterface)); l.RegisterConstant(new Mock<IPlatformThreadingInterface>().Object, typeof(IPlatformThreadingInterface)); l.RegisterConstant(renderManager, typeof(IRenderManager)); l.RegisterConstant(new Styler(), typeof(IStyler)); l.RegisterConstant(windowImpl.Object, typeof(IWindowImpl)); }
public XamlTestApp() { RegisterServices(); RegisterPlatform(); Styles = new DefaultTheme(); }