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
Related
Is it possible to add XAML toolbar (instead of native Visual Studio in vsct file) to Visual Studio (in this case Visual Studio Shell)?
I cannot find any examples in the Internet.
I would recommend you stick with using a VSCT resource, to keep your extension consistent with the look and feel of the IDE as a whole.
That being said, there is nothing stopping you from designing a toolwindow or custom designer that hosts XAML based toolbars. Some extenders choose to do this, but the buttons hosted are not VS commands, are not exposed to or discoverable via the Tools | Customize dialog, other extensions cannot automate or programmatically access them, and you lose the built in functionality to control visibility/enablement based on active contextUI guids.
Sincerely,
I'm building a VS2010 extension (vsix) with WPF. Is there any way to reuse WPF style templates from the visual studio itself to make my control look native to Visual Studio?
A the moment I can use expressions for brushes like this:
xmlns:vsfx="clr-namespace:Microsoft.VisualStudio.Shell;assembly=Microsoft.VisualStudio.Shell.10.0"
Background="{DynamicResource {x:Static vsfx:VsBrushes.ToolWindowBackgroundKey}}"
That's not enough, however. Can I apply a style to the whole TabControl or Label?
You can use the the techinqe you mentioned, I found these links (also)
User Interfaces: http://msdn.microsoft.com/en-us/library/bb165108(v=vs.110).aspx
Internal settings query: http://msdn.microsoft.com/en-us/library/bb164716(v=vs.110).aspx
But they don't mention other than the queryable settings, to customize your style alike.
Visual Studio and Blend 4 Design Problem
I have a VS 2010 C# solution file that I am opening in Blend 4. The file opens with no errors, however if I attempt to build it in Blend the program lists a few missing references and then crashes Blend. Here is the issue that I am really trying to solve since I think I can solve the missing references in due course. Once the solution is opened in blend the Design tool for any XAML does not display at all. VIEW >> Active Document View >> Design View, etc. are all grayed out. What is the secret to having a programmer work in VS and hand off solution files for a designer like me to work on GUI in Blend. It seems MS has made this a difficult procedure to master.
It sounds like you created the project using the Class Library project template instead of the WPF User Control Library template. When you put these two project files side by side, you'll see that the WPF User Control Library project has this additional line near the top of the project file:
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
This is what tells Blend it can display a design surface for the items in the project. There's lots of stuff you can make in Visual Studio that cannot be displayed in Blend, so Visual Studio needs some way of communicating to Blend that it should attempt to load designers. Edit your .csproj file to contain the above GUIDs and I bet it will work.
I'm working on a HTML5 / CSS 3.0 / MVC 3 project in Visual Studio 2010. Every time I restart VS and then open a CSS file, it's always set to 'CSS 2.1'. Is there a way to tell VS I want to use CSS 3.0 always (or at least by default)?
BTW, I have looked under "Tools>Options>Text Editor>HTML" - no CSS options, default is HTML5. I have also looked under "Tools>Options>Text Editor>CSS" - no version option as far as I can see.
Thanks,
Michael
I had a similar problem after SP1.
I had to specifically install the "CSS 3 Intellisense Schema" found here -->
http://visualstudiogallery.msdn.microsoft.com/7211bcac-091b-4a32-be2d-e797be0db210
Restart VS and it started remembering what I had set last. HTH
The default CSS schema is defined by the selected HTML schema, but there is no UI to change the CSS schema targeted by the HTML schema. You will have to do it manually by editing the appropriate HTML schema.
To have HTML 5 target CSS 3.0, edit
"\Microsoft Visual Studio 10.0\Common7\Packages\schemas\html\html_5.xsd"
and change vs:cssschema to "CSS 3.0".
Installing:
Web Standards Update for Microsoft Visual Studio 2010 SP1
also makes VS remember CSS 3.0 validation setting.
Web Standards Update provides the much wanted HTML5 & CSS3 support to
Visual Studio 2010 SP1. It brings VS 2010 intellisense & validation as
close to W3C specification as we could get via means of an extension.
The most notable supported features by this extension are:
HTML5 – Video, Audio, Input Type, Drag & Drop, WAI-ARIA, Microdata,
Schema.org Browser API – GeoLocation & Local Storage CSS3 – 2D
Transforms, 3D Transforms, Animations, Background & Borders, Basic Box
Model, Basic UI, Behavior, Color, Flexible Box Layout, Fonts, Paged
Media, Hyperlink Presentation, Line, Lists, Marquee, Media Queries,
Multi Column, Namespaces, Presentation Levels, Ruby, Selectors,
Speech, Syntax, Template Layout, Text & Transitions. It also supports
vendor specific prefixes like –ms, -webkit & -moz.
Download the latest Visual Studio 2010 update at
http://visualstudiogallery.msdn.microsoft.com/a15c3ce9-f58f-42b7-8668-53f6cdc2cd83
"Web Standards Update for Microsoft Visual Studio 2010 SP1" adds CSS3 support and updates the HTML5 intellisense and validation including new JavaScript API's
Installation Notes:
Don't install this update if you have installed your visual studio to a different directory instead of the default directory.
I am a bit confused on how Visual Studio 2010 and Expression Blend 4 operate together. If I want to create a WPF application, should I start it in Expression Blend 4? If so, then how does Visual Studio 2010 natively open Expression Blend projects, or does it?
Or should I start my application in Visual Studio 2010? If so, how do I open my solution in Expression Blend.
Also, how do I modify an existing WPF form, if I need changes. If I already have events handled and code behind, how do I bring it over to expression blend, make my changes, then bring it back to visual studio without disrupting the events and code that I have created in Visual Studio 2010?
Also can someone recommend a good book that covers how to create WPF and/or Silverlight applications using Expression blend 4 and Visual Studio 2010 together.
Solutions are the same for Visual Studio and Expression Blend. You can open your solution through the file menu in expression blend, or by right clicking on a xaml file in Visual Studio and select "Open In Expression Blend".
Personally, when I need to make only a small change, like changing the text on a button, I don't go into Blend. But when I want to see what's going on, with margins and layout and stuff I always use Blend. Most often I have Visual Studio and Blend open side by side and I keep switching back and forth.
Because Expression Blend uses the same solution you don't have to worry about event handlers and such. When they are in place, they stay in place. Unless you delete the control the event is attached to of course.
Creating a solution can be done in both tools, but I start most projects in Visual Studio. There are however a few Project templates that can't be found in visual studio. For example the Databound Application project type. This will give you a start on an MVVM project, with folders in place for the Model, View and ViewModel.
You can have it open in both Visual Studio and Blend at the same time. You're prompted in Visual Studio if you make a change in Blend and vice versa.
Personally I create the new application in Visual Studio first then open it in Blend.
I usualy start my project in Blend.
Remember Blend is specially designed to make great UI, easy databindig, make easy templates and custom controls.
You can edit the code behind of your app directly in Blend but sometimes it doesn't show the intellisense; thats when you need open VS, to do that right click on your project inside blend and click on edit with Visual Studio. It'll launch VS and you can start coding.
You dont need to close VS or Blend, they booth can be open, if you make some change in VS it will notify Blend, will appear a dialogbox telling you: reload the app, click Yes the changes will be sincronized in Blend and VS, the same happens when you make changes in Blend and go to an already open instance of VS.
Too remember to install de VS tools, it will allow you to open Silverlight projects inside VS, if they arent already installed an error message will appear.
Hope my answer help you