Aracılığıyla paylaş


RichTextBox.IsDocumentEnabled Özellik

Tanım

Kullanıcının ve içindeki RichTextBoxnesnelerle UIElementContentElement etkileşime girip giremeyeceğini belirten bir değer alır veya ayarlar.

public:
 property bool IsDocumentEnabled { bool get(); void set(bool value); };
public bool IsDocumentEnabled { get; set; }
member this.IsDocumentEnabled : bool with get, set
Public Property IsDocumentEnabled As Boolean

Özellik Değeri

true kullanıcı ile UIElement etkileşim kurabiliyorsa ve ContentElement içindeki RichTextBoxnesneleri ; değilse, false.

Örnekler

Aşağıdaki örnek, ve içeren bir RichTextBoxHyperlinkButtonoluşturur.CheckBox IsDocumentEnabled özelliği RichTextBox özelliğinin IsChecked özelliğine CheckBoxbağlıdır. Kullanıcı öğesini seçtiğinde CheckBoxve Hyperlinkile Button etkileşimde bulunabilir. Kullanıcı öğesini Button temizlediğinde CheckBoxve Hyperlink devre dışı bırakılır.

<StackPanel>
    <CheckBox Name="IsDocumentEnabledChbk" Content="IsDocumentEnabled"/>
    <RichTextBox Name="richTB"
                 IsDocumentEnabled="{Binding ElementName=IsDocumentEnabledChbk,
                                             Path=IsChecked}">
        <FlowDocument>
            <Paragraph>
                Use the Checkbox above to switch between enabling and
                disabling the Button and Hyperlink in the RichTextBox.
                <Hyperlink>Here is a hyperlink</Hyperlink>
            </Paragraph>
            <BlockUIContainer>
                <Button>Click me!</Button>
            </BlockUIContainer>

        </FlowDocument>
    </RichTextBox>
</StackPanel>

Açıklamalar

IsDocumentEnabled .NET Framework sürüm 3.5'te kullanıma sunulmuştur. Daha fazla bilgi için bkz . Sürümler ve Bağımlılıklar.

Şunlara uygulanır