Is it possible to display a modal window in SCSF application at the center of the screen - cab

In SCSF application I would like to display a view as a modal window at the center of the screen. Is it possible to do that?
WindowSmartPartInfo doesn't have any option for setting screen postion.
Thanks.

Assuming you're talking about Winforms, not WPF since the WPF layer for CAB does expose this option. In winforms there is no option in the WindowSmartPartInfo to do this. However, you could extend it and extend WindowWorkspace to use your new SmartPartInfo (override the OnApplySmartPartInfo method).
Before you do this, you might want to check the contrib and community sites to see if anyone has already done it. I think I've seen one somewhere.

Related

Windows 8 Image Slider

Is the image slider that the Windows 8 Camera app uses available as a control within the framework? It has nice transitions between images and provides previous and next buttons.
There is callisto refernce in nuget there you can find flipview like windows 8 app store
There is a FlipView control if you are referring to that.
You have some similar controls already built-in, such as FlipView if you want the previous and next buttons.
But if you want all the features in the image gallery application (with zooming capabilities), you will have to create your own component. I did, and it was quite painful, but sadly I did not have the time to package it properly to share with the community. Maybe someone else did it.

XCode - Create an application without a window and paint directly on screen

I'm searching now for a while but can't find an entrance…
The application should behave like a ruler app which is always in front of all apps and does not have a window. I want to draw things directly on the screen.
Would be great if someone could help me out with some keywords to search for or a concrete step into.
Thanks in advance.
Create a borderless transparent NSWindow and draw your content inside it. There are many examples for creating those around.
Use setLevel: to control how the window floats over other windows.

Creating a custom NSWindow interface

I am trying to create an instance of NSWindow that has a style similar to that of Pixelmator, pictured below:
http://ideaorange.com/files/2010/12/pixelmato-sprinklebig.jpg>">
Basically, I would like to know how to create a window similar to that style, with the black title bar. Would I have to write the entire window out in code? Or is it possible to do in interface builder? Much appreciated.
The HUD appearance is what you're looking for. Note, however, that it only applies to panels (like Pixelmator's palettes), not standard windows (such as document windows). It also does not apply to controls, such as buttons; Pixelmator's are undoubtedly custom.
This tutorial is a good place to start: http://cocoawithlove.com/2008/12/drawing-custom-window-on-mac-os-x.html
There's a load of work involved in developing your own windows so be sure you're up for the challenge.
And another note, be sure to review your code against Apple's AppStore policies, as some of the window theming examples out on the web do use private API's which Apple won't approve for distribution through the app store.

how to make an NSWindow blocking other Windows?

i'm looking for a way to have a NSWindow, which is able to block other NSWindows, like the menubar does. I mean: It is not possible to drag a Window over the menubar.
Is that kind of behavior realizable for my own NSWindow?
Thanks in advance
Bijan
NSWindow's dragging behavior automatically keeps windows from going under the menu bar — because they aren't supposed to. If you have some special case, you can override the standard dragging behavior. But think carefully before throwing away standard functionality prescribed by the HIG.
Also, it isn't possible to drag a window over the menu bar (rather than under) unless it's also over everything else, because the menu bar is normally above every other window.
I just stumbled on this question. There they say it is possible to move other windows using the Accessibility API or the Quartz Window Services.
Can't I just read out the other window's positions and move them, so that they do not collide with my window? Maybe triggered by a 0.1 sec. timer?

How to create a Controller to simulate the Springboard feature of the iPhone within your own application

I am trying to design a feature in my application for the iPhone that simulates the Springboard feature (Main menu of the iPhone that allows you to view more apps), or the way Weather application works that allows you to flip between views.
Does anyone have any samples of this how I would go about doing this. It's seems very trivial but I am wondering if I am missing something that is already available either as an Apple example or someone who did a tutorial on this.
The image below show how the user would use it.
alt text http://www.agilitesoftware.com/SpringboardExample.png
As they slide their finger to the right (or left) the other image would begin to show up. And it would animate smoothly. The faster you swiped your finger the faster it would move to the next view.
Update: The other feature is that it should mimic the same feel when you slide your hand across the display that is snaps to the current view into place. It should not keep sliding across if there is more than 1 view to the direction you swiping your finger.
I've seen other applications use this so that is why I am asking.
This is accomplished using the UIScrollView with the pagingEnabled property set to true. Just add each of your views, adjust the contentSize, and it will automatically "page" to the width of the screen across the content.
There is a sample app (with code) with exactly this functionality on the iPhone developer site on Apple.com (I believe it's called "PageControl".) - I'd suggest checking it out.
d.
I'm writing an app that uses a similar UI. As NilObject recommended, we're using a UIScrollView with pagingEnabled=YES.
You may also be interested in this example code involving just two child views. I'm trying it out now; it's an interesting technique but I've had to write some additional special-casing code for some odd situations that resulted.
There's also another question on this site that asks about creating a grid of icons like the home screen.
I would check out Joe Hewitt's code from the Three20 project for this. It provides a nice interface and further refinement of the UIScrollView implemented as TTScrollView and TTScrollViewDelegate, TTScrollViewDataSource.