原文:WPF中将四个数字字符串值(比如:"10,10,300,300")转为Rect
RectConverter 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"; }
原文地址:https://www.cnblogs.com/lonelyxmas/p/9589386.html
时间: 2024-10-19 04:19:20