Home > Net >  WPF for help
WPF for help

Time:09-25

I added a in the TABCONTROL USERCONTRL, sometimes it can be showed that sometimes you can't, would you please tell me why god?

This USERCONTROL to add a background image, open USERCONTRL alone is not an error, normal program is running normally, now is in the TABCONTROL XAML interface can't display properly

CodePudding user response:

Usercontrol parent container don't use viewbox, usercontrol is no wide high need parent control specified and viewbox was scaling of the content of the container, if want to zoom in so child controls must specify the width is high, so change viewbox to the grid or in usercontrol explicitly specify the width and height properties
Of course this is just personal speculation that the original poster can have a try

CodePudding user response:

There are errors in the UserControl, and ViewBox it doesn't matter, but ViewBox generally used in the outermost layers of the xaml,

CodePudding user response:

refer to the second floor exception92 response:
there are errors in the UserControl, and ViewBox it doesn't matter, but ViewBox generally used in the outermost layers of the xaml,


But separate open USERCONTROL everything is normal, the program is running well

CodePudding user response:

reference 1st floor groveer response:
usercontrol parent container don't use viewbox, usercontrol is no wide high need parent control specified and viewbox was scaling of the content of the container, if want to zoom in so child controls must specify the width is high, so change viewbox to the grid or in usercontrol explicitly specify the width and height properties
Of course this is just personal speculation that the original poster can try


In the GRID also not line, tip can't find background resources, but I clearly have no problem in the USERCONTROL

CodePudding user response:

Theman23
reference 4 floor response:
Quote: refer to 1st floor groveer response:

Usercontrol parent container don't use viewbox, usercontrol is no wide high need parent control specified and viewbox was scaling of the content of the container, if want to zoom in so child controls must specify the width is high, so change viewbox to the grid or in usercontrol explicitly specify the width and height properties
Of course this is just personal speculation that the original poster can try


In the GRID also not line, tip can't find background resources, but I clearly have no problem in the USERCONTROL



Tip can't find the path resources carefully look at the pictures

CodePudding user response:


Tip can't find the resources to carefully look at the image path



But I clearly have no problem in the USERCONTROL, program is running
  •  Tags:  
  • C#
  • Related