@ -0,0 +1,27 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows.Data; |
|||
using System.Globalization; |
|||
using System.Windows; |
|||
|
|||
namespace Samples.Modules.Calculator.Converters |
|||
{ |
|||
class FormatStringToVisibilityConverter : IValueConverter |
|||
{ |
|||
public object Convert( object value, Type targetType, object parameter, CultureInfo culture ) |
|||
{ |
|||
//When FormatString received is empty, make the Precision property Visible.
|
|||
//This is to prevent something like this: Precision = "5" AND FormatString = "C2".
|
|||
if( string.IsNullOrEmpty( ( string )value ) ) |
|||
return Visibility.Visible; |
|||
return Visibility.Hidden; |
|||
} |
|||
|
|||
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture ) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,27 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows.Data; |
|||
using System.Globalization; |
|||
|
|||
namespace Samples.Modules.ChildWindow.Converters |
|||
{ |
|||
class IntToBoolConverter : IValueConverter |
|||
{ |
|||
public object Convert( object value, Type targetType, object parameter, CultureInfo culture ) |
|||
{ |
|||
int intReceived = (int)value; |
|||
|
|||
if( intReceived == 1 ) |
|||
return false; |
|||
else |
|||
return true; |
|||
} |
|||
|
|||
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture ) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,60 @@ |
|||
/************************************************************************ |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter.
|
|||
|
|||
**********************************************************************/ |
|||
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using Xceed.Wpf.DataGrid.ValidationRules; |
|||
using System.Windows.Controls; |
|||
using System.Globalization; |
|||
using Xceed.Wpf.DataGrid; |
|||
using System.Data; |
|||
|
|||
namespace Samples.Modules.DataGrid |
|||
{ |
|||
public class UniqueIDCellValidationRule : CellValidationRule |
|||
{ |
|||
public UniqueIDCellValidationRule() |
|||
{ |
|||
} |
|||
|
|||
public override ValidationResult Validate( object value, CultureInfo culture, CellValidationContext context ) |
|||
{ |
|||
// Get the DataItem from the context and cast it to a DataRow
|
|||
DataRowView dataRowView = context.DataItem as DataRowView; |
|||
|
|||
// Convert the value to a long to make sure it is numerical.
|
|||
// When the value is not numerical, then an InvalidFormatException will be thrown.
|
|||
// We let it pass unhandled to demonstrate that an exception can be thrown when validating
|
|||
// and the grid will handle it nicely.
|
|||
long id = Convert.ToInt64( value, CultureInfo.CurrentCulture ); |
|||
|
|||
// Try to find another row with the same ID
|
|||
System.Data.DataRow[] existingRows = dataRowView.Row.Table.Select( context.Cell.FieldName + "=" + id.ToString( CultureInfo.InvariantCulture ) ); |
|||
|
|||
// If a row is found, we return an error
|
|||
if( ( existingRows.Length != 0 ) && ( existingRows[ 0 ] != dataRowView.Row ) ) |
|||
return new ValidationResult( false, "The value must be unique" ); |
|||
|
|||
// If no row was found, we return a ValidResult
|
|||
return ValidationResult.ValidResult; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Windows.Data; |
|||
using System.Globalization; |
|||
using System.Windows; |
|||
|
|||
namespace Samples.Modules.Panels.Converters |
|||
{ |
|||
class ComboBoxToVisibilityConverter : IValueConverter |
|||
{ |
|||
public object Convert( object value, Type targetType, object parameter, CultureInfo culture ) |
|||
{ |
|||
if( ( value is int ) && ( parameter is string ) |
|||
&& ( int )value == Int32.Parse( ( string )parameter ) ) |
|||
{ |
|||
return Visibility.Visible; |
|||
} |
|||
|
|||
return Visibility.Collapsed; |
|||
} |
|||
|
|||
public object ConvertBack( object value, Type targetType, object parameter, CultureInfo culture ) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
|||
} |
|||
|
After Width: | Height: | Size: 38 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 18 KiB |
@ -0,0 +1,45 @@ |
|||
/************************************************************************ |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter.
|
|||
|
|||
**********************************************************************/ |
|||
|
|||
using Microsoft.Practices.Prism.Regions; |
|||
using Microsoft.Practices.Unity; |
|||
using Samples.Infrastructure; |
|||
using Samples.Infrastructure.Extensions; |
|||
using Samples.Modules.Panels.Views; |
|||
|
|||
namespace Samples.Modules.Panels |
|||
{ |
|||
public class PanelsModule : ModuleBase |
|||
{ |
|||
public PanelsModule( IUnityContainer container, IRegionManager regionManager ) |
|||
: base( container, regionManager ) |
|||
{ |
|||
} |
|||
|
|||
protected override void InitializeModule() |
|||
{ |
|||
RegionManager.RegisterViewWithRegion( RegionNames.NavigationRegion, typeof( SwitchPanelNavItem ) ); |
|||
} |
|||
|
|||
protected override void RegisterViewsAndTypes() |
|||
{ |
|||
Container.RegisterNavigationType( typeof( SwitchPanelView ) ); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,55 @@ |
|||
using System.Reflection; |
|||
using System.Resources; |
|||
using System.Runtime.CompilerServices; |
|||
using System.Runtime.InteropServices; |
|||
using System.Windows; |
|||
|
|||
// General Information about an assembly is controlled through the following
|
|||
// set of attributes. Change these attribute values to modify the information
|
|||
// associated with an assembly.
|
|||
[assembly: AssemblyTitle( "Samples.Modules.Panels" )] |
|||
[assembly: AssemblyDescription( "" )] |
|||
[assembly: AssemblyConfiguration( "" )] |
|||
[assembly: AssemblyCompany( "" )] |
|||
[assembly: AssemblyProduct( "Samples.Modules.Panels" )] |
|||
[assembly: AssemblyCopyright( "Copyright © 2012" )] |
|||
[assembly: AssemblyTrademark( "" )] |
|||
[assembly: AssemblyCulture( "" )] |
|||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
|||
// to COM components. If you need to access a type in this assembly from
|
|||
// COM, set the ComVisible attribute to true on that type.
|
|||
[assembly: ComVisible( false )] |
|||
|
|||
//In order to begin building localizable applications, set
|
|||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
|||
//inside a <PropertyGroup>. For example, if you are using US english
|
|||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
|||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
|||
//the line below to match the UICulture setting in the project file.
|
|||
|
|||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
|||
|
|||
|
|||
[assembly: ThemeInfo( |
|||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
|||
//(used if a resource is not found in the page,
|
|||
// or application resource dictionaries)
|
|||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
|||
//(used if a resource is not found in the page,
|
|||
// app, or any theme specific resource dictionaries)
|
|||
)] |
|||
|
|||
|
|||
// Version information for an assembly consists of the following four values:
|
|||
//
|
|||
// Major Version
|
|||
// Minor Version
|
|||
// Build Number
|
|||
// Revision
|
|||
//
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
|||
// by using the '*' as shown below:
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion( "1.0.0.0" )] |
|||
[assembly: AssemblyFileVersion( "1.0.0.0" )] |
|||
@ -0,0 +1,119 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion>8.0.30703</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{D51C9DFE-7661-4C32-A9D7-5772D366F578}</ProjectGuid> |
|||
<OutputType>library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>Samples.Modules.Panels</RootNamespace> |
|||
<AssemblyName>Samples.Modules.Panels</AssemblyName> |
|||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
|||
<TargetFrameworkProfile>Client</TargetFrameworkProfile> |
|||
<FileAlignment>512</FileAlignment> |
|||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>TRACE;DEBUG</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|||
<DebugType>pdbonly</DebugType> |
|||
<Optimize>true</Optimize> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="Microsoft.Practices.Prism"> |
|||
<HintPath>..\..\..\..\Libs\Prism\Microsoft.Practices.Prism.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.Practices.Unity"> |
|||
<HintPath>..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Xml" /> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="System.Xaml"> |
|||
<RequiredTargetFramework>4.0</RequiredTargetFramework> |
|||
</Reference> |
|||
<Reference Include="WindowsBase" /> |
|||
<Reference Include="PresentationCore" /> |
|||
<Reference Include="PresentationFramework" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Converters\ComboBoxToVisibilityConverter.cs" /> |
|||
<Compile Include="PanelsModule.cs" /> |
|||
<Compile Include="Views\SwitchPanelNavItem.xaml.cs"> |
|||
<DependentUpon>SwitchPanelNavItem.xaml</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="Views\SwitchPanelView.xaml.cs"> |
|||
<DependentUpon>SwitchPanelView.xaml</DependentUpon> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Properties\AssemblyInfo.cs"> |
|||
<SubType>Code</SubType> |
|||
</Compile> |
|||
<AppDesigner Include="Properties\" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Resource Include="OpenSourceImages\AnimatedTimelinePanel.jpg" /> |
|||
<Resource Include="OpenSourceImages\AutoStretchStackPanel.jpg" /> |
|||
<Resource Include="OpenSourceImages\CameraPanel.jpg" /> |
|||
<Resource Include="OpenSourceImages\Canvas.jpg" /> |
|||
<Resource Include="OpenSourceImages\Carousel.jpg" /> |
|||
<Resource Include="OpenSourceImages\DockPanel.jpg" /> |
|||
<Resource Include="OpenSourceImages\Grid.jpg" /> |
|||
<Resource Include="OpenSourceImages\PerspectivePanel.jpg" /> |
|||
<Resource Include="OpenSourceImages\RadialCanvas.jpg" /> |
|||
<Resource Include="OpenSourceImages\RelativeCanvas.jpg" /> |
|||
<Resource Include="OpenSourceImages\StackedStackPanel.jpg" /> |
|||
<Resource Include="OpenSourceImages\StackPanel.jpg" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Page Include="Views\SwitchPanelNavItem.xaml"> |
|||
<Generator>MSBuild:Compile</Generator> |
|||
<SubType>Designer</SubType> |
|||
</Page> |
|||
<Page Include="Views\SwitchPanelView.xaml"> |
|||
<Generator>MSBuild:Compile</Generator> |
|||
<SubType>Designer</SubType> |
|||
</Page> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\Xceed.Wpf.Toolkit\Xceed.Wpf.Toolkit.csproj"> |
|||
<Project>{72E591D6-8F83-4D8C-8F67-9C325E623234}</Project> |
|||
<Name>Xceed.Wpf.Toolkit</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\..\Samples.Infrastructure\Samples.Infrastructure.csproj"> |
|||
<Project>{A4A049A4-665A-4651-9046-7D06E9D0CCDC}</Project> |
|||
<Name>Samples.Infrastructure</Name> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
<PropertyGroup> |
|||
<PostBuildEvent>xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y |
|||
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I</PostBuildEvent> |
|||
</PropertyGroup> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,30 @@ |
|||
<!--********************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter. |
|||
|
|||
********************************************************************--> |
|||
<TreeViewItem x:Class="Samples.Modules.Panels.Views.SwitchPanelNavItem" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:views="clr-namespace:Samples.Modules.Panels.Views" |
|||
Header="Switch Panel" Tag="{x:Type views:SwitchPanelView}" |
|||
Style="{StaticResource newFeature}"> |
|||
|
|||
<TreeViewItem.Resources> |
|||
<Style TargetType="views:SwitchPanelNavItem" BasedOn="{StaticResource {x:Type TreeViewItem}}"/> |
|||
</TreeViewItem.Resources> |
|||
|
|||
</TreeViewItem> |
|||
@ -0,0 +1,34 @@ |
|||
/************************************************************************ |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter.
|
|||
|
|||
**********************************************************************/ |
|||
|
|||
using System.Windows.Controls; |
|||
|
|||
namespace Samples.Modules.Panels.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for CalculatorUpDownNavItem.xaml
|
|||
/// </summary>
|
|||
public partial class SwitchPanelNavItem : TreeViewItem |
|||
{ |
|||
public SwitchPanelNavItem() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,341 @@ |
|||
<!--********************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter. |
|||
|
|||
********************************************************************--> |
|||
<sample:DemoView x:Class="Samples.Modules.Panels.Views.SwitchPanelView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure" |
|||
xmlns:local="clr-namespace:Samples.Modules.Panels.Views" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:panels="clr-namespace:Xceed.Wpf.Toolkit.Panels;assembly=Xceed.Wpf.Toolkit" |
|||
xmlns:conv="clr-namespace:Samples.Modules.Panels.Converters" |
|||
xmlns:s="clr-namespace:System;assembly=mscorlib" |
|||
VerticalScrollBarVisibility="Disabled" |
|||
Title="Switch Panel" |
|||
Description="The SwitchPanel allows you to animate the children between different layouts."> |
|||
<sample:DemoView.Resources> |
|||
<Style x:Key="panelElement" TargetType="{x:Type TextBlock}"> |
|||
<Setter Property="Background" Value="Blue" /> |
|||
<Setter Property="Foreground" Value="White" /> |
|||
<Setter Property="Margin" Value="5" /> |
|||
<Setter Property="Width" Value="100" /> |
|||
<Setter Property="Height" Value="100" /> |
|||
<Setter Property="TextAlignment" Value="Center" /> |
|||
</Style> |
|||
|
|||
<ObjectDataProvider x:Key="orientationCombo" MethodName="GetValues" ObjectType="{x:Type s:Enum}"> |
|||
<ObjectDataProvider.MethodParameters> |
|||
<x:Type TypeName="Orientation" /> |
|||
</ObjectDataProvider.MethodParameters> |
|||
</ObjectDataProvider> |
|||
|
|||
<Style x:Key="controlInError" TargetType="Control"> |
|||
<Style.Triggers> |
|||
<Trigger Property="Validation.HasError" Value="true"> |
|||
<Setter Property="ToolTip" Value="{Binding RelativeSource={x:Static RelativeSource.Self}, |
|||
Path=(Validation.Errors).CurrentItem.ErrorContent}" /> |
|||
</Trigger> |
|||
</Style.Triggers> |
|||
</Style> |
|||
|
|||
<Style x:Key="plusItem" TargetType="ComboBoxItem" > |
|||
<Setter Property="HorizontalContentAlignment" Value="Stretch"/> |
|||
<Setter Property="ContentTemplate"> |
|||
<Setter.Value> |
|||
<DataTemplate> |
|||
<DockPanel> |
|||
<TextBlock DockPanel.Dock="Left" Text="{Binding}" /> |
|||
<TextBlock TextAlignment="Right" Foreground="OrangeRed" Style="{StaticResource plusSuffix}" /> |
|||
</DockPanel> |
|||
</DataTemplate> |
|||
</Setter.Value> |
|||
</Setter> |
|||
</Style> |
|||
|
|||
<s:String x:Key="wrapPanelDescription">Positions elements from left to right or up to down depending on the orientation and the available space. Breaks the content at the end of the line to wrap items to the next line.</s:String> |
|||
<s:String x:Key="randomPanelDescription">This panel lays out its children with a random location and size.</s:String> |
|||
<s:String x:Key="canvasPanelDescription">Exactly like WPF's native Canvas panel, except that this panel can animate its children and be used inside a SwitchPanel.</s:String> |
|||
<s:String x:Key="carouselDescription">Positions the elements in a carousel mode with a centered element in front.</s:String> |
|||
<s:String x:Key="dockPanelDescription">Exactly like WPF's native DockPanel, except that this panel can animate its children and be used inside a SwitchPanel.</s:String> |
|||
<s:String x:Key="gridDescription">Exactly like WPF's native Grid panel, except that this panel can animate its children and be used inside a SwitchPanel.</s:String> |
|||
<s:String x:Key="stackPanelDescription">Exactly like WPF's native StackPanel, except this panel can animate its children and be used inside SwitchPanel.</s:String> |
|||
<s:String x:Key="stackedStackPanelDescription">Lays out children in a series of stacked stackpanels.</s:String> |
|||
<s:String x:Key="autoStretchStackPanelDescription">This panel stretches the children in the orientation direction so that they completely fill the panel area.</s:String> |
|||
<s:String x:Key="relativeCanvasDescription">A Panel which is similar to Canvas but it lays out its children relative to the panel's height and width.</s:String> |
|||
<s:String x:Key="radialCanvasDescription">Lays out its children in a circle based on panel size and/or properties set.</s:String> |
|||
<s:String x:Key="cameraPanelDescription">"CameraPanel lays out its children in a 3D-like space. You can give the children a 3D location and set the camera position for the panel.</s:String> |
|||
<s:String x:Key="perspectivePanelDescription">Perspective panel positions its children in a perspective view with the possibility of rotating the background children.</s:String> |
|||
<s:String x:Key="animatedTimelinePanelDescription">Defines an area where items are positioned on a timeline.</s:String> |
|||
|
|||
<conv:ComboBoxToVisibilityConverter x:Key="comboBoxToVisibilityConverter" /> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</sample:DemoView.Resources> |
|||
|
|||
<Grid> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<GroupBox Header="Features" Grid.Row="0" Margin="5"> |
|||
<Grid Margin="5"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="*" /> |
|||
</Grid.ColumnDefinitions> |
|||
<TextBlock Text="Layout:" Margin="0,0,5,0" /> |
|||
<ComboBox x:Name="layoutCombo" SelectedIndex="0" Width="250" SelectionChanged="OnLayoutComboSelectionChanged"> |
|||
<ComboBoxItem>WrapPanel</ComboBoxItem> |
|||
<ComboBoxItem>RandomPanel</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">Canvas</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">Carousel</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">DockPanel</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">Grid</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">StackPanel</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">StackedStackPanel</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">AutoStretchStackPanel</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">RelativeCanvas</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">RadialCanvas</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">CameraPanel</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">PerspectivePanel</ComboBoxItem> |
|||
<ComboBoxItem Style="{StaticResource plusItem}">AnimatedTimelinePanel</ComboBoxItem> |
|||
</ComboBox> |
|||
</Grid> |
|||
</GroupBox> |
|||
|
|||
<Grid Grid.Row="1" Margin="10"> |
|||
<Grid.RowDefinitions > |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="*" /> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
<TextBlock Grid.Row="0" Text="Usage:" Style="{StaticResource Header}" /> |
|||
|
|||
<xctk:SwitchPanel x:Name="_switchPanel" Grid.Row="1" ActiveLayoutIndex="{Binding ElementName=layoutCombo, Path=SelectedIndex}" ActiveLayoutChanged="OnSwitchPanelLayoutChanged"> |
|||
<xctk:SwitchPanel.Layouts> |
|||
<xctk:WrapPanel x:Name="_wrapPanel" ItemWidth="100" ItemHeight="100"/> |
|||
<xctk:RandomPanel x:Name="_randomPanel" /> |
|||
</xctk:SwitchPanel.Layouts> |
|||
<TextBlock x:Name="_item1" Text="Item #1" Style="{StaticResource panelElement}"/> |
|||
<TextBlock x:Name="_item2" Text="Item #2" Style="{StaticResource panelElement}"/> |
|||
<TextBlock x:Name="_item3" Text="Item #3" Style="{StaticResource panelElement}"/> |
|||
<TextBlock x:Name="_item4" Text="Item #4" Style="{StaticResource panelElement}"/> |
|||
<TextBlock x:Name="_item5" Text="Item #5" Style="{StaticResource panelElement}"/> |
|||
<TextBlock x:Name="_item6" Text="Item #6" Style="{StaticResource panelElement}"/> |
|||
<TextBlock x:Name="_item7" Text="Item #7" Style="{StaticResource panelElement}"/> |
|||
<TextBlock x:Name="_item8" Text="Item #8" Style="{StaticResource panelElement}"/> |
|||
</xctk:SwitchPanel> |
|||
|
|||
<Image x:Name="_openSourceScreenShot" Grid.Row="1" Height="250" Visibility="Collapsed" /> |
|||
<TextBlock x:Name="_openSourceScreenShotDesc" Grid.Row="2" TextWrapping="Wrap" Visibility="Collapsed" /> |
|||
<TextBlock x:Name="_openSourceHyperlink" Grid.Row="3" Visibility="Collapsed"> |
|||
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Extended WPF Toolkit Plus. |
|||
</Hyperlink> |
|||
</TextBlock> |
|||
|
|||
<GroupBox Header="WrapPanel Toolbox" |
|||
Background="White" |
|||
Grid.Row="2" |
|||
Visibility="{Binding SelectedIndex, ElementName=layoutCombo, Converter={StaticResource comboBoxToVisibilityConverter}, ConverterParameter=0}" |
|||
Margin="10" > |
|||
<StackPanel> |
|||
<TextBlock TextWrapping="Wrap" |
|||
Text="{StaticResource wrapPanelDescription}" |
|||
Margin="10,0" /> |
|||
<TextBlock TextWrapping="Wrap" |
|||
Text="Resize the Window to animate the WrapPanel." |
|||
Margin="10,0" /> |
|||
|
|||
<Grid Margin="5"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Text="Orientation:" VerticalAlignment="Center"/> |
|||
<ComboBox Grid.Column="1" |
|||
ItemsSource="{Binding Source={StaticResource orientationCombo}}" |
|||
SelectedItem="{Binding Orientation, ElementName=_wrapPanel}" |
|||
Width="100" |
|||
Height="22" |
|||
VerticalAlignment="Center" |
|||
Margin="5" /> |
|||
<TextBlock Grid.Row="1" Text="Is Child Order Reversed:" VerticalAlignment="Center"/> |
|||
<CheckBox Grid.Row="1" |
|||
Grid.Column="1" |
|||
IsChecked="{Binding IsChildOrderReversed, ElementName=_wrapPanel}" |
|||
ClickMode="Press" |
|||
VerticalAlignment="Center" |
|||
Margin="5"/> |
|||
<TextBlock Grid.Column="2" Text="Item Width:" VerticalAlignment="Center" Margin="10,0,0,0"/> |
|||
<xctk:DoubleUpDown Grid.Column="3" |
|||
Value="{Binding ItemWidth, ElementName=_wrapPanel}" |
|||
AllowInputSpecialValues="NaN" |
|||
Width="100" |
|||
Height="20" |
|||
Minimum="0" |
|||
Style="{StaticResource controlInError}" |
|||
VerticalAlignment="Center" |
|||
Margin="5"/> |
|||
<TextBlock Grid.Column="2" Grid.Row="1" Text="Item Height:" VerticalAlignment="Center" Margin="10,0,0,0" /> |
|||
<xctk:DoubleUpDown Grid.Column="3" |
|||
Grid.Row="1" |
|||
Value="{Binding ItemHeight, ElementName=_wrapPanel}" |
|||
AllowInputSpecialValues="NaN" |
|||
Width="100" |
|||
Height="20" |
|||
Minimum="0" |
|||
Style="{StaticResource controlInError}" |
|||
VerticalAlignment="Center" |
|||
Margin="5"/> |
|||
</Grid> |
|||
</StackPanel> |
|||
</GroupBox> |
|||
|
|||
<GroupBox Header="RandomPanel Toolbox" |
|||
Background="White" |
|||
Grid.Row="2" |
|||
Visibility="{Binding SelectedIndex, ElementName=layoutCombo, Converter={StaticResource comboBoxToVisibilityConverter}, ConverterParameter=1}" |
|||
Margin="10" > |
|||
<StackPanel> |
|||
<TextBlock TextWrapping="Wrap" |
|||
Text="{StaticResource randomPanelDescription}" |
|||
Margin="10,0" /> |
|||
<TextBlock TextWrapping="Wrap" |
|||
Text="Modify the Minimum and Maximum values to affect the children size." |
|||
Margin="10,0" /> |
|||
|
|||
<Grid Margin="5"> |
|||
<Grid.ColumnDefinitions> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
<ColumnDefinition Width="Auto" /> |
|||
</Grid.ColumnDefinitions> |
|||
<Grid.RowDefinitions> |
|||
<RowDefinition Height="Auto" /> |
|||
<RowDefinition Height="Auto" /> |
|||
</Grid.RowDefinitions> |
|||
|
|||
<TextBlock Text="Minimum Width:" VerticalAlignment="Center"/> |
|||
<xctk:DoubleUpDown Grid.Column="1" |
|||
Value="{Binding MinimumWidth, ElementName=_randomPanel, ValidatesOnExceptions=True}" |
|||
AllowInputSpecialValues="None" |
|||
Minimum="0" |
|||
Maximum="100" |
|||
Width="100" |
|||
Height="20" |
|||
Style="{StaticResource controlInError}" |
|||
VerticalAlignment="Center" |
|||
Margin="5" /> |
|||
<TextBlock Grid.Row="1" Text="Maximum Width:" VerticalAlignment="Center"/> |
|||
<xctk:DoubleUpDown Grid.Column="1" |
|||
Grid.Row="1" |
|||
Value="{Binding MaximumWidth, ElementName=_randomPanel, ValidatesOnExceptions=True}" |
|||
AllowInputSpecialValues="None" |
|||
Minimum="0" |
|||
Maximum="100" |
|||
Width="100" |
|||
Height="20" |
|||
Style="{StaticResource controlInError}" |
|||
VerticalAlignment="Center" |
|||
Margin="5" /> |
|||
<TextBlock Grid.Column="2" Text="Minimum Height:" VerticalAlignment="Center" Margin="10,0,0,0"/> |
|||
<xctk:DoubleUpDown Grid.Column="3" |
|||
Value="{Binding MinimumHeight, ElementName=_randomPanel, ValidatesOnExceptions=True}" |
|||
AllowInputSpecialValues="None" |
|||
Minimum="0" |
|||
Maximum="100" |
|||
Width="100" |
|||
Height="20" |
|||
Style="{StaticResource controlInError}" |
|||
VerticalAlignment="Center" |
|||
Margin="5"/> |
|||
<TextBlock Grid.Column="2" Grid.Row="1" Text="Maximum Height:" VerticalAlignment="Center" Margin="10,0,0,0" /> |
|||
<xctk:DoubleUpDown Grid.Column="3" |
|||
Grid.Row="1" |
|||
Value="{Binding MaximumHeight, ElementName=_randomPanel, ValidatesOnExceptions=True}" |
|||
AllowInputSpecialValues="None" |
|||
Minimum="0" |
|||
Maximum="100" |
|||
Width="100" |
|||
Height="20" |
|||
Style="{StaticResource controlInError}" |
|||
VerticalAlignment="Center" |
|||
Margin="5"/> |
|||
</Grid> |
|||
</StackPanel> |
|||
</GroupBox> |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
</Grid> |
|||
</Grid> |
|||
</sample:DemoView> |
|||
@ -0,0 +1,206 @@ |
|||
/************************************************************************ |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter.
|
|||
|
|||
**********************************************************************/ |
|||
|
|||
using Microsoft.Practices.Prism.Regions; |
|||
using Samples.Infrastructure.Controls; |
|||
using System.Windows.Controls; |
|||
using System.Windows.Controls.Primitives; |
|||
using System; |
|||
using System.Windows; |
|||
using Xceed.Wpf.Toolkit.Panels; |
|||
using System.Collections.Generic; |
|||
using Xceed.Wpf.Toolkit; |
|||
using System.Text.RegularExpressions; |
|||
using System.IO; |
|||
using System.Diagnostics; |
|||
using System.Windows.Media.Imaging; |
|||
|
|||
namespace Samples.Modules.Panels.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for SwitchPanelView.xaml
|
|||
/// </summary>
|
|||
[RegionMemberLifetime( KeepAlive = false )] |
|||
public partial class SwitchPanelView : DemoView |
|||
{ |
|||
#region Members
|
|||
|
|||
|
|||
#endregion
|
|||
|
|||
public SwitchPanelView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
#region Event Handlers
|
|||
|
|||
private void Hyperlink_RequestNavigate( object sender, System.Windows.Navigation.RequestNavigateEventArgs e ) |
|||
{ |
|||
Process.Start( new ProcessStartInfo( e.Uri.AbsoluteUri ) ); |
|||
e.Handled = true; |
|||
} |
|||
|
|||
private void OnLayoutComboSelectionChanged( object sender, RoutedEventArgs e ) |
|||
{ |
|||
ComboBox comboBox = sender as ComboBox; |
|||
bool isPlusPanel = (comboBox.SelectedIndex >= 2); |
|||
|
|||
if( _openSourceScreenShot != null ) |
|||
_openSourceScreenShot.Visibility = isPlusPanel ? Visibility.Visible : Visibility.Collapsed; |
|||
if( _openSourceScreenShotDesc != null ) |
|||
_openSourceScreenShotDesc.Visibility = isPlusPanel ? Visibility.Visible : Visibility.Collapsed; |
|||
if( _openSourceHyperlink != null ) |
|||
_openSourceHyperlink.Visibility = isPlusPanel ? Visibility.Visible : Visibility.Collapsed; |
|||
if( _switchPanel != null ) |
|||
_switchPanel.Visibility = isPlusPanel ? Visibility.Collapsed : Visibility.Visible; |
|||
|
|||
if( isPlusPanel ) |
|||
{ |
|||
BitmapImage bitmapImage = new BitmapImage(); |
|||
string desc; |
|||
|
|||
bitmapImage.BeginInit(); |
|||
switch( comboBox.SelectedIndex ) |
|||
{ |
|||
case 2: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\Canvas.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "canvasPanelDescription" ] as string; |
|||
break; |
|||
case 3: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\Carousel.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "carouselDescription" ] as string; |
|||
break; |
|||
case 4: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\DockPanel.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "dockPanelDescription" ] as string; |
|||
break; |
|||
case 5: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\Grid.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "gridDescription" ] as string; |
|||
break; |
|||
case 6: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\StackPanel.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "stackPanelDescription" ] as string; |
|||
break; |
|||
case 7: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\StackedStackPanel.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "stackedStackPanelDescription" ] as string; |
|||
break; |
|||
case 8: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\AutoStretchStackPanel.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "autoStretchStackPanelDescription" ] as string; |
|||
break; |
|||
case 9: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\RelativeCanvas.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "relativeCanvasDescription" ] as string; |
|||
break; |
|||
case 10: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\RadialCanvas.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "radialCanvasDescription" ] as string; |
|||
break; |
|||
case 11: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\CameraPanel.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "cameraPanelDescription" ] as string; |
|||
break; |
|||
case 12: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\PerspectivePanel.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "perspectivePanelDescription" ] as string; |
|||
break; |
|||
case 13: |
|||
bitmapImage.UriSource = new Uri( "..\\OpenSourceImages\\AnimatedTimelinePanel.jpg", UriKind.Relative ); |
|||
desc = this.Resources[ "animatedTimelinePanelDescription" ] as string; |
|||
break; |
|||
default: throw new InvalidDataException( "LayoutcomboBox.SelectedIndex is not valid." ); |
|||
} |
|||
bitmapImage.EndInit(); |
|||
|
|||
if( _openSourceScreenShot != null ) |
|||
_openSourceScreenShot.Source = bitmapImage; |
|||
if( _openSourceScreenShotDesc != null ) |
|||
_openSourceScreenShotDesc.Text = desc; |
|||
} |
|||
} |
|||
|
|||
private void OnSwitchPanelLayoutChanged( object sender, RoutedEventArgs e ) |
|||
{ |
|||
} |
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
#endregion
|
|||
|
|||
#region Methods (Private)
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
#endregion
|
|||
|
|||
} |
|||
} |
|||
|
After Width: | Height: | Size: 57 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.2 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 182 KiB |
@ -0,0 +1,72 @@ |
|||
/************************************************************************ |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter.
|
|||
|
|||
**********************************************************************/ |
|||
|
|||
using System.Reflection; |
|||
using System.Runtime.InteropServices; |
|||
using System.Windows; |
|||
|
|||
// General Information about an assembly is controlled through the following
|
|||
// set of attributes. Change these attribute values to modify the information
|
|||
// associated with an assembly.
|
|||
[assembly: AssemblyTitle( "Extended WPF Toolkit Themes Sample" )] |
|||
[assembly: AssemblyDescription( "" )] |
|||
[assembly: AssemblyConfiguration( "" )] |
|||
[assembly: AssemblyCompany( "Xceed Software Inc." )] |
|||
[assembly: AssemblyProduct( "Extended WPF Toolkit Themes Sample" )] |
|||
[assembly: AssemblyCopyright( "Copyright © Xceed Software Inc. 2010-2012" )] |
|||
[assembly: AssemblyTrademark( "" )] |
|||
[assembly: AssemblyCulture( "" )] |
|||
|
|||
// Setting ComVisible to false makes the types in this assembly not visible
|
|||
// to COM components. If you need to access a type in this assembly from
|
|||
// COM, set the ComVisible attribute to true on that type.
|
|||
[assembly: ComVisible( false )] |
|||
|
|||
//In order to begin building localizable applications, set
|
|||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
|||
//inside a <PropertyGroup>. For example, if you are using US english
|
|||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
|||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
|||
//the line below to match the UICulture setting in the project file.
|
|||
|
|||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
|||
|
|||
|
|||
[assembly: ThemeInfo( |
|||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
|||
//(used if a resource is not found in the page,
|
|||
// or application resource dictionaries)
|
|||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
|||
//(used if a resource is not found in the page,
|
|||
// app, or any theme specific resource dictionaries)
|
|||
)] |
|||
|
|||
|
|||
// Version information for an assembly consists of the following four values:
|
|||
//
|
|||
// Major Version
|
|||
// Minor Version
|
|||
// Build Number
|
|||
// Revision
|
|||
//
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
|||
// by using the '*' as shown below:
|
|||
// [assembly: AssemblyVersion("1.0.*")]
|
|||
[assembly: AssemblyVersion( "1.0.0.0" )] |
|||
[assembly: AssemblyFileVersion( "1.0.0.0" )] |
|||
@ -0,0 +1,134 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform> |
|||
<ProductVersion>8.0.30703</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<ProjectGuid>{31D6DE81-60F1-4481-BE1B-96768855DA4E}</ProjectGuid> |
|||
<OutputType>Library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<RootNamespace>Samples.Modules.Themes</RootNamespace> |
|||
<AssemblyName>Samples.Modules.Themes</AssemblyName> |
|||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> |
|||
<TargetFrameworkProfile>Client</TargetFrameworkProfile> |
|||
<FileAlignment>512</FileAlignment> |
|||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
|||
<WarningLevel>4</WarningLevel> |
|||
</PropertyGroup> |
|||
<PropertyGroup> |
|||
<StartupObject /> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<OutputPath>bin\Debug\</OutputPath> |
|||
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|||
<DebugType>full</DebugType> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<CodeAnalysisLogFile>bin\Debug\Samples.Modules.Themes.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile> |
|||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression> |
|||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
|||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories> |
|||
<CodeAnalysisIgnoreBuiltInRuleSets>true</CodeAnalysisIgnoreBuiltInRuleSets> |
|||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories> |
|||
<CodeAnalysisIgnoreBuiltInRules>true</CodeAnalysisIgnoreBuiltInRules> |
|||
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'"> |
|||
<OutputPath>bin\Release\</OutputPath> |
|||
<DefineConstants>TRACE</DefineConstants> |
|||
<Optimize>true</Optimize> |
|||
<DebugType>pdbonly</DebugType> |
|||
<PlatformTarget>AnyCPU</PlatformTarget> |
|||
<CodeAnalysisLogFile>bin\Release\Samples.Modules.Themes.dll.CodeAnalysisLog.xml</CodeAnalysisLogFile> |
|||
<CodeAnalysisUseTypeNameInSuppression>true</CodeAnalysisUseTypeNameInSuppression> |
|||
<CodeAnalysisModuleSuppressionsFile>GlobalSuppressions.cs</CodeAnalysisModuleSuppressionsFile> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> |
|||
<CodeAnalysisRuleSetDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\\Rule Sets</CodeAnalysisRuleSetDirectories> |
|||
<CodeAnalysisRuleDirectories>;C:\Program Files (x86)\Microsoft Visual Studio 10.0\Team Tools\Static Analysis Tools\FxCop\\Rules</CodeAnalysisRuleDirectories> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<Reference Include="Microsoft.Practices.Prism"> |
|||
<HintPath>..\..\..\..\Libs\Prism\Microsoft.Practices.Prism.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="Microsoft.Practices.Unity"> |
|||
<HintPath>..\..\..\..\Libs\Prism\Microsoft.Practices.Unity.dll</HintPath> |
|||
</Reference> |
|||
<Reference Include="System" /> |
|||
<Reference Include="System.Data" /> |
|||
<Reference Include="System.Xml" /> |
|||
<Reference Include="Microsoft.CSharp" /> |
|||
<Reference Include="System.Core" /> |
|||
<Reference Include="System.Xml.Linq" /> |
|||
<Reference Include="System.Data.DataSetExtensions" /> |
|||
<Reference Include="System.Xaml"> |
|||
<RequiredTargetFramework>4.0</RequiredTargetFramework> |
|||
</Reference> |
|||
<Reference Include="WindowsBase" /> |
|||
<Reference Include="PresentationCore" /> |
|||
<Reference Include="PresentationFramework" /> |
|||
<Reference Include="Xceed.Wpf.DataGrid.Samples.SampleData"> |
|||
<HintPath>..\..\..\..\Libs\Xceed.Wpf.DataGrid.Samples.SampleData.dll</HintPath> |
|||
</Reference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Compile Include="Properties\AssemblyInfo.cs"> |
|||
<SubType>Code</SubType> |
|||
</Compile> |
|||
<AppDesigner Include="Properties\" /> |
|||
<Compile Include="ThemesModule.cs" /> |
|||
<Compile Include="Views\HomeView.xaml.cs"> |
|||
<DependentUpon>HomeView.xaml</DependentUpon> |
|||
</Compile> |
|||
<Compile Include="Views\NavigationView.xaml.cs"> |
|||
<DependentUpon>NavigationView.xaml</DependentUpon> |
|||
</Compile> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<ProjectReference Include="..\..\..\Xceed.Wpf.DataGrid\Xceed.Wpf.DataGrid.csproj"> |
|||
<Project>{63648392-6CE9-4A60-96D4-F9FD718D29B0}</Project> |
|||
<Name>Xceed.Wpf.DataGrid</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\..\..\Xceed.Wpf.Toolkit\Xceed.Wpf.Toolkit.csproj"> |
|||
<Project>{72E591D6-8F83-4D8C-8F67-9C325E623234}</Project> |
|||
<Name>Xceed.Wpf.Toolkit</Name> |
|||
</ProjectReference> |
|||
<ProjectReference Include="..\..\Samples.Infrastructure\Samples.Infrastructure.csproj"> |
|||
<Project>{A4A049A4-665A-4651-9046-7D06E9D0CCDC}</Project> |
|||
<Name>Samples.Infrastructure</Name> |
|||
</ProjectReference> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Resource Include="Images\NoPicture.png" /> |
|||
<Resource Include="Images\NoPictureA.jpg" /> |
|||
<Resource Include="Images\NoPictureB.jpg" /> |
|||
<Resource Include="Images\NoPictureC.jpg" /> |
|||
<Resource Include="Images\NoPictureD.jpg" /> |
|||
<Resource Include="Images\Working.png" /> |
|||
</ItemGroup> |
|||
<ItemGroup> |
|||
<Page Include="Views\HomeView.xaml"> |
|||
<SubType>Designer</SubType> |
|||
<Generator>MSBuild:Compile</Generator> |
|||
</Page> |
|||
<Page Include="Views\NavigationView.xaml"> |
|||
<SubType>Designer</SubType> |
|||
<Generator>MSBuild:Compile</Generator> |
|||
</Page> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
<PropertyGroup> |
|||
<PostBuildEvent>xcopy "$(TargetDir)*.*" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\" /Y |
|||
xcopy "$(ProjectDir)Views" "$(SolutionDir)Src\Samples\Samples\bin\$(ConfigurationName)\Samples\$(ProjectName)\" /s /Y /I</PostBuildEvent> |
|||
</PropertyGroup> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,45 @@ |
|||
/************************************************************************ |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter.
|
|||
|
|||
**********************************************************************/ |
|||
|
|||
using Microsoft.Practices.Prism.Regions; |
|||
using Microsoft.Practices.Unity; |
|||
using Samples.Infrastructure; |
|||
using Samples.Infrastructure.Extensions; |
|||
using Samples.Modules.Themes.Views; |
|||
|
|||
namespace Samples.Modules.Themes |
|||
{ |
|||
public class ThemesModule : ModuleBase |
|||
{ |
|||
public ThemesModule( IUnityContainer container, IRegionManager regionManager ) |
|||
: base( container, regionManager ) |
|||
{ |
|||
} |
|||
|
|||
protected override void InitializeModule() |
|||
{ |
|||
RegionManager.RegisterViewWithRegion( RegionNames.NavigationRegion, typeof( NavigationView ) ); |
|||
} |
|||
|
|||
protected override void RegisterViewsAndTypes() |
|||
{ |
|||
Container.RegisterNavigationType( typeof( HomeView ) ); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,34 @@ |
|||
<!--********************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter. |
|||
|
|||
********************************************************************--> |
|||
<sample:DemoView x:Class="Samples.Modules.Themes.Views.HomeView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:sample="clr-namespace:Samples.Infrastructure.Controls;assembly=Samples.Infrastructure" |
|||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" |
|||
xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid" |
|||
xmlns:sys="clr-namespace:System;assembly=mscorlib" |
|||
Title="Themes" |
|||
x:Name="_demo" |
|||
Description="Office themes for all WPF controls, including the toolkit and DataGrid. This feature is offered in the Plus version of the Extended WPF Toolkit."> |
|||
<TextBlock Margin="0,20,0,0"> |
|||
<Hyperlink NavigateUri="http://www.xceed.com/Extended_WPF_Toolkit_Intro.html" RequestNavigate="Hyperlink_RequestNavigate"> |
|||
Click here for more details about Extended WPF Toolkit Plus. |
|||
</Hyperlink> |
|||
</TextBlock> |
|||
</sample:DemoView> |
|||
@ -0,0 +1,55 @@ |
|||
/************************************************************************ |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter.
|
|||
|
|||
**********************************************************************/ |
|||
|
|||
using System.Collections.Generic; |
|||
using System.Collections.ObjectModel; |
|||
using System.ComponentModel; |
|||
using Microsoft.Practices.Prism.Regions; |
|||
using Samples.Infrastructure.Controls; |
|||
using System.Windows; |
|||
using System.Windows.Controls; |
|||
using Xceed.Wpf.Toolkit; |
|||
using Xceed.Wpf.Toolkit.Themes; |
|||
using System.Windows.Controls.Primitives; |
|||
using System; |
|||
using Xceed.Wpf.DataGrid.Samples.SampleData; |
|||
using System.Data; |
|||
using System.Diagnostics; |
|||
|
|||
namespace Samples.Modules.Themes.Views |
|||
{ |
|||
|
|||
/// <summary>
|
|||
/// Interaction logic for HomeView.xaml
|
|||
/// </summary>
|
|||
[RegionMemberLifetime( KeepAlive = false )] |
|||
public partial class HomeView : DemoView |
|||
{ |
|||
public HomeView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
|
|||
private void Hyperlink_RequestNavigate( object sender, System.Windows.Navigation.RequestNavigateEventArgs e ) |
|||
{ |
|||
Process.Start( new ProcessStartInfo( e.Uri.AbsoluteUri ) ); |
|||
e.Handled = true; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,30 @@ |
|||
<!--********************************************************************* |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license |
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter. |
|||
|
|||
********************************************************************--> |
|||
<TreeViewItem x:Class="Samples.Modules.Themes.Views.NavigationView" |
|||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|||
xmlns:views="clr-namespace:Samples.Modules.Themes.Views" |
|||
Header="Themes" Tag="{x:Type views:HomeView}" Style="{StaticResource plusStyle}"> |
|||
|
|||
<TreeViewItem.Resources> |
|||
<Style TargetType="views:NavigationView" BasedOn="{StaticResource {x:Type TreeViewItem}}" /> |
|||
</TreeViewItem.Resources> |
|||
|
|||
|
|||
</TreeViewItem> |
|||
@ -0,0 +1,34 @@ |
|||
/************************************************************************ |
|||
|
|||
Extended WPF Toolkit |
|||
|
|||
Copyright (C) 2010-2012 Xceed Software Inc. |
|||
|
|||
This program is provided to you under the terms of the Microsoft Public |
|||
License (Ms-PL) as published at http://wpftoolkit.codeplex.com/license
|
|||
|
|||
This program can be provided to you by Xceed Software Inc. under a |
|||
proprietary commercial license agreement for use in non-Open Source |
|||
projects. The commercial version of Extended WPF Toolkit also includes |
|||
priority technical support, commercial updates, and many additional |
|||
useful WPF controls if you license Xceed Business Suite for WPF. |
|||
|
|||
Visit http://xceed.com and follow @datagrid on Twitter.
|
|||
|
|||
**********************************************************************/ |
|||
|
|||
using System.Windows.Controls; |
|||
|
|||
namespace Samples.Modules.Themes.Views |
|||
{ |
|||
/// <summary>
|
|||
/// Interaction logic for NavigationView.xaml
|
|||
/// </summary>
|
|||
public partial class NavigationView : TreeViewItem |
|||
{ |
|||
public NavigationView() |
|||
{ |
|||
InitializeComponent(); |
|||
} |
|||
} |
|||
} |
|||