Some possibilities for improving Blend support
So, I had a thought today about Blend and Noesis and did a quick experiment to test the practicality. The idea is that, since Blend uses the referenced assemblies to build the asset library that we could remove the PresentationFramework assembly and replace it by a wrapper assembly which only has the controls and parts that Noesis supports.
First I created the wrapper control library and made the following classes:
I built that, and it was fine.
Next I made a new WPF application and deleted PresentationFramework from the references and added my wrapper assembly. Then I tweaked the default XAML with the new namespace, ending up with the following
App.xaml
MainWindow.xaml
The XAML renders in design view, and when I go to the Asset library I only see the items that I wrapped. It's just preliminary work, and clearly this WPF app won't build, but it is an interesting start.
First I created the wrapper control library and made the following classes:
Code: Select all
public class TextBlock : System.Windows.Controls.TextBlock
{
}
public class Window : System.Windows.Window
{
}
public class Grid : System.Windows.Controls.Grid
{
}
public class Application : System.Windows.Application
{
}
Next I made a new WPF application and deleted PresentationFramework from the references and added my wrapper assembly. Then I tweaked the default XAML with the new namespace, ending up with the following
App.xaml
Code: Select all
<WPFWrap:Application
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:WPFWrap="clr-namespace:WPFWrap;assembly=WPFWrap"
x:Class="WpfApplication4.App"
StartupUri="MainWindow.xaml">
<WPFWrap:Application.Resources>
<!-- Resources scoped at the Application level should be defined here. -->
</WPFWrap:Application.Resources>
</WPFWrap:Application>
Code: Select all
<WPFWrap:Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:WPFWrap="clr-namespace:WPFWrap;assembly=WPFWrap" x:Class="WpfApplication4.MainWindow"
Title="MainWindow" Height="350" Width="525">
<WPFWrap:Grid Margin="0,2,0,-2">
<WPFWrap:Text2 HorizontalAlignment="Left" Margin="209,77,0,0" TextWrapping="Wrap" Text="Text2" VerticalAlignment="Top"/>
</WPFWrap:Grid>
</WPFWrap:Window>
Re: Some possibilities for improving Blend support
wow! This is an amazing idea!
We could even hide/add properties to that dummy classes and in theory Blend should show/hide them in the Properties window.
We could even hide/add properties to that dummy classes and in theory Blend should show/hide them in the Properties window.
Who is online
Users browsing this forum: No registered users and 0 guests