hi,
The requirement is to display a user control in a tab item. The below is the code I am trying. I am trying to use a WPF User control in PowerShell. Everything is working fine but when I select the tab item then getting the focus error.
I tried to resolve it by own and even tried to seek help from others but unfortunately unable to fix it.
Sadly, and I hate to do this, but you might get better results in StackOverflow - more developers there, more playing with WPF. But please, if you do figure it out, a link to the solution will be appreciated by future generations ;).
Hi,
I have fixed this issue. I am unable to paste the solved code here since xml part is auto wiping. The solution is, we should create all the controls with in a grid control and add only the grid control to the target control
Would you please provide an example in plain text? I am running into the same problem using User Control within PowerShell.
As you can see from my example below, I get a namespace error when I try implementing UserControls within PowerShell. Am I wrong, is it possible? Any help is appreciated.
For example:
If I tried implementing a XAML User Control and binding it with PowerShell but it fails with a namespace error. My test project has two XAML files and one PS1 script that can be found in my GitHub.