Developer technologies | Universal Windows Platform (UWP)
A Microsoft platform for building and publishing apps for Windows devices.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Trying to add a tooltip with list of Items(string).How can I achieve it in UWP?
Thanks,
Ela
You can do something like this, with a Tooltip on button1 :
string[] sColors = { "Red", "Green", "Blue" };
List<string> colorList = new List<string>(sColors);
ToolTip toolTip = new ToolTip();
foreach (string sColor in colorList)
{
toolTip.Content += (toolTip.Content==null)?sColor:Environment.NewLine + sColor;
}
toolTip.Foreground = new SolidColorBrush(Colors.Black);
toolTip.Background = new SolidColorBrush(Colors.LightYellow);
ToolTipService.SetToolTip(button1, toolTip);