c# - Setting tooltip width and height dynamically -


There is a way to dynamically set tooltip height and width in WPF (C #) (which means code ). Thanks for the help.

System. Windows Control Image td = new system Windows Control. Image (); Bitmapmys mybitmapimage = new bitmapmay (); MyBitmapImage.BeginInit (); MyBitmapImage.UriSource = New URI (Directory.GetCurrentDirectory () + "/Homepage.jpg"); Td.Width = 530; Td.Height = 392; //mybitmapImage.DecodePixelWidth = 430; //mybitmapImage.DecodePixelHeight = 2 9 2; MyBitmapImage.EndInit (); Td.Source = myBitmapImage; Text Block Text Block = New Text Block (); Brush Canon Conif = New Bronze Connor (); String strColor1 = bannerColor.SelectedItem.ToString (); StrColor1 = strColor1.Substring (strColor1.IndexOf ('') + 1); SolidColorBrush col = conv.ConvertFromString (strColor1) as SolidColorBrush; TextBlock.Foreground = Call; TextBlock.FontWeight = Font Wights. Bold; TextBlock.FontSize = 18; TextBlock.FontFamily = New system. Windows Media. Fontfamily ("Tahoma"); TextBlock.Width = 100; TextBlock.Height = 20; TextBlock.Text = "backup"; TextBlock.Margin = New Thickness (5, 5, 425, 367); Grid TooltipPanel = New Grid (); ToolTipPanel.Width = 530; ToolTipPanel.Height = 392; ToolTipPanel.Children.Add (TD); ToolTipPanel.Children.Add (TextBlock); ToolTipService.SetToolTip (Image 1, Toolpeed); ToolTipService.SetShowDuration (image1, 999999999); `

A tool tip is the height and width based on its contents, The size of the content you want should be

Maybe you can post your code which sets the tool tip for more clarification?


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -