private void CreateDeviceIndependentResources() { this.d2dFactory = D2D1Factory.Create(D2D1FactoryType.SingleThreaded); this.dwriteFactory = DWriteFactory.Create(DWriteFactoryType.Shared); }