No "Edit sample values" icon in Blend 4 - blend

I have a random problem that I can't seem to fix. I don't see the "Edit sample values" icon in my sample data in Blend. It's normally there, but for this project it's not.
I'm just wondering if anyone else has had this problem and if there's a setting or fix?
I can of course still edit the data in the XAML, but it's nice to use that interface.
Fine Details:
XAML based sample data source
Created through the interface in Blend
Tried recreating the data source
Happens on two different data sources
One is bound to a view, the other is not
Thanks in advance!

Related

VB.NET RowCount not an accessible property of DataGridView? [duplicate]

I am using VB.NET in Visual Studio Community 2017. I noticed that in some cases the list of available properties and methods for an object is incomplete.
One example can be seen here:
As depicted, I want to use the RowCount property of the dgv object, that is of type System.Windows.Forms.DataGridView. You can see, that right above it the property is there and working fine, I can just type it by hand. It just takes a second or two, before the background compiler (for lack of better term) acknowledges it as correct. The behavior messes up the typing flow, since often IntelliSense autocorrects what it perceives as typos.
Note: This is not exclusive to the shown property. I noticed it for other examples, and also in function calls and other random places, but I could not find a clear methodology of what is missing and what isn't.
Looking around I found e.g. this question, however it deals with a completely different problem.
Is this just a bug in Visual Studio (and if so, is it reported somewhere?), can someone confirm this, and does someone know of a fix?
Followed your steps and I got the same result like yours, I already reported this issue to the VS Product Team, please check this: VS 2017--VB: the intellisense for the DataGridView control not works like VS 2015, you can vote it or add a comment, then we need to waiting for the confirmation from the VS Product Team, thank you for your feedback.
Meanwhile, I tried it in C#>Windows Forms application and the intellisense works fine just like the VS 2015.
Albano Gheller posted an answer on the Visual Studio Community page.
To quote him and the required step for a fix:
I've fixed the problem in this way:
1. I've exported my settings from Tool - Import/Export settings
2. I've set the property HideAdvancedMembers = true inside
<ToolsOptionsSubCategory name="Basic" RegisteredName="Basic" PackageName="Text Management Package">
because C# has true and works
3. I've imported this modified settings.
So to summarize:
Find the part: <PropertyValue name="HideAdvancedMembers">false</PropertyValue> in the exported settings document's Basic ToolsOptionsSubCategory.
Change this to <PropertyValue name="HideAdvancedMembers">true</PropertyValue>, save, and then reimport the settings.
I don't know why hiding members leads to showing more members, but whatever ;-)
In supplement to Jens answer/to save anyone else some work:
Take the following XML, which is the minimum set of settings required to flip the problem attribute:
<UserSettings>
<ApplicationIdentity version="15.0"/>
<ToolsOptions>
<ToolsOptionsCategory RegisteredName="TextEditor" name="TextEditor">
<ToolsOptionsSubCategory PackageName="Text Management Package" RegisteredName="Basic" name="Basic">
<PropertyValue name="HideAdvancedMembers">true</PropertyValue>
</ToolsOptionsSubCategory>
</ToolsOptionsCategory>
</ToolsOptions>
</UserSettings>
Save it on the desktop in a file called a.vssettings
Go to Tools.. Import and Export Settings
Choose Import
Choose No, just import
Browse for the file you saved, do Next, Finish
I presume that there's a bug in VS where they got the boolean logic upside down for the intellisense, and advanced members are hidden when this attrib is false and shown when it's true

View file structure in VS Code

One of the features I use frequently in PHPStorm is the Structure window, which shows me my file structure broken down into functions, classes, variables, etc . I'm checking out VS Code, and I don't see an option for that type of window anywhere. Is there a similar window, or other way I can view the structure of my file?
Thanks.
The latest version of VS Code now has "Outline view" shipped in
From their site:
The Outline view is out of preview and now enabled by default.
You can read more about this here:
https://code.visualstudio.com/updates/v1_25#_outline-view
I ended up going with Code Outline tree provider for Visual Studio Code as mentioned by #Mikhail above, and it works well.

