StrokeCollectionConverter 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
StrokeCollection을 문자열로 변환합니다.
public ref class StrokeCollectionConverter : System::ComponentModel::TypeConverter
public class StrokeCollectionConverter : System.ComponentModel.TypeConverter
type StrokeCollectionConverter = class
inherit TypeConverter
Public Class StrokeCollectionConverter
Inherits TypeConverter
- 상속
예제
다음 예제에서는 base-64로 인코딩된 ISF 문자열을 변환 StrokeCollection하는 방법을 보여 줍니다. 이 경우 호출presenter
된 .가 있다고 InkPresenter 가정합니다.
// 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=";
' The base-64 encoded string that contains ink data
' in ink serialized format (ISF).
Private strokesString As String = _
"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="
// 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);
}
}
' Accepts a string that contains ink data in ink
' serialized format (ISF) and converts it into a StrokeCollection.
Public Sub LoadStrokes()
Dim converter As New StrokeCollectionConverter()
If converter.CanConvertFrom(GetType(String)) Then
Dim newStrokes As StrokeCollection
newStrokes = converter.ConvertFrom(Nothing, Nothing, strokesString)
presenter.Strokes.Clear()
presenter.Strokes.Add(newStrokes)
End If
End Sub
설명
base-64 StrokeCollectionConverter 로 인코딩된 INK ISF(직렬화된 형식)를 나타내는 StrokeCollection 문자열로 변환 StrokeCollection 합니다. 웹 페이지와 같이 원시 바이트 데이터를 저장할 수 없는 경우 인코딩된 ISF인 base-64로 잉크 데이터를 저장하는 것이 유용합니다.
생성자
StrokeCollectionConverter() |
StrokeCollectionConverter 클래스의 새 인스턴스를 초기화합니다. |