本文整理汇总了C#中System.Windows.StrokeCollectionConverter.ConvertFrom方法的典型用法代码示例。如果您正苦于以下问题:C# StrokeCollectionConverter.ConvertFrom方法的具体用法?C# StrokeCollectionConverter.ConvertFrom怎么用?C# StrokeCollectionConverter.ConvertFrom使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.StrokeCollectionConverter
的用法示例。
在下文中一共展示了StrokeCollectionConverter.ConvertFrom方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1:
// The base-64 encoded string that contains ink data
// in ink serialized format (ISF).
string strokesString =
@"AOoFAxBIEEVqGwIAWf9GahsCAFn/GRQyCACAEAIAAABCMwgAgA"
+ "wCAAAAQhWrqtNBq6rTQaVh0MSr+ivFHyEVVFVVVVV1OkBUVVVVVXU6QJ7"
+ "0SZ80DJrAVFVVVVV/pcAKU3yC/gEb+AX/k5Z8PwWBO5KktgJSUAAKjzyC"
+ "wBZYLEoCJLd+Cbti873JlTUvn158doCC/gKb+ApwAJslSywE2ALAAWPPI"
+ "FhKWBKWAKAmwJVglAKACiMjgv3d+8Xi+fHWM2WC0zcm89+NSoL+A5P4Dl"
+ "uNlhFIqpLKAAoaF4L+AhP4CFAWAWCggv4Dc/gNty2yy5SrlKAKIhyC/gI"
+ "b+Ai+JZc2XZOyb46vLQCC/gOL+A5YDNlWFjN3CwAKQFeC/gOr+A7VhUFZ"
+ "KCsS2WTc2SyhKuWVLR3ly2LAXx574ssUgv4Dm/gOcCwEEpUTYSixUsuWy"
+ "gVZ79AQsWGyWUAKLCiC/gQT+BA9SWbllDfGqy3Lcu+OmfH8EIL+BDv4EP"
+ "XLKSpY3lVFhZuVZvKACkFggv4F2/gXlKLFuCVKTcsqUlkoRKBmk8zfFll"
+ "S2ySlACwAgv4Ds/gO+WWWWLBLFllllSksAoSkWG1kSbFu5AoAAAo/YoL+"
+ "Biv4GJJU+P4qSalUBKWdkBYCbm+Nliyk1CVKgCxYNYqC/gQb+BBwO8ABY"
+ "olDz4gAEzaw2AVCUKAsWCooCiAegv4Hw/gfEJe8zUoSgLCC/gNT+A0xM7"
+ "Gdmdliay2VaAo0PoL+B7v4Hx5Yq3lc2xZsseeC3N8aDXjUpWW4UIL+A5P"
+ "4DnhYqAIWFkqpcrLZuJuWqSyxVAovNoL+CJP4IjnlkDvHeSbSVd9FqFlI"
+ "oWAAgv4Dk/gOVc7gbmdyZ1LajFFJmlRKsoAKVXmC/go7+CjdRvredypaK"
+ "myLC7ytZQqFiyWbikAEvfg2pSVKS7liSwWJNsrbi4CC/gQD+A/9M2ACxU"
+ "qKjcVuXKiosCWWKQSyhvKRUUWULCwEmyyu4gA=";
示例2: LoadStrokes
// Accepts a string that contains ink data in ink
// serialized format (ISF) and converts it into a StrokeCollection.
public void LoadStrokes()
{
StrokeCollectionConverter converter =
new StrokeCollectionConverter();
if (converter.CanConvertFrom(typeof(string)))
{
StrokeCollection newStrokes =
(StrokeCollection)converter.ConvertFrom(null, null, strokesString);
presenter.Strokes.Clear();
presenter.Strokes.Add(newStrokes);
}
}