Visual studio 2008 WPF designer questions - wpf

I have 2 question about xaml editor.
I need to show xaml editor keyboard shortcut like F7 and Shift+F7
How to make default view as xaml editor? When i choosing 'view designer' button from solution explorer, xaml editor and designer window shown. How to set default editor to xaml.

For question 2:
Tools -> Options -> Text Editor -> XAML -> Miscellaneous -> Always open documents in full XAML view

Related

What is the hokey to switch from XAML tab to Design tab in Visual Studio 2010

I want to know if there's a shortcut/hotkey to switch between XAML to the designer. Doing WPF I like to code XAML full screen then check the design full screen. I've looked up Google, without success.
Something similar to the F7 shortcut to switch between code/design in winform probly exist for wpf.
You can switch from XAML view to Designer view using SHIFT + F7 hotkey and switch back using navigation.Back (Ctrl + -).
This worked for me.
Open your XAML file in the main view and keep it in the Designer View.
Right click the same XAML file in Solution Explorer and use 'Open With' option.
Select the editor you are most comfortable with from the list of editors.
This opens the XAML mark up code in a separate window.
You can now type the XAML mark up in one window and when you save the changes are reflected in the designer view (open in your main window).
You can switch between them using regular short cut keys to switch between windows in Visual Studio. You can even drag them to different monitors and see them side by side.

How to merge Designer and XAML editors in one window in Visual Studio?

How to merge Designer and XAML editors in one window (designer on top of xaml editor) in Visual Studio 2010 when working with WPF project?
Currently, to switch between them I need to use tabs.
Click the toggle button in the picture below.
There are three tabs above the output toolbar: "Design", an image with two arrows and "XAML". Click on the image (the second tab). In that way, you can switch - if you want the code to be above or under the design editor.

how to get datagrid control in wpf visual studio 2010

how do we get the datagrid control in wpf visual studio 2010....I mean how to add the datagrid control to the wpf default controls..if I directly type tag in my xaml code, it's giving an error to check the reference assembly that needs to be added..
could anyone please help me out to resolve it...
You can find it at the Common WPF Controls section in your Toolbox as you can see below. Just drag-and-drop it into your window designer and everything will be okay:
Update
Then do the following steps:
Right click on your Toolbox and click on Choose Items...
Filter the long list on the opened form by typing DataGrid as you can see on the image below:

How to edit DataTemplate in VS designer

Is it possible to edit (in design mode) DataTemplate in Visual Studio WPF Designer?.
I know its possible to edit DataTemplate in Blend throug Resources Tab.
But I couldn't find a way to open a DataTemplate in Visual Studio.
Thanks in advance for any hint.
I know it's an old question, but (in VS2015, at least) if you put your DataTemplate in Control.Resources and use "Go to Definition" from the context menu on a StaticResource/DynamicResource ResourceKey it will show that DataTemplate in the designer pane. The only problem is that I haven't figured out how to get back to the main control designer without closing and re-opening the document.
in VS Express 2012, select your ListView or GridView, then click the property marker for "ItemTemplate" and select "Edit Resource"
this worked for me
In VS Express 2012 it works like this:
Right click in the VS designer on your custom control/control template and select from the context menu "Edit Template" -> "Edit copy". This will copy the xaml of the control as a ressource in your active window. There you can easily edit it and e.g. see the grid lines etc.

Blend 3 - Keyboard Shortcut to switch between design and xaml views?

As I'm not more of a developer than a designer I like to hand code my xaml rather than using draggy-droppy stuff.
Since silverlight 3 - the design preview in VS2008 has disappeared. It wasn't that great but at least I got a visual representation of my markup without having to run the application.
So I installed Blend 3 and I'd still like to hand code my xaml.
Does anyone know a keyboard shortcut to switch between design view and xaml view - I've tried editing the xaml in VS then tabbing over to blend but theres a small delay that can be annoying when I just want a quick preview.
Thanks.
For doing the thing you want please test the following solution:
Navigate to Tools menu of the visual studio
Click the Options menu item
From left pane choose the Environment and then Keyboard
From right pane choose the Visual C# 2005 combobox item
Now you can easily switch between xaml and the desing view by pressing Shift + F7
Are you talking about while in Blend? In which case it's F11 to toggle view.
If your talking about toggling between VS and Blend then I don't think it can be done, but you could try adding a Keyboard Shortcut in Tools->Options->Keyboard (not tried it and don't know if it would be successful).
In Blend you can use F11 to toggle between the three states:
Design View
Xaml View
Split View
It seems to me that what would help you the most is to change your default view:
-> Tools
-> Options
-> Documents
-> Change the Default Document View to either Xaml or Split View
And there is a way to toggle between VS and Blend: I do this all the time with Alt + Tab. I'd be cautious though: you should save the solution before switching to keep the two apps in synch.

Resources