WPF中将四个数字字符串值(比如:"10,10,300,300")转为Rect
2021-07-13 00:05
标签:convert wpf 数字 else bsp viewport .text html http WPF中将四个数字字符串值(比如:"10,10,300,300")转为Rect 标签:convert wpf 数字 else bsp viewport .text html http 原文地址:https://www.cnblogs.com/lonelyxmas/p/9589386.htmlRectConverter rectConverter = new RectConverter();
string parseString = viewportEntry.Text;
if (parseString != null && parseString != string.Empty)
{
imageBrush.Viewport = (Rect)rectConverter.ConvertFromString(parseString);
}
else
{
imageBrush.Viewport = Rect.Empty;
viewportEntry.Text = "Empty";
}
文章标题:WPF中将四个数字字符串值(比如:"10,10,300,300")转为Rect
文章链接:http://soscw.com/index.php/essay/104384.html