NORMA + WPF

I'm currently prototyping using Windows Presentation Foundation to create views on the NORMA Object Model.  Stay tuned!

<UserControl x:Class="Neumont.Tools.ORM.Shell.WPF.ObjectViewer"

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

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

    xmlns:orm="clr-namespace:Neumont.Tools.ORM.ObjectModel"

  >

  <UserControl.Resources>

    <DataTemplate x:Key="ObjectTypeTemplate" DataType="{x:Type orm:ObjectType}">

      <Border CornerRadius="3" BorderThickness="2" BorderBrush="Black" Width="100" Height="100" Margin="5">

        <TextBlock Padding="5" TextWrapping="Wrap" Text="{Binding Path=Name}" />

      </Border>

    </DataTemplate>

  </UserControl.Resources>

  <ScrollViewer>

    <StackPanel x:Name="objectStackPanel">

      <ListBox x:Name="listBox" ItemsSource="{Binding}"

              ItemTemplate="{StaticResource ObjectTypeTemplate}"

              ScrollViewer.HorizontalScrollBarVisibility="Disabled">

        <ListBox.ItemsPanel>

          <ItemsPanelTemplate>

            <WrapPanel/>

          </ItemsPanelTemplate>

        </ListBox.ItemsPanel>

      </ListBox>

    </StackPanel>

  </ScrollViewer>

</UserControl>

Published Tuesday, May 15, 2007 12:45 PM by Joe
Filed under: ,
Powered by Community Server (Non-Commercial Edition), by Telligent Systems