Skip to main content
Home Forums Silverlight Design Expression Studio Blend 2.5: Editing Generic.xaml
5 replies. Latest Post by seeligd on December 4, 2008.
(0)
IanA
Member
249 points
50 Posts
09-01-2008 3:38 PM |
I have a control library in its own class library project. Most of my controls inherit from Control and use styles within Generic.xaml to set the control templates and states etc.
When I load my project in Blend 2.5 it does appear to be somewhat aware of Generic.xaml and will let me edit the control templates. However, as most of the templates have VSM states, Blend refuses to let me edit them (they display in the "States" editor but are all greyed out). I also noticed that when a template within Generic.xaml is edited Blend inserts VSM namespace declarations throughout the entire file (in Blend this will build ok and run), but once back in Visual Studio in debug mode I get a parser error on run.
I realise Blend is still beta, and the pace of change is fast. Can I assume that in the future Blend will be able to handle this better, as at present I have to build my style / template / states as regular resources using Blend in a dummy project, and then copy & paste them into Generic.xaml in my library?
Not a "show stopper" by any means, but it can be a bit of a pain if you want to go back and tweak things (i.e. copy template back into a dummy project resource, edit then copy back). Or, perhaps I'm missing something somewhere?
Yi-Lun L...
All-Star
25052 points
2,747 Posts
09-03-2008 12:12 AM |
Hello, this is a limitation of Expression Blend 2.5 June Preview. This is something that we're going to enable in a future build. But sorry I can't tell you any details at this time...
09-03-2008 9:34 AM |
OK, thanks for that. It will improve productivity when its implemented.
unnir
60 points
20 Posts
09-27-2008 3:35 AM |
Blend 2 Sp1 now allows you to edit copies of custom control templates, provided Generic.xaml has been authored per recommendation.
Thanks,Unni
ckchouk
4 points
2 Posts
11-26-2008 9:02 PM |
I have added states to my UserControl in a wpf project using blend 2 with sp1. Everything was working fine and then all of a suddin the states disappeared from the State browser in the design view. All the states are still in the xaml and all still work fine. I am tryin to change and add new states but could not get it to work.
seeligd
7 points
13 Posts
12-04-2008 4:55 PM |
Regarding generic.xaml - I have also found that if one has a simple project and authors the generic.xaml by hand, one can edit it to a degree with expression blend, but in my case, I have a solution split into multiple projects, some of which have their own generic.xaml files (each within .../themes).
When trying to edit one of these generic.xaml files in blend, I get the following error:
The root type was not expected. The following type was expected: "Application".
The beginning of the file looks like this:
<!-- COMPONENTS generic.xaml --><ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"...