How do I get Visual Studio 2012 to generate code from a windows form design?

I am trying to add a simple windows form to my VB.Net project. I have used the designer to design the form how I want it with buttons, a text box and a Timer. The problem is when I try to view the code, there is only an empty class that looks like this:
Public Class MCastMain
End Class
I have set the application type to a windows form application in the project properties, and I have made a successful build of the application since doing so. I have been scrawling the internet and this forum for about half an hour now and I can't find one other person who is having this problem, nor can I find a tutorial that mentions any special steps that must be taken beyond what I have done. This is the first project I have done in Visual Studio.
I know this is probably stupid simple, but I have no idea what to do. Any help is appreciated as always.
Forms comes as partial class meaning the code is separated in two files.
The "empty" code you shown is from "mcastmain.vb" (if the file is named as the class).
With that one there is a (probably hidden) file "mcastmain.designer.vb" file which contains the generated code by the designer ; and is not meant to be modified (as any designer change will rewrite the file).
To show the hidden files you have to look in the solution explorer on the button on it's top there should be a "show all files" button. (it may be possible to do the same via the menu but I don't have VS right there to be sure where)

Can't see or add Website Data Sources in RDLC report in ASP.NET MVC

In the RDLC report, in Design view in Visual Studio 2008, we don't see anything in the Website Data Sources tab and the button to Add New Data Source is grayed out. Only the Refresh button is enabled, and clicking it doesn't do anything. Our business logic layer returns Lists of business objects and the business logic and business object projects are both referenced by the MVC project. This is an MVC app, so there is no App_Code folder.
How do we get our business objects to appear in the Website Data Sources list so we can drag and drop fields from the object onto our RDLC report?
I think I suffered the same problem as this.
I solved this by closing all open VS windows, cleaning, rebuilding the solution then adding a new WebForms page (yes I know its MVC) but it then seemed to trigger a refresh in something and the data sources showed up when we reopened and editted the rdlc file.
I have also been frustrated by this, using VB.NET, but this should fix it:
In addition to the reference to:
Microsoft.ReportViewer.Winforms or
Microsoft.ReportViewer.WebForms
You need to also add a reference to:
Microsoft.ReportViewer.Common
The Data Sources panel is still blank, but when you select Add Dataset, you'll see the correct options.
Try this...
https://msdn.microsoft.com/en-us/library/yft2c9ad.aspx
On the menu bar, choose View, Other Windows, Data Sources (or choose the Shift+Alt+D
I had the same problem in Visual Studio 2008. The solution I accidently found was to do the following:
1 - Launch VS 2008
2 - Open Solution
3 - Open report file (rdlc) and make sure "Website Data Sources" pane is showing
4 - Close VS 2008 (with the rdlc "having focus"
5 - Launch VS 2008
6 - Open Solution
You should now see the data in the Website Data Sources pane
One of the problems I had was that my DataSource class didn't have a parameterless constructor...after the parameterless constructor was added "the class" showed up in the DataSource list.
Small detail, but lost some time to figure it out. :)

Is there an easy way to make a code TextBox?

Is there an easy way to make a code TextBox?
I'm trying to make my own limited/specialized version of XAMLPad.
Displaying the current XAML object tree in the top display is simple enough, using XamlReader.Parse() ... But I'd like the actual XAML code in the bottom window to show up in its appropriate colors.
Here is an example of something similar to what I want.
(source: usefulfreeware.net)
The above example looks pretty authentic, with the little expander/collapser thingies on the left side as well as close-to-standard coloration of XAML tokens.
I believe that this doesn't have to be created from scratch, so I'm asking SO if anyone knows where I might find automated support for this type of "code" display.
Kaxaml uses ICSharpCode.TextEditor, the text editor component from SharpDevelop.
Have a look at sharpdevelop - we use it for an internal iron python editor