I have a set of UserControls that need to have a few similar properties. Thus I have defined an abstract subclass of UserControl that defines these properties and updated the .xaml.cs and .g.cs files to inherit from this base class. All compiles well and runs well. Great! But.... .g.cs files are generated and will be regenerated, so how do I tell Blend or Visual Studio to keep inheriting from my base class rather than UserControl?
相关问题
- Diffrence between assigning simple prototype and u
- How does the JPA handle partial, non-disjoint inhe
- how to Enumerate local fonts in silverlight 4
- Dynamic Casts or Function Overloads?
- Free Silverlight mapping with Bing maps and OpenSt
相关文章
- LINQ .Include() properties from sub-types in TPH i
- Why do base Windows Forms form class with generic
- Overloading a super class's function
- How to map an abstract collection with jpa?
- New Windows Application - What language?
- An object reference is required for the non-static
- Check if the Type of an Object is inherited from a
- is Object.getPrototypeOf() same as Object.construc
You need to change the XAML a bit to prefix the UserControl declaration with a namespace:
Where MyNameSpace is your namespace (duh!), MyBaseControl is your base class and MyControl is your control that inherits from MyBaseControl. The x:Class part doesn't need to be in the same namespace, I've just kept it the same for the example.
More info here and here.