The inclusion of DataGrid and DatePicker controls was announced for WPF in Framework 4, but when I access to Visual Studio 2010 and I create a WPF project, I don't get these controls. What did I miss?
Thanks.
I hope I understood your problem, so here we go...
Instead of the DataGrid you can use the ListView with ListView.View set to a GridView. After this you have to create a couple of GridViewColumn objects, set their binding and then add them to the GridView.
I have an example of doing this (but i don't think it is the best one, because i'm kind of new to this programming stuff). If you want I could post it here.
Have you made sure the target Framework is set to be v4? They should "just show" in the toolbox if you're targeting v4 of the framework.
Related
In Visual Studio versions prior to VS2019, .NET framework 4.7.2, if you wanted to design a MenuStrip, you just added the MenuStrip to the form and start typing the ToolStripMenuItems. Like this:
I've recently moved to VS2019, and started to use .NET 5. If I add a Menustrip, I get an empty strip, which seems not easy to edit (I colored the background of the main form, to clearly see the white menu strip)
My question is: how to add ToolStripMenuItems?
I see the little arrow on the right, and I can select Edit Items, but to add a menu that way is quite cumbersome.
If I open an old solution in VS2019, I can edit the menu as I used to do. So it's not VS2019.
If I create a new VS2019 project using an old .NET version, I can't edit the menu, so it's not the .NET version
If I copy paste InitializeComponents from an old project to a new .NET 5.0 VS209 solution I cannot edit the menu
So, how to edit the menu? Is edit items really the proper method to edit your menus from now on?
I believe that the MenuStrip editor experience difference comes down to .NET Core vs .NET Framework.
Edit: .NET 5 = .NET Core vNext
We covered MenuStrips while we were doing WinForms in my C# class and this exact question came up. .NET Framework solutions allow you to use the convenient editor as you have demonstrated. .NET Core solutions do not.
The easiest way I found to build out my MenuStrip items when in .NET Core was to click on the menu strip, then there is a property called "Items" which is a collection. In the properties pane, you can click the three dots button to bring up the Items Collection Editor:
Here you can create new ToolStripMenuItem objects to build your menu.
Possibly related post, others suggesting this is a Core vs Framework issue: MenuStrip not allowing to create menu
This issue has been fixed
in Visual Studio latest release v16.10: 05/25/2021 (https://learn.microsoft.com/en-us/visualstudio/releases/2019/release-notes). I have tested this both in net 5 (current) and net core 3.1 (LTS).
Demo:
https://youtu.be/3s55hWrHx4U
You might have used the option that says "Windows Forms App."
This is wrong. You should use "Windows Forms App(.NET Framework)." This will let you edit the menuStrip control the easy way.
Now i am going on with the development of xamarin forms pcl project,i have created a xaml file in my portable lib there i can't view the design.
Tried to fix it by the following link:
https://msdn.microsoft.com/en-us/library/hh921077.aspx
http://blog.spinthemoose.com/2013/03/24/disable-the-xaml-designer-in-visual-studio/
How can i solve this issue.
There are no designer support from Xamarin, as it would be bit of complicated, but you might find Xamarin Forms Player a good tool to go,
https://visualstudiogallery.msdn.microsoft.com/4ed9794a-2021-486a-9bca-4851c7ee7316
Visual Studio's XAML Designer currently does not support Xamarin XAML files.There's no designer for it atm.
Even though their syntax are very similiar , there are some slight differences between them.
how well can LightSwitch work together with Blend? I saw in some videos that you can use custom Silverlight control in LS and naturally I can create them with Blend.
But can Blend in itself be used to customize the screens of a LightSwitch application? It seems LS doesn't use Xaml but puts all screen in an application.lsml file which is invalid for Blend. Is there support coming here?
Thanks in advance.
No. You will never be able to customize the LightSwitch 'Screens' in Blend, because as you have seen, they live inside the application.lsml file. If you build a Shell Extension, you could use Blend to do the basic layout, but most of the work is in C# or VB. For a Theme Extension, you could certainly use Blend to edit the Theme Visusl Pallette Resource Dictionary. See this link for the a cookbook guide to building the various types of LightSwitch Extensions: http://blogs.msdn.com/b/lightswitch/archive/2011/03/16/lightswitch-beta-2-extensibility-cookbook.aspx. There is also now an accompanying Visual Studio project template available for Beta 2.
LightSwitch works fine with Expression Blend, but only for custom Silverlight controls (Expression Blend will throw an error that it can't load any LightSwitch projects that are part of the solution, but it will load any Silverlight control projects).
You cannot edit any of the automatic LightSwitch UI, but you do not have to use any of the standard LightSwitch UI if you need changes.
I would recommend creating Silverlight custom controls not LightSwitch extensions, the difference is that a control extension has a design-time experience in Visual Studio and is MUCH harder to create (Silverlight custom controls are actually very easy to create).
See this article for an example:
http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/2/Creating-A-LightSwitch-Custom-Silverlight-Control.aspx
Hi all i am new to wpf in vs 2010 .I cannot find it in the toolbox when i select choose item and in .net components it is already checked but it is not there in the controls list.Any idea how to add it?
You should simply create a BackgroundWorker instance in the code-behind.
Backgroundworker is not a WPF component, so you won't see it in the toolbox.
You have to create one in code-behind; import System.ComponentModel.
I'm a noobie when it comes to VS, specifically VS 2010. I'm trying to learn MVC 2.0. If you're developing a pure MVC project, it seems like most of the toolbox is not useful. Shouldn't the IDE hide controls that aren't useful? Specifically, I'm looking at the AJAX extensions like Timer and UpdatePanel, but it seems like a lot controls more would require postback.
alt text http://www.freeimagehosting.net/uploads/6c63317805.jpg
You are correct.
The ASP.NET WebForms controls in the Toolbox are pretty useless during ASP.NET MVC development. While it may be pinned by default, you can choose to hide it from the 'View' menu.