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
Hello,
I am currently evaluation your suite for potential purchase by our company and have a quick question concerning the ClientUI framework.
I have seen that when using a “UXPage” in place of the standard “UserControl” within a Silverlight application you will now have access to a “KeyDown” event for keys that were unsupported before adding your framework, I.e. The arrow keys. My question is if that same functionality can be brought into a Silverlight Class Library that does not have “pages” and thus does not use a UXPage.
I.e. my application makes use of a class library that has tools which work off of different states and must perform its own input processing while a certain “tool” is in the active state. Could I somehow include your framework library dll within my Silverlight Class library and from it gain access to the same KeyUp/KeyDown event recognition that is present in the UXPage control, so that the “KeyDown” event will fire for the arrow keys, when the surface (canvas) that is programatically created by my class library has focus? And of course, if that is possible, could you provide a quick description of how / what I would need to hook into to obtain said functionality. (Perhaps hooking some form of event handler from the clientui dll up on the drawing surface I am creating within my class lib when a new drawing is initialized?)
Again, to reiterate, I am looking to be able to utilize the improved KeyDown event handling within a Silverlight Class Library, that does not have pages and thus will not have a UXPage to sit on, so that pressing the arrow keys will fire the KeyDown event when the class library is processing the input. (Without your framework, certain keys, such as the arrow keys, only fire a KeyUp event in Silverlight).
Thank you.
Hello James,
Thank you for your interest in our ClientUI suite.
Our UXPage is built on the top of the ClientUI Framework that use solid architecture such as routed events and commands. That enables many events to be raised properly, which are lacking or not possible to be done in Silverlight's core library. Many of our controls also implement ISO-standard user experiences, such as keyboard focus or navigation using arrow keys. You can learn more from my blog post here.
Regarding the key events in ClientUI Framework, there are a number of ways to handle the KeyDown/KeyUp events. You can use the Keyboard class provided in the framework to add KeyDown handler to any objects with type UIElement.
First, attach the key down handler in the page load, see the example below.
Intersoft.Client.Framework.Input.Keyboard.AddKeyDownHandler(textBox1, textBox1_KeyDown);
Then, write the method that handle the delegate, see the example below.
void textBox1_KeyDown(object sender, Intersoft.Client.Framework.Input.KeyEventArgs e) { label1.Content = e.Key.ToString(); }
You should be able to see the keyboard key that you typed to the textbox in the label1 control.
Let me know if that works in your end.
PS: I presumed that you're building on SL 4 app, let me know if you're actually on SL 3.
Regards,Jimmy
Thank you Jimmy, this was a big help. And yes the app is beign built in SL 4 :)
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