مشاركة عبر


ContentControlStoreUpdatingEventArgs الواجهة

يوفر بيانات StoreUpdatingالأحداث المحتوى عنصر تحكم.

مساحة الاسم:  Microsoft.Office.Tools.Word
التجميع:  Microsoft.Office.Tools.Word (في Microsoft.Office.Tools.Word.dll)

بناء الجملة

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

أمثلة

يلي تعليمات برمجية يوضح المثال معالجات الأحداث ل StoreUpdatingو ContentUpdatingالأحداث. Th هو بفرض أن مستند يحتوي على PlainTextContentControlباسم plainTextContentControl1التي هو مرتبط بعنصر في part. XML مخصص تعليمات برمجية مثال يوضح كيفية يربط عنصر تحكم محتوى إلى عنصر في جزء XML مخصصة، راجع الإرشادات التفصيلية: ربط عناصر تحكم المحتوى إلى أجزاء XML المخصصة.

لاستخدام هذا تعليمات برمجية، لصقه في ThisDocumentالفئة في مشروع الخاص بك. C#، يجب يرفق حدث معالجات إلى StoreUpdatingو ContentUpdatingحدث s من plainTextContentControl1.

Th هو المثال هو لتخصيص المستوى مستند.

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.");
}

راجع أيضًَا

المرجع

ContentControlStoreUpdatingEventArgs الأعضاء

Microsoft.Office.Tools.Word مساحة الاسم

موارد أخرى

عناصر تحكم المحتوى

نظرة عامة على أجزاء XML المخصصة

الإرشادات التفصيلية: ربط عناصر تحكم المحتوى إلى أجزاء XML المخصصة