SL - ToolTip的试用

来源:互联网 发布:百度云 for mac 编辑:程序博客网 时间:2024/04/30 19:45

<

TextBox Height="25" Margin="320,30,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" x:Name="TextBoxNewName" MaxLength="255"

ToolTipService.ToolTip="{Binding Source={StaticResource RuleStringLibrary},Converter={StaticResource Localizer},ConverterParameter=ToolTip_txt_Identifypermissiblecharacters}"

Text="{Binding NewName, Mode=TwoWay, Converter={StaticResource Validator}, ConverterParameter=0:Rule_RuleName, NotifyOnValidationError=True, ValidatesOnExceptions=True}" TextWrapping="Wrap" Width="250" />


Border

b = new Border();

b.Width = 75;

b.Height = 90;

//b.BorderBrush = new SolidColorBrush(Color.FromArgb(25, 0, 0, 0));

//b.BorderThickness = new Thickness(1, 1, 1, 1);

if (string.IsNullOrEmpty(relationObject.ToolTip))

{

ToolTipService.SetToolTip(b, relationObject.Name);

}

else

{

ToolTipService.SetToolTip(b, relationObject.ToolTip);

}

0 0
原创粉丝点击