Aracılığıyla paylaş


ContentControlStoreUpdatingEventArgs Arabirim

İçin veri sağlar StoreUpdating olay içerik denetimi.

Ad alanı:  Microsoft.Office.Tools.Word
Derleme:  Microsoft.Office.Tools.Word (Microsoft.Office.Tools.Word.dll içinde)

Sözdizimi

'Bildirim
<GuidAttribute("5d9c73b6-b14d-43a0-99eb-6ea91fbd8456")> _
Public Interface ContentControlStoreUpdatingEventArgs
[GuidAttribute("5d9c73b6-b14d-43a0-99eb-6ea91fbd8456")]
public interface ContentControlStoreUpdatingEventArgs

ContentControlStoreUpdatingEventArgs türü aşağıdaki üyeleri ortaya koyar.

Özellikler

  Ad Açıklama
Genel özellik Content İçerik denetimine bağlı özel bir xml parçası için kaydedilen metni alır.

Üst

Örnekler

Aşağıdaki kod örneği için olay işleyicilerini gösterir StoreUpdating ve ContentUpdating olayları. Bu örnek belgeyi içerdiğini varsayar bir PlainTextContentControl adlı plainTextContentControl1 bir öğeyi özel xml kısmı bağlı Bir öğeyi özel bir xml parçası bir içerik denetimi bağlamak gösteren bir kod örneği için bkz: İzlenecek Yol: İçerik Denetimlerini Özelleşmiş XML Bölümlerine Bağlama.

Bu kodu kullanmak için içine Yapıştır ThisDocument sınıf proje. C# için Ayrıca olay işleyicilerine iliştirmelisiniz StoreUpdating ve ContentUpdating olaylar plainTextContentControl1.

Bu örnek, bir belge düzeyinde özelleştirme için bulunur.

Private Sub plainTextContentControl1_StoreUpdating(ByVal sender As Object, _
    ByVal e As Microsoft.Office.Tools.Word.ContentControlStoreUpdatingEventArgs) _
    Handles PlainTextContentControl1.StoreUpdating

    MessageBox.Show("The control was changed to the following value: " & vbCrLf & _
        e.Content & vbCrLf & "This value is about to be written to the node that is bound to this control.")
End Sub

Private Sub plainTextContentControl1_ContentUpdating(ByVal sender As Object, _
    ByVal e As Microsoft.Office.Tools.Word.ContentControlContentUpdatingEventArgs) _
    Handles PlainTextContentControl1.ContentUpdating

    MessageBox.Show("The node that is bound to this control was changed to the following value: " & vbCrLf & _
        e.Content & vbCrLf & "This value is about to be written to this control.")
End Sub
void plainTextContentControl1_StoreUpdating(object sender, 
    Microsoft.Office.Tools.Word.ContentControlStoreUpdatingEventArgs e)
{
    MessageBox.Show("The control was changed to the following value: \n\n" +
        e.Content + "\n\nThis value is about to be written to the node that is bound to this control.");
}

void plainTextContentControl1_ContentUpdating(object sender, 
    Microsoft.Office.Tools.Word.ContentControlContentUpdatingEventArgs e)
{
    MessageBox.Show("The node that is bound to this control was changed to the following value: \n\n" +
        e.Content + "\n\nThis value is about to be written to this control.");
}

Ayrıca bkz.

Başvuru

Microsoft.Office.Tools.Word Ad Alanı

Diğer Kaynaklar

İçerik Denetimleri

Özel XML Bölümlerine Genel Bakış

İzlenecek Yol: İçerik Denetimlerini Özelleşmiş XML Bölümlerine Bağlama