Image Viewer swipe vertically - codenameone

Is there any way to make Image Viewer swipe vertically? It would be great to have that functionality. If it's not implemented, is there any chance to achieve this overriding some method from the class?
Thanks

No.
The source assumes horizontal swipe quite heavily and this isn't trivial to change in a generic way as there is quite a lot of other code there to implement things such as pan and zoom.
You might be able to hack something manually that suits your needs based on our source. If you are able to come up with something generic and change the ImageViewer class feel free to submit a pull request.

Related

Best way to draw rectangles via mouse drag in React.js?

I'm trying to highlight areas of an image like how you would on your mac or windows by dragging an area with the mouse in a React.js application.
I understand this would be best done on Canvas, by overlaying the canvas over the image, and then catch the mouse events and drawing the rectangle accordingly, is there a good library or something to do this? because writing raw code to implement this seem to be reinventing the wheel.
Thanks in advance.
Not sure if this is enough to warrant a full answer but I ran into a similar situation and this library is the best I could find:
react-sketch
Admittedly though it seems the maintainer is very unresponsive/not maintaining the package which is a bit concerning.
Hope this helps :)
There are some libraries .
you can choose https://daybrush.com/scena/
and some paid libraries

C Drawing overlay WINAPI

I'm looking for a way to draw an overlay. I want to create a small popup box in the bottom right corner to notify the user. I'm not sure what they are called, but I guess it's kinda like an overlay? I guess the easiest way to do this for me is in the winapi, but I'm not sure how. Anyone has a link I can read with more info, or maybe even code samples? Even the name of these notifications boxes would help so I can google better.
Thanks
don't know if it might help but you can try with sprite layers
http://msdn.microsoft.com/en-us/library/bb194908.aspx
I think these notifications are simply small windows with the WS_EX_TOPMOST style and an effect such as those provided by AnimateWindow().
Or if you don't want to do that much customization, maybe you can settle for a balloon tip from classic notification icons.

What is the difference between "Window" and "page" in silverlight

What is the difference between "Window" and "page" in silverlight? If I want to embed a page/ window inside another page/ window. How can I do that? For example, when an "Expand" button is clicked, if I dont want it to link to a totally new page, instead, I just want it to show a form embedded in the page / window.
Thanks :)
The simplest solution to this question would be to handle the click event and set the visibility property on the elements you want to show/hide in the event handler.
The link that #Robert provided is about "navigation" in silverlight, you can achieve your end goal using it and if you're planing a large application i'd say it's definately something you should look at but it'is a fairly complex subject.
Depending on your current level of silverlight knowledge and the scale of what you're trying to achieve with your silverlight application it might or might be better to take the simpler button click approach.
Take a look at this article. I think it will help you achive what you're trying to do.
http://jesseliberty.com/2008/05/31/multi-page-applications-in-silverlight/

Best practice for panning/zooming a user control?

We currently have a user control which displays a dynamic matrix of other user controls. Since it's dynamic, the view can become large, requiring the user to scroll up/down & left/right in the browser to view everything.
I would like to give the users one view of the user control with the ability to pan & zoom on it, much like the feel of this Telerik control. We own the Telerik controls and I've tried to use the Map control for our purpose, but it doesn't seem like that is going to be a good solution.
I have also placed a Canvas inside of a scroll viewer, and was able to make it pan (using scroll bars) & zoom (using Scale Tranform). This works pretty well, but it's not smooth like the Telerik control is.
So, I'm wondering what other ways there are to do this. Am I overlooking a Silverlight control that would work for me? Any input would be greatly appreciated!
I found this on CodePlex and I like their approach. I will probably be customizing it to be exactly what I want, but it's a good start. Note: It does not implement the 'throwing' capabilities.

Silverlight - How to implement this functionality? Nice feature

I don't know what this is called in SL, but I would like to replicate this functionality. If you go to this site: http://www.mscui.com/PatientJourneyDemonstrator/PrimaryCareAdmin.htm and click on the "Show Details" button located on the top, right-hand corder of the screen. When you click on this, there should be a "Scene Details" button-like feature on the right side. When you click on this, this is what I would like to implement. Can someone direct me please? Either to an online article, etc...
I'm not precisely sure what feature of the site you'r referring to (I'm blind so the description doesn't make much sense to me). However, two useful links - some of the MSCUI source code is available on Codeplex http://mscui.codeplex.com. Also, the Silverlight developer/designer on this project created Blacklight http://blacklight.codeplex.com which includes visual assets to use with Silverlight.
Although I don't know the specifics of the implementation, as far as I can guess, this is done by having a second Grid that follows the Grid for the page. Then, simply change the visiblity on the "guide" grid when the button toggles.
I believe that is simple, although it'll require you to work to figure out the positioning of the underlying page - but it's more flexible. With Blend it'll be easy.
Alternatively you could have a ton of additional UI elements on the page next to their respective controls, and either Tag or name them in a way that you can iterate over them to control visibility and interaction.
I think you're talking about a the grey overlay with a modal window on top. I think the best way to do that in Silverlight 3 is with the ChildWindow control.

Resources