Reuse of Lightswitch visual query designer - sql-server

We are building application with ability for users to extract data without typing SQL queries. LightSwitch query designer looks user friendly.
Is it possible to reuse (embed) LightSwitch visual query designer into .NET application?

No, you can not reuse that editor (which is part of visual studio) in the Silverlight or HTML app.
However, there's a filter control extension available that might fulfill the same needs. See Michael's post for some screenshots & guidelines: http://lightswitchhelpwebsite.com/Blog/tabid/61/EntryId/22/Using-The-LightSwitch-Filter-Extension.aspx
Keep rocking LS!

Related

Split 'designer' and 'source' windows on VS2017 Xamarin?

I'm starting to develop apps on Xamarin, with Visual Studio 2017. As on WPF, there is a 'designer' window for the axml, with the view of the app itself, and a 'source' window with the xml describing the view.
My question is - can I split the windows so one will be above the other, just like as in WPF? Right now I can either view the designer or the source window.
Below are the wanted situation, and the current one. Thanks!
As far as I know, there isn't support to achieve that in Xamarin.Android on Visual Studio 2017.
Event if you try to use the split view and place the design in your left side you can't put the source in your right.
I know it could be overkill but most of the times I use Android Studio to draw my layouts. Since it support viewing the source and designer.
The split view designer feature for Xamarin Android has finally been added in the VS 2017 version 15.8 update. Here is a link to the release notes.
https://learn.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes
Android Designer Split View

When to use Blend for a WPF developer?

I'm a WPF developer and use VS Pro 2012 everyday for UI adjusting and coding. I installed Blend for Visual Studio but I never used it (just launched it by accident several times).
I'm afraid that I missed something by not using Blend. If I did miss something, what is it then?
Blend lets you design WPF UI, create controls and determine their behaviors visually (by UI), and Visual studio lets you do that programatically.
There is nothing you can do in blend, that you can't do in visual studio.
It is a tool for people who are less comfortable using code, and more comfortable using a cool UI to create custom controls and behaviors and design thier UI
In Visual Studio 2012 and later, the WPF UI designer is Blend; it's actually loaded in the background and accessed through out-of-process COM interfaces. This is part of the reason its behavior can be a bit bizarre at times, why you get messages about being able to edit the XAML while the design surface is loading.
If you're used to VS form builders you're going to be fine with Visual Studio.

How to Design a WPF Flow Document

Im making an wpf application and i need to generate reports and then to print them. I am using CodeReason.Reports library but it is very dificult to me to design the reports with out a designer.
Any one knows if there exist any Flow Document designer, or if there is any way to design it from blend?
Thanks
I don't know the library you are talking about, but I used WPF for creating some report, let's say a minimal report engine, so I think I can give some suggestion to you.
First, learn XAML. Visual studio has a good designer, but I use it just to see what's happening: writing XAML with the good Visual Studio intellisense is much more productive. I can't suggest how to operate with your lib, but with my strategy the document pages are wired by the engine in code, content are produced by user controls: they just live very well in VS designer. I also used an MVVM library to develop in a an code free view way.
So what I learn in y WPF experience: it is a great and powerful environment, you can present thing the way you want, but don't look for a cutting edge designer. The WPF designer is XAML, mastering it is necessary.
I used flow documents in a regex tool I created. I ended up creating a programmatic wrapper over the flow document library which once done was easy to use because it had my target look and feel.
No, AFAIK there is no design tool for flow documents nor does Blend support it. Create a document and provide a wrapper which speaks to that design is your best option if you use flow documents.

Render Excel Chart in WPF application

I have created couple of TFS Report in Excel by right clicking a query (Bugs query) and selecting "Create report in Microsoft excel" option. By doing this it has created a Graph.
I want to embed this Graph in WPF application.
As this is a dynamic report which will change in time as the numbers of bugs gets fixed during the day graph will change.
So it it possible for me to integrate a TFS report graph in to WPF application?
In essence you are asking how to embed excel in a wpf application like mentioned on http://www.codeproject.com/KB/office/Embedding_Excel.aspx.
However, using the reports and/or filling the wpf graphs using the tfs oom will be a lot faster to build an easier to maintain. It might even be wiser to just drop it on the SharePoint server (if it runs excel services) and serving it from the browser (instead of a wpf app) or as a dasboard.

Retrieve baseUri w/o resorting to Application.Current

My custom controls are not loading in VS.NET's designer because of a null reference exception. It's got everything to do with the way I am retrieving the baseUri of the application when it runs in the browser:
_uriPrefix = Application.Current.Host.Source.AbsoluteUri.Substring(0,
Application.Current.Host.Source.AbsoluteUri.IndexOf("/ClientBin")).Trim();
According to the exception details and the help file I'm directed to (here) I'm not correctly designing my app for a runtime that's not the browser (i.e. the new WPF editor in VS.NET or Expression Blend).
So, the question is how do retrieve the baseUri (the http://localhost:#### part of my application) if I can't use Application.Host which apparently is null during design time? is there a safe way to do this so I can load my custom controls in a designer?
To eleborate on the problem and solution (i wasn´t finished writing it when you posted your own answer)
Your problem is the runtime context you are in.
When your page is run as on a ASPX.Net page, your are hosted by the IIS->ASP.Net pipeline. This application will give your the HTTPContext and your Application.Current is refering to the W3WP.EXE process in which the ASP.Net pipeline is serving your page.
When your page is displayed in the MS Visual Studio designer it does not provide this HTTPContext since there is none. The request to render your control did not come through an HTTP request, but the Visual Studio designer running inside Visual Studio.
To have your control be displayed correctly during design time, you´ll have to add ´design time support classes´. There are a number in the .Net framework you can use directly, but for custom serialization (writing the server ASP.Net tags or rendering a HTML preview with styling) you´ll have to put in some more effort and write your own designer classes.
Hope this helps,
Duh! I hate/love when I do this. I'm answering my own question (again). I can use the DesignerProperties.IsInDesignTool boolean to test if I'm in design mode or not:
if (!DesignerProperties.IsInDesignTool)
_uriPrefix = Application.Current.Host.Source.AbsoluteUri.Substring(0,
Application.Current.Host.Source.AbsoluteUri.IndexOf("/ClientBin")).Trim();
Now I can view my custom control in the new VS 2010 editor. Yeah!

Resources