StrokeCollection.Replace Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Koleksiyondaki vuruşların yerini alır.
Aşırı Yüklemeler
Replace(Stroke, StrokeCollection) |
Belirtilen öğesini belirtilen StrokeStrokeCollectionile değiştirir. |
Replace(StrokeCollection, StrokeCollection) |
Belirtilen StrokeCollection öğesini yeni StrokeCollectionbir ile değiştirir. |
Replace(Stroke, StrokeCollection)
Belirtilen öğesini belirtilen StrokeStrokeCollectionile değiştirir.
public:
void Replace(System::Windows::Ink::Stroke ^ strokeToReplace, System::Windows::Ink::StrokeCollection ^ strokesToReplaceWith);
public void Replace (System.Windows.Ink.Stroke strokeToReplace, System.Windows.Ink.StrokeCollection strokesToReplaceWith);
member this.Replace : System.Windows.Ink.Stroke * System.Windows.Ink.StrokeCollection -> unit
Public Sub Replace (strokeToReplace As Stroke, strokesToReplaceWith As StrokeCollection)
Parametreler
- strokesToReplaceWith
- StrokeCollection
Kaynağı StrokeCollection.
Özel durumlar
strokesToReplace
boş.
-veya-
strokesToReplaceWith
boş.
-veya-
strokesToReplaceWith
içindeki Stroke zaten içindedirstrokesToReplace
.
Örnekler
Aşağıdaki örnekte, bir üzerindeki seçili vuruşların başka StrokeCollectionbir InkCanvas ile nasıl değiştirildiği gösterilmektedir. Bu örnekte adlı inkCanvas1
bir InkCanvas olduğu varsayılır.
// Replace the selected strokes with other strokes.
private void ReplaceStrokes(StrokeCollection strokes)
{
StrokeCollection selectedStrokes = inkCanvas1.GetSelectedStrokes();
if (selectedStrokes != null && selectedStrokes.Count > 0)
{
inkCanvas1.Strokes.Replace(selectedStrokes, strokes);
}
}
' Replace the selected strokes with other strokes.
Private Sub ReplaceStrokes(ByVal strokes As StrokeCollection)
Dim selectedStrokes As StrokeCollection = inkCanvas1.GetSelectedStrokes()
If Not (selectedStrokes Is Nothing) Then
inkCanvas1.Strokes.Replace(selectedStrokes, strokes)
End If
End Sub
Açıklamalar
Replace yöntemi olayı tetiklerStrokesChanged.
Şunlara uygulanır
Replace(StrokeCollection, StrokeCollection)
Belirtilen StrokeCollection öğesini yeni StrokeCollectionbir ile değiştirir.
public:
void Replace(System::Windows::Ink::StrokeCollection ^ strokesToReplace, System::Windows::Ink::StrokeCollection ^ strokesToReplaceWith);
public void Replace (System.Windows.Ink.StrokeCollection strokesToReplace, System.Windows.Ink.StrokeCollection strokesToReplaceWith);
member this.Replace : System.Windows.Ink.StrokeCollection * System.Windows.Ink.StrokeCollection -> unit
Public Sub Replace (strokesToReplace As StrokeCollection, strokesToReplaceWith As StrokeCollection)
Parametreler
- strokesToReplace
- StrokeCollection
Hedef StrokeCollection.
- strokesToReplaceWith
- StrokeCollection
Kaynağı StrokeCollection.
Özel durumlar
strokesToReplace
boş.
-veya-
strokesToReplaceWith
boş.
-veya-
strokesToReplaceWith
içindeki Stroke zaten içindedirstrokesToReplace
.
-veya-
içindeki strokesToReplaceWith
vuruşlar sürekli değildir.
Örnekler
Aşağıdaki örnekte, bir üzerindeki seçili vuruşların başka StrokeCollectionbir InkCanvas ile nasıl değiştirildiği gösterilmektedir. Bu örnekte adlı inkCanvas1
bir InkCanvas olduğu varsayılır.
// Replace the selected strokes with other strokes.
private void ReplaceStrokes(StrokeCollection strokes)
{
StrokeCollection selectedStrokes = inkCanvas1.GetSelectedStrokes();
if (selectedStrokes != null && selectedStrokes.Count > 0)
{
inkCanvas1.Strokes.Replace(selectedStrokes, strokes);
}
}
' Replace the selected strokes with other strokes.
Private Sub ReplaceStrokes(ByVal strokes As StrokeCollection)
Dim selectedStrokes As StrokeCollection = inkCanvas1.GetSelectedStrokes()
If Not (selectedStrokes Is Nothing) Then
inkCanvas1.Strokes.Replace(selectedStrokes, strokes)
End If
End Sub
Açıklamalar
yöntemi, Replace değiştirdiğinden her Stroke birinin olayını tetiklerStrokesChanged.
Şunlara uygulanır
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin