iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
I am using UXWindowChrome and using IsClientVisible="true" (via binding) to make window appear/disappear.
I am using MVVM pattern.
1) I can't seem to be able to set focus using IsFocusManager.SetFocus("MyUXWindowChrome").
So for exmaple I have a button which sets IsClientVisible to true (via binding) and then tries to set focus to a control - this does not work/
2) As mentioned I use IsClientVisible="true" but how do I open/close the window using MVVM?
Thanks
Thank you for the prompt feedback.
private void ExecuteLaunchAbout(object parameter) { if (parameter.ToString()=="close") this.IsVisible = false; else { this.IsVisible = true; ISFocusManager.SetFocus("AuthorSearch"); object obj = ISFocusManager.GetFocusedElement(); } }
I modified the above code by adding an object variable in order to check the focused element after invoking SetFocus() method. Debugging on the obj variable proves that the focus has been set to the AuthorSearch UXSearchBox element.
However, visually, user might not realize this since there is no cursor displayed in the textbox of AuthorSearch UXSearchBox element (compared to the focus behavior on txt1 UXTextBox element). In order to have the similar behavior please try to set the IsTabStop property of AuthorSearch UXSearchBox to False.
<Intersoft:UXSearchBox IsTabStop="False" Margin="5" FontSize="15" Height="30" WatermarkText="Author's name.." WatermarkTextVisibility="Visible" HorizontalAlignment="Left" Width="250" x:Name="AuthorSearch" />
I have tested this solution and it works like a charm. Hope this helps.
I created a simple project of UXWindowChrome. In my simple project, the UXWindowChrome is shown when user clicks a UXButton (using DelegateCommand). The command will set a Boolean property to True. This property is bound to IsClientVisible property of UXWindowChrome.
I also add a line which set the focus on UXWindowChrome element. Please have the attached project evaluated on your end and let us know whether this helps or not.
Thanks for that. What you have supplied works for some controls and not others. I have re-attached the project and added some code. Th set focus works for buttons and text box but I want to set focus to a UXSearchBox - and this does not work for this control -can you please advise?
Many thanks, that now works.
Glad to hear that set the IsTabStop property helps.
Should you need further assistance or run into any technical problems regarding our controls, feel free to post it into our community site. We would be happy to assist you again.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname