public void DrawTextLayout(D2D1Point2F origin, DWriteTextLayout textLayout, D2D1Brush defaultForegroundBrush, D2D1DrawTextOptions options)
        {
            if (textLayout == null)
            {
                throw new ArgumentNullException("textLayout");
            }

            if (defaultForegroundBrush == null)
            {
                throw new ArgumentNullException("defaultForegroundBrush");
            }

            this.GetHandle<ID2D1RenderTarget>().DrawTextLayout(origin, (IDWriteTextLayout)textLayout.Handle, defaultForegroundBrush.GetHandle<ID2D1Brush>(), options);
        }
        public void DrawText(string text, DWriteTextFormat textFormat, D2D1RectF layoutRect, D2D1Brush defaultForegroundBrush, D2D1DrawTextOptions options, DWriteMeasuringMode measuringMode)
        {
            if (text == null)
            {
                throw new ArgumentNullException("text");
            }

            if (textFormat == null)
            {
                throw new ArgumentNullException("textFormat");
            }

            if (defaultForegroundBrush == null)
            {
                throw new ArgumentNullException("defaultForegroundBrush");
            }

            this.GetHandle<ID2D1RenderTarget>().DrawText(text, (uint)text.Length, (IDWriteTextFormat)textFormat.Handle, ref layoutRect, defaultForegroundBrush.GetHandle<ID2D1Brush>(), options, measuringMode);
        }