Tab Control In WinRT WINDOWS 8 C# - c#

I am New To windows 8 App Development. I am creating one Windows Tablet Application in Visual studio express 2012 for windows 8. Is it possible to run this app to tablet because i am developing application in visual studio 2012 for windows 8???
I want to add Tab Control to my app like Windows Phone 7 & 8 supports pivot control like i have attached one image here. i want to add same controls in my app as image shown.
one tab control and into each tab there is another tab control. how can i add it to my app?? please help me

I'd recommend switching to Visual Studio Express 2013. 2012 should work for 8.0 though. There is no tab control in WinRT XAML. There is a grouped GridView or Hub control that serves similar purposes though. If you'd rather go with the more classic Zune Software-like tabbed interface - you should put a bunch of restyled RadioButtons in a horizontally oriented StackPanel like here and a few overlaid Grids underneath, then switch visibility of these panels based on the checked RadioButton.

Related

Windows Universal App windows 10 menu

I am creating a Windows universal app but can't find out how to create a menu like you can find in the groove music app on windows phone 10.
You can create menus like these with the Splitview control. It was introduced with Windows 10. See Docs here:
https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.splitview.aspx
Little hint: The Button on the upper left to show and hide the menu is not part of the Splitview control and has to be created manually.
You can find this Menu in several samples including mine on github:
github.com/DanielMeixner/w10demoking/
Take a look at this awesome tutorial from Jerry Nixon:
Implementing an Awesome Hamburger Button with XAML’s new SplitView control in Windows 10

How to implement drag and drop in c# windows metro app?

I'm developing a metro app for windows store in Visual Studio 2012 using C# and XAML
I want to allow a user to drag a button from a selection and drop it in a specified area.
See the following:
http://social.msdn.microsoft.com/Forums/windowsapps/en-US/53a42865-6e96-4439-85dd-5e90e0ec8512/drag-and-drop-in-metro-apps
Use a grid template and set CanDragItems="True" CanReorderItems="True" and AllowDrop="True".
A comprehensive guide can be found here:
http://blog.jerrynixon.com/2013/06/walkthrough-reordering-items-in.html

Why doesn't WPF show Windows 8 style buttons in Windows 8

This is a Windows 8 style button:
And this is a button in .NET 4.5 WPF app:
Any ideas why WPF doesn't show the native Windows 8 style buttons? Is there a way to fix this?
What you can do is use a custom WPF styling from HERE.
Below is a screenshot of the styles as applied to the same WPF application in multiple states. The top is obviously Aero themed, and the bottom set is with the newly applied styles.
And here is a link to the XAML.
WPF does not use any native Windows controls - it comes with its own controls and styles for different Windows versions. On Windows 7 you can find the following assemblies
PresentationFramework.Aero.dll
PresentationFramework.Classic.dll
PresentationFramework.Luna.dll
PresentationFramework.Royale.dll
and I guess there is a new one for Windows 8. Because WPF is not build upon native controls it is possible to have a XP-style WPF application on Windows 7 and a Windows-7-style application on Windows XP.
If you want to match the native Windows 8 UI better than what WPF offers out of the box, you will have to create your own styles - probably based on the styles provided by WPF.

How does Visual Studio 2012 draw its window border?

How can I achieve the same alpha border effect that can be seen in the new Visual Studio 2012 main window using windows forms? Its window seems to glow.
So I am not sure if it is the best method, but if you use Spy++ (32-bit) and you look in the windows, you can see that beneath Visual Studio's main window, you can see 4 "VisualStudioGlowWindow" objects.
I hooked the messages in Spy++, and as you could imagine, the 4 windows represent the 4 glowing borders around the form. Further inspection shows that these 4 "glow windows" implement the WS_EX_LAYERED Extended window style, so the glow itself isn't done in WPF (as far as I can tell.)!
Hopefully this clears some stuff up.
AFAIK you can do it with WPF using a mix of this chrome and a custom WPF border. Not sure if on WinForms you can, given it's limited styling options (compared with WPF). Anyway they are using WPF.
Unless you want to handle drawing the entire form yourself you cannot. Because Visual Studio 2010 and Visual Studio 2012 are written on top of WPF and used Windows not Forms.
Visual Studio 2012 draw its window border using native Win32 functions. It is not related to the WPF or WindowsForms -- you can do it with both.
The glow is rendered on a transparent window on top of the main window. The main window calls the DWM API to set the glass area to 0. This way you can draw over the original border and the system buttons. This is the correct way to do this.
You can look at code of WPF Shell (http://archive.msdn.microsoft.com/WPFShell) to see how the calls to DWM are made in order to remove the glass. The fact that its written to be compatible with WPF doesnt matter, because all you need is a handle (IntPtr) to the window.
If you have a WindowsForms codebase, don't migrate to WPF. WPF has not been improved in the latest .NET framework release and there are no roadmaps to improvements or new features as its team has been integrated into Windows 8 team.

How to run Windows Mobile application in full screen mode?

I have a Windows Mobile application developed with Visual Studio 2010 and C# (Smart Device Project). When I run the application there's a start menu bar visible on the top and keyboard bar on the bottom. How can I make my application run in full-screen mode?
If possible I would like to have a solution that will allow me to turn full-screen mode on and off on runtime (after clicking some form button for example).
(Assuming the question is about Windows Mobile and not Windows Phone.)
On Windows Mobile if you want to hide parts of Windows that normally can't be hidden, you have to hide them with P/Invoke. There are plenty of questions like this already answered and some other resources too. And of course you can call the P/Invoke from an event handler.

Categories

Resources