02-29-2020, 12:07 AM
Hi there,
I have the problem that the ToolTip of the BoxUIElement3D is not displayed if the BoxUIElement3D was generated in the C# code.
If the BoxUIElement3D is created in the XAML code, it works.
XAML:
<Border Name = "ViewportBorder" Background = "Transparent" Cursor = "Arrow">
<Viewport3D Name = "MainViewport" Cursor = "Arrow">
<ModelVisual3D x: Name = "MainRootTransform">
<! - OK ->
<uiElements: BoxUIElement3D CenterPosition = "0 0 0" Size = "1000 1000 1000"
Material = "{StaticResource ObjectsMaterial}"
ToolTip = "This is a simple tooltip"/>
</ ModelVisual3D>
</ Viewport3D>
</ Border>
C #:
Ab3d.UIElements.BoxUIElement3D boxUIElement3D1 = new Ab3d.UIElements.BoxUIElement3D ();
boxUIElement3D1.ToolTip = "This is a ToolTip ...";
boxUIElement3D1.CenterPosition = new Point3D (0, 0, 0);
boxUIElement3D1.Size = new Size3D (5000, 5000, 5000);
boxUIElement3D1.Material = boxMaterial;
MainViewport.Children.Add (boxUIElement3D1); // OK -> ToolTip is shown
//MainRootTransform.Children.Add (boxUIElement3D1); // NOK -> ToolTip is NOT shown
With thanks in advance.
close
I have the problem that the ToolTip of the BoxUIElement3D is not displayed if the BoxUIElement3D was generated in the C# code.
If the BoxUIElement3D is created in the XAML code, it works.
XAML:
<Border Name = "ViewportBorder" Background = "Transparent" Cursor = "Arrow">
<Viewport3D Name = "MainViewport" Cursor = "Arrow">
<ModelVisual3D x: Name = "MainRootTransform">
<! - OK ->
<uiElements: BoxUIElement3D CenterPosition = "0 0 0" Size = "1000 1000 1000"
Material = "{StaticResource ObjectsMaterial}"
ToolTip = "This is a simple tooltip"/>
</ ModelVisual3D>
</ Viewport3D>
</ Border>
C #:
Ab3d.UIElements.BoxUIElement3D boxUIElement3D1 = new Ab3d.UIElements.BoxUIElement3D ();
boxUIElement3D1.ToolTip = "This is a ToolTip ...";
boxUIElement3D1.CenterPosition = new Point3D (0, 0, 0);
boxUIElement3D1.Size = new Size3D (5000, 5000, 5000);
boxUIElement3D1.Material = boxMaterial;
MainViewport.Children.Add (boxUIElement3D1); // OK -> ToolTip is shown
//MainRootTransform.Children.Add (boxUIElement3D1); // NOK -> ToolTip is NOT shown
With thanks in advance.
close

