|
<Pages:MainPageControl x:Class="Catel.Examples.Silverlight.UI.Pages.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Pages="clr-namespace:Catel.Examples.Silverlight.UI.Pages"
xmlns:ToolkitControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
xmlns:Commands="clr-namespace:Catel.MVVM.Commands;assembly=Catel.Silverlight">
<!-- Resources -->
<Pages:MainPageControl.Resources>
</Pages:MainPageControl.Resources>
<!-- Content -->
<ToolkitControls:DockPanel x:Name="LayoutRoot" Background="White" LastChildFill="True">
<!-- Details and actions -->
<StackPanel ToolkitControls:DockPanel.Dock="Right" Orientation="Vertical">
<!-- Details -->
<!--<GroupBox Header="Details">
</GroupBox>-->
<!-- Buttons -->
<ToolkitControls:WrapPanel>
<!-- Added -->
<Button Command="{Binding Add}" Style="{StaticResource ImageButtonStyle}">
<Image Source="/Catel.Examples.Silverlight;component/Resources/Images/add.png"/>
</Button>
<!-- Edit -->
<Button Command="{Binding Edit}" Style="{StaticResource ImageButtonStyle}">
<Image Source="/Catel.Examples.Silverlight;component/Resources/Images/edit.png"/>
</Button>
<!-- Remove -->
<Button Command="{Binding Remove}" Style="{StaticResource ImageButtonStyle}">
<Image Source="/Catel.Examples.Silverlight;component/Resources/Images/delete.png"/>
</Button>
</ToolkitControls:WrapPanel>
</StackPanel>
<!-- List of persons -->
<ListBox ToolkitControls:DockPanel.Dock="Left" ItemsSource="{Binding PersonCollection}" SelectedItem="{Binding SelectedPerson, Mode=TwoWay}">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseRightButtonDown">
<Commands:EventToCommand Command="{Binding Edit}" DisableAssociatedObjectOnCannotExecute="False" />
</i:EventTrigger>
</i:Interaction.Triggers>
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding FirstName}" />
<TextBlock Text="{Binding MiddleName}" />
<TextBlock Text="{Binding LastName}" />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</ToolkitControls:DockPanel>
</Pages:MainPageControl>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.