Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private int StringLen(string candidate)
- {
- var formattedText = new FormattedText(
- candidate,
- CultureInfo.CurrentUICulture,
- FlowDirection.LeftToRight,
- new Typeface(this.textBlock.FontFamily, this.textBlock.FontStyle, this.textBlock.FontWeight, this.textBlock.FontStretch),
- this.textBlock.FontSize,
- Brushes.Black);
- return formattedText.Width;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement