Visual Studio Development Bookmark and Share   
 index > Visual Studio WPF Designer > Can the xaml designer of vs2010 be used to design components derived directly from the Object class
 

Can the xaml designer of vs2010 be used to design components derived directly from the Object class

HI,All:
Can thexaml designer of vs2010 be used to design components derived directly from the Object class? My meaning is that the components are not derived from the Visual class. For example, there is a class named MyWindow, which is derived directly from the Object class, it has two properties: Width and Height, the code of the MyWindow class is as flowing:
public class MyWindow
{
public double Width { get; set; }
public double Height { get; set; }
}

The xaml is as fllowing:

<my: MyWindow x:Class="MyApplication. MyWindow "

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

xmlns:my="clr-namespace:CustomControlLibrary;assembly=CustomControlLibrary" Height="200" Width="200">

</my: MyWindow >
We want to develop a designer base on the xamldesigner of vs2010, when user open the xaml, the designer will show a view like a window, the user can resize the view, and the xaml will change.if user change the xaml, the view will change also. We don’t know if the xamldesigner’s architecture can support the case, we are researching on the beta1, but we found a limitation now, the "ViewProducerBase�class can only support the types derived from theVisual class, if a object is not derived from theVisual class, the ViewProducerBase can’t create ViewItem, This is a design or bug?

ErwinWang  Monday, September 07, 2009 3:31 AM
The restriction to derivation from Visualis by design, and we are currently not planning to change this behavior in Visual Studio 2010.

Mark
Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
Mark Wilson-Thomas  Monday, September 14, 2009 10:25 PM
The restriction to derivation from Visualis by design, and we are currently not planning to change this behavior in Visual Studio 2010.

Mark
Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is'
Mark Wilson-Thomas  Monday, September 14, 2009 10:25 PM

You can use google to search for other answers

Custom Search

More Threads

• The Events Handler tab is gone from the property dialog box when developing a wpf app (2008 Visual Studio)
• WPF Projects and VS 2008 RTM Crashes
• Throwing Design-time and/or compile-time exceptioins
• Resource not found event if it is
• How to drag And drop a control in WPF Application.
• Aulternative of TopMost Property in WPF
• Vista business sp1, VS 2008 STD sp1 Wpf solution, crash on exit
• backgroung
• No WPF Designer available in VS2008 VC#
• problem orcas converts old sln and vcproj files