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

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

Related

Controls missing in UWP application

(I am new to UWP environment)
There are missing controls under the toolbox menu in VS 2022: I cannot find labels, tab controls and many other items I would use.
Thanks in advance
UWP does not support controls from WinForms WPF and other
Instead of a label, you could use a TextBlock.
This is the new UWP tabcontrol you could use:
https://learn.microsoft.com/en-us/windows/apps/design/controls/tab-view
You can also check out the WinUi 2 Gallery. Every UWP control is listed there: https://apps.microsoft.com/store/detail/winui-2-gallery/9MSVH128X2ZT
As #FrozenAssassine mentioned, UWP development is different from the traditional desktop app development. The controls are not the same as those you used to use before. The link he provides is really useful.
In addition to his answer, as you are new to UWP development, you could also go through this document: Develop UWP apps. This document could help you start the UWP development.

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 can I get a date from the user in Windows Phone?

I should get a date from the user inside a WP 8.1 app, I need something like the DateTimePicker which I use in Windows Forms or the DatePicker of WPF environment, do you know ho to do this?
I tried to search something similar to DatePicker in windows phone but I can't find anything!
My app should get this date to generate a fiscal code, so I need to get the user's birthday.
Is there any tag to add to my xaml file?
Thanks a lot guys!
I think this will solve your problem!
<DatePicker x:Name=birthdayDatePicker Header="Birthday Date"/>
The question is what kind of WP 8.1 app you're developing? Windows Runtime or Silverlight? If the first one, then you can just use DatePicker control, because it's built in.
But, if your app uses Silverlight, then you have to import Windows Phone Toolkit first. You can do it easily: right-click on your project name in Solution Explorer, then choose Manage NuGet Packages.... Type wptoolkit in a search box and you will find Windows Phone Toolkit. Just install it. Now, go to you XAML code and add toolkit namespace:
xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
Now you can add DatePicker to your layout:
<toolkit:DatePicker Header="Birthday date"/>

How can I create a nested TreeView for Windows 8.1 app?

How can I create a nested TreeView for Windows 8.1 app , data will be bind at runtime using C#? There is no Treeview Control in Windows 8.1 Development.
It's not recommended to use TreeView on Windows 8, the default style of hierarchical navigation on Windows 8 is by clicking items and using the back button to browse back (although Microsoft use TreeView on Microsoft official apps (for example Mail App) .
If you still want to use TreeView, There is a TreeView control in WinRT XAML Toolkit.

Tab Control In WinRT WINDOWS 8 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.

Categories

Resources