Silverlight Guidance - How to do this from Telerik? (reference attached image) - silverlight

I really like a certain Silverlight feature that I've seen in a couple of sites. I would like to know what this "concept(s)" is/are so I can do more research and implemented it on my own. If you see the attached image, I like those expandable sections, reference (1) and (2) sections. They are circled in red and the features that I like are green and expandable.
For a live demo: http://demos.telerik.com/silverlight/#DataPager/FirstLook
Thanks for any advice.

Judging by the screenshot, it's just a collapsible pane. Such a control would have an API allowing two pieces of child content to be supplied, an orientation to be set (horizontal/vertical), and perhaps a collapse direction (left/right or up/down).
The control's template would place each piece of content alongside the other with a separator in between. Clicking the separator would collapse one piece of content in the chosen direction, thus giving the other piece of content more room.

Related

Silverlight 4: how to highlight control on mouse over

My aim is to get fine control "animation" when it is mouse-over-ed. For example, I have a "map" of controls (game map that represent different type of terrain), each of them is an image with trees/rocks/hills on the green grass or water (lake or see) image of blue/cyan color. When user point any image with mouse it should get shiny: either get more bright background or get a shiny border.
It is hard to say what exactly I want to have (either background change or border), I would like to try each of them and see what is the most appropriate for me.
I am going to have a custom control (MapTile) that will represent a map tile. I know how to catch MouseEnter/MouseLeave events, but not sure how to change control style and if it is a good idea to work with control style in CodeBehind, probably there are better XAML-based solutions.
Could you please help with a solution that provide few goals:
Goal1: Add highlighted border around the control (it will be squares/rectangles, or circles; use what is easier) on mouse enter, remove border on move leave;
Goal2: Change some properties of my CustomControl (for example, background color).
Thank you very much!
1. How to han
You might find it easiest to get hold of Expression Blend and use it to create a custom template for your control.
The Learn Expression Blend page would be a good place to start. Look for tutorials on customising buttons and this is the same sort of thing that you want to do.
You need to use an attached behavior on your control. You don't need to learn Blend for this.
Check this one as an example, but you can search the site for Mouse Over for other examples.
http://gallery.expression.microsoft.com/en-us/MouseOver3D

How to achieve rotating form effect in wpf

I would like to make a rotating form WPF effect like the one in the norton antivirus 2010.
The effect is a rotating form that changes the contents when the other side is shown. But the axis is not in the center of the form but moves from side to center and back. Like a three step effect.
The rotating form can be seen at 8' 07" in this video: http://www.youtube.com/watch?v=A3hHPdgi9Nk&feature=related (I'm sad but this was the only video I found on YouTube)
Thanks.
Have a look at the Thriple stuff on CodePlex: http://thriple.codeplex.com/
It's almost exactly what you're after.
Hope this helps.
I did not examine the details, but I know that Microsoft's patterns & practices team also uses a similar animation in their "StockTrader Reference Implementation" for the "Composite Application Guidance". They sub-classed the TabControl and added some animation to it. I think the relevant code parts can be found here:
AnimatedTabControl.Desktop.cs
Generic.xaml
just verify this link. It has code as well as the Sample.
From the Sample take the TransitionPresenter link from the left panel and choose the 3D Rotate item from the listbox. Then select the images from the top list. You can see the same effect in the video. I saw some initial sanp of the video and may be this link can help you.
http://bot.codeplex.com/

Center title bar caption of Syncfusion WinForms ribbon form?

Is there a way to center-align the text in a WinForms form? Also known as the title bar caption or title bar text? So far the only way I can see to do it is pad the string with spaces. I am setting the title bar caption using the Form.Text property.
I should add that I am using a 3rd party ribbon form, so the app looks like a Microsoft Office 2007 application. And those apps center-align the text, presumably because when the text is left-aligned it gets added to the jumble of buttons on the top left and looks bad.
Honestly - don't. Windows users expect certain things to work in a certain way, and this would not meet standard practices. Not to mention that the button in the taskbar would then no longer show the titlebar text as it would be pushed to the right.
You can take over the non-client area of a form completely, in which case you can do what you like. Even if you did this, though, my recommendation for your design would be to have the title at the top left, close button at the top right, etc.
For anyone who is interested, I am using Syncfusion Essential Tools. The solution is this:
this.ribbonToolbar.TitleAlignment = Syncfusion.Windows.Forms.Tools.TextAlignment.Center;
The title alignment is a property of the ribbon toolbar and not of the RibbonForm, which explains why I didn't find it before. Thanks to all who responded.
The title bar is rendered by the system and there is no option for centering the text.
In order to effectively center, you'd need to draw the title bar yourself - this can be done in native code by handling WM_NCPAINT messages and such but not sure how this can easily be done in .NET.
But why do you want to change? Windows UX standards have the text left aligned.
I don't believe you can.
You could hide the title bar, and replace it with a user control and implement the same functionality a title bar has, but I don't think that would be a good idea.
Consistency for the user is probably more important than whatever reason you have for wanting to center the text.

Custom scroll layout with fisheye in WPF

I know Windows Forms quite good but I'm new to WPF.
I'd like to create application similar to RSS reader - in main window every note will be displayed in Post-it like frame and all notes should be chained and scrollable up and down. I also want to include kind of fisheye view - single note will be displayed full size in the centre of the screen and will shrink and rotate on the edge.
I know custom control, transformation and databinding concepts but I'm not sure how to handle displaying and scrolling notes in the main window. The questions are:
what is the suggested way to arrange, display and scroll ordered chain of notes?
should single note discover own position on the screen or it should be notified by it's container?
how in such solution provide feature which will open related notes as a "multiple popups" notes connected by a line with original one? (like traversing correlated results in Google Wonder Wheel, adobe flash there)
are there any standard solutions for displaying and manipulating (moving, attaching, collapsing) such popup-widgets?
If there are any similarities in your proposal to other GUI frameworks (Forms, Swing, SWT), comparison are welcome too.
Thanks in advance!
It seems to me you are describing a "carousel control" or "element flow" or "cover flow". I've put some links at this answer.

Is this a good case for use of RoutedCommand?

I have a WPF page that has 2 ContentControls on it. Both of the ContentControls have an image, one being much smaller than the other. When mouse over the larger image I want to show a zoomed in view on the smaller image. Something very similar to this: http://www.trekbikes.com/us/en/bikes/urban/soho/soho/.
I think I want the larger image control to send out something that actually contains an image - which the smaller image control would pick up and display. Would this be a good place to take advantage of RoutedCommands? Can I pass along an image like that?
RoutedCommands seem a bit misplaced in this case... you'll want the mouse to respond smoothly and the last thing you want are commands to be fired off here and there.
You're probably better off using a VisualBrush. While Ian Griffith's example here is a magnifying glass (an early canonical VisualBrush example in WPF) you could easily adapt it to show a portion of your image.

Resources