当前位置: 首页>>代码示例>>C#>>正文


C# StrokeCollectionConverter类代码示例

本文整理汇总了C#中System.Windows.StrokeCollectionConverter的典型用法代码示例。如果您正苦于以下问题:C# StrokeCollectionConverter类的具体用法?C# StrokeCollectionConverter怎么用?C# StrokeCollectionConverter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


StrokeCollectionConverter类属于System.Windows命名空间,在下文中一共展示了StrokeCollectionConverter类的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=";
开发者ID:.NET开发者,项目名称:System.Windows,代码行数:21,代码来源:StrokeCollectionConverter

示例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);
    }
}
开发者ID:.NET开发者,项目名称:System.Windows,代码行数:15,代码来源:StrokeCollectionConverter


注:本文中的System.Windows.StrokeCollectionConverter类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。