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
Is there any guidance for arranging window objects in the UXDesktop (either the built-in arrangement, or a custom form of arrangement)?
I'd like to provide a rich experience for my users to be able to arrange their windows in multiple different ways.
If you wish to apply the ArrageLayout command, the same method provided in this thread could be applied to this scenario as well.
Any ideas?
Chris,
The UXDesktop has built-in arrangement that use "cascading" implementation by default.
It's very possible to implement your own built-in window arrangement since the arrangement was implemented "loosely coupled" using commanding.
The window arrangement is generally executed under WindowCommands.ArrangeLayout command. So if you have additional implementation, or wish to override the default implementation completely, you can do so by adding a command binding to the ArrangeLayout command against the UXDesktop instance (or static class handler).
Then you implement your custom arrangement logic in the CanExecute and Executed handler of the command binding, and simply set e.Handled = true to override default behavior.
Using this approach, all arrangement commands (invoked either via API, commanding or internally in UXDesktop), automatically redirects the window arrangement logic to your new implementation.
Hope this helps,Jimmy
I was trying a similar thing with capturing the Close command and couldn't get it to work. I posted this question on the Developer Network. The same concept applies to this. See my question and sample code below:
I'm using the UXDesktop control bound to an ItemsSource to generate my UXWindow objects. I need to be able to handle some of the commands fired by the windows such as Close, Minimize and Maximize. I've tried the following, but it doesn't seem to capture the Close command when I click the close button of the UXWindow object. public partial class RootView : ViewBase { public RootView(RootViewModel viewModel) : base(viewModel) { InitializeComponent(); CommandBinding windowCloseCommandBinding = new CommandBinding(WindowCommands.Close, HandleWindowClose); // Create the CommandBindingCollection to hold the command binding CommandBindingCollection bindingCollection = new CommandBindingCollection(); bindingCollection.Add(windowCloseCommandBinding); // Set the binding collection to the layout root CommandManager.SetCommandBindings(this, bindingCollection); } private void HandleWindowClose(object sender, ExecutedRoutedEventArgs e) { } }How can I capture and handle the commands fired from my UXWindow objects in my UXDesktop?
I'm using the UXDesktop control bound to an ItemsSource to generate my UXWindow objects. I need to be able to handle some of the commands fired by the windows such as Close, Minimize and Maximize. I've tried the following, but it doesn't seem to capture the Close command when I click the close button of the UXWindow object.
public partial class RootView : ViewBase { public RootView(RootViewModel viewModel) : base(viewModel) { InitializeComponent(); CommandBinding windowCloseCommandBinding = new CommandBinding(WindowCommands.Close, HandleWindowClose); // Create the CommandBindingCollection to hold the command binding CommandBindingCollection bindingCollection = new CommandBindingCollection(); bindingCollection.Add(windowCloseCommandBinding); // Set the binding collection to the layout root CommandManager.SetCommandBindings(this, bindingCollection); } private void HandleWindowClose(object sender, ExecutedRoutedEventArgs e) { } }
How can I capture and handle the commands fired from my UXWindow objects in my UXDesktop?
That looks like a good solution for handling the layout arrangement, but what fires that command by default?
By default the command will be called when a new window is opened or upon invoking RearrangeWindows method in UXDesktop
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