Center title bar caption of Syncfusion WinForms ribbon form? - winforms

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.

Related

How do you design an image for Codename One TouchCommand?

I am 2 days in experimenting with Codename One and Mobile development in general and tested out some basic navigation and features so far. Now I want to work on the look and feel of the app.
I looked at the 9-border vid which was helpful, but not sure of the best way to add an image for the touchCommand that takes 3 tabs on that bar ( Example: home, profile, settings.. Similar to how instagram's TouchCommand is at the bottom of the app).
If I add the image, it does not line up with my Commands.
What is the best way to approach this to ensure the "TouchCommand" image appears as one, but is broken up to 3 parts for each individual commands when pressed, home, profile and settings? I might be asking this all wrong, forgive me as this is all new to me.
Thanks.
EDIT:
This is what was done.
In Theme -> Constants added commandBehavior= bar . This gives the default bar at the bottom. Created in photoshop a new bar 300x80 and added it to the TouchCommand. (See ScreenShot 1). Took this bar and broke it up in photoshop into 3 different buttons for the tab press etc. In GUI Builder, added Home, Profile, Settings in the commands. Added the image to Press Icon for Home and it didnt line up (screenshot 2). Very Frustrating to design layouts. I am hoping there is a much better technique as I am still experimenting with Codename one?
What is unclear to me, is I cant find any documentation on how to approach this and what the dimensions of each image should be as it seems that codename one has issue aligning them. I am assuming the steps would be to create the background image and add the icons as interactive layers for the user. I really care for the image being pressed and changes color like the instagram example. I dont see a way to do this in codename one GUI builder and themes.
EDIT:
Okay, I have decided to use tabs instead of the bar at the bottom. If I add my image to it, I get the results (screeshot 3). Is this the right method to use to accompolish what I want? If so, I dont see a way yet to alter this to become what I want :( .
Plus adding the background, shows one size in the display and looks different in the simulator. (screeshot4)
Answered Here: How do you get ActionBar from SocialBoo theme to show up in your GUI?
Tabs are customized individually so the border should apply for an individual tab to create the background. The foreground element is the icon which you define in the Tabs component itself thru the icons property which allows you to define 3 icons for the 3 tabs (assuming you use the GUI builder). If you add the tabs via addTab in the code you can specify an icon there.

Flood fill text based on a percentage in silverlight splash screen

I want to create a custom splash screen where some text on the page will end up being the progress bar. I need the text to flood fill with color from left to right based on the % loaded. My first thought (since I'm not use to doing this type of UI related stuff) was to have a textblock with the forecolor being trasparent layered over something like a border with its backcolor set and then grow the border control based on the %, but this is such a hack, there has to be something better with all the wonderful things silverlight can do. I had also thought about using a image so I could outline the text, but noticed the image was slow and was the last thing to load on my splash screen.
Any ideas on the right way to acomplish this?

Objective C - wantsFullScreenLayout not covering TabBarController

I've been trying to get a section of my TabBarController to go fullscreen for a while but still can't figure out this 1 last piece.
So I'm able to put the UIViewController behind UINavigationBar using the code below.
self.navigationController.navigationBar.translucent = YES;
self.wantsFullScreenLayout = YES;
Also able to hide the UINavigationBar & TabBarController using the code below.
[self.navigationController setNavigationBarHidden:YES animated:NO];
[self.tabBarController.tabBar setHidden:YES];
However, my UIViewController's height still wouldn't extend behind where the TabBarController is before I hide it. So it looks as though there is a blank space below.
Image attached.
I tried changing self.tabBarController.view.frame and bound. Still doesn't do it. Seems like something is preventing it to cover that bottom portion.
How can I achieve that?
Thank you,
Tee
UITabBarController is not designed to allow its subview to go "behind" the tab bar, probably because a tab bar cannot be translucent. And although [self.tabBarController.tabBar setHidden:YES] does hide the tab bar, it doesn't tell the UITabBarController to lay out your view in the space that is normally occupied by the tab bar. In fact, there is no really supported way to do this.
OTOH, it is easy enough to reposition the tab bar manually if you are willing to risk things breaking in a future version of iOS. The UITabBarController's view has two subviews: one is the tab bar, and the other is the content view (which contains the view from the currently active view controller). Just resize the content view to occupy the space; you could even animate the tab bar moving off the bottom of the screen if you'd like.

How would you implement the MSN "eventlist scroller" in Silverlight

Yes, this might be subjective. I hope it is not closed. It will be an interesting topic. On MSN's web site there is a control that I understand is called an EventList Scroller. There are little left and right buttons that a user can click on that changes the content of images above the little buttons. The images woosh to the left or the right depending on what the user clicks on. This is a fun and entertaining way to display content.
I am wondering what to start with to make such a control.
Expression Studio has a ScrollViewer. I wonder if you can make it scroll horizontally instead of vertically
Couldn't you just adapt code such as this?
http://weblogs.asp.net/fredriknormen/archive/2009/09/18/create-an-automatic-scrollable-image-slider-in-silverlight.aspx

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

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.

Resources