ToolTipService.IsEnabled 附加屬性

定義

取得或設定是否顯示工具提示。

see GetIsEnabled, and SetIsEnabled
see GetIsEnabled, and SetIsEnabled
see GetIsEnabled, and SetIsEnabled

範例

下列範例會示範如何設定 IsEnabled 屬性。

<Ellipse Height="25" Width="50" 
      Fill="Gray" 
      HorizontalAlignment="Left"
      ToolTipService.InitialShowDelay="1000"
      ToolTipService.ShowDuration="7000"
      ToolTipService.BetweenShowDelay="2000"
      ToolTipService.Placement="Right" 
      ToolTipService.PlacementRectangle="50,0,0,0"
      ToolTipService.HorizontalOffset="10" 
      ToolTipService.VerticalOffset="20"
      ToolTipService.HasDropShadow="false"
      ToolTipService.ShowOnDisabled="true" 
      ToolTipService.IsEnabled="true"
      ToolTipOpening="whenToolTipOpens"
      ToolTipClosing="whenToolTipCloses"
      >
  <Ellipse.ToolTip>
    <BulletDecorator>
      <BulletDecorator.Bullet>
        <Ellipse Height="10" Width="20" Fill="Blue"/>
      </BulletDecorator.Bullet>
      <TextBlock>Uses the ToolTipService class</TextBlock>
    </BulletDecorator>
  </Ellipse.ToolTip>
</Ellipse>
ToolTipService.SetIsEnabled(ellipse2, true);
ToolTipService.SetIsEnabled(ellipse2, True)

備註

若要判斷工具提示目前是否可見,請使用 IsOpen 屬性。

如需如何在程式碼中取得或設定此屬性的資訊,請參閱 GetIsEnabledSetIsEnabled 方法。

相依性屬性資訊

識別碼欄位 IsEnabledProperty
中繼資料屬性設定為 true

適用於

另請參閱