Skip to content

Commit

Permalink
Added Graphics samples
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Jun 25, 2014
1 parent 7f25b5e commit 95bda34
Show file tree
Hide file tree
Showing 195 changed files with 14,811 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Page.Resources>
<Style TargetType="Button" x:Key="NewButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Grid>
<Ellipse Fill="Orange" Stroke="DarkGray">
<Ellipse.BitmapEffect>
<BitmapEffectGroup>
<DropShadowBitmapEffect Color="Black" Direction="320"
ShadowDepth="10" Softness="1" Opacity="0.5"/>
<BevelBitmapEffect/>
</BitmapEffectGroup>
</Ellipse.BitmapEffect>
</Ellipse>
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Page.Resources>
<StackPanel Width="150">
<Button>Standard Button</Button>
<Button Style="{StaticResource NewButton}" Height="50">Styled Button</Button>
</StackPanel>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel>
<Slider Margin="20,5,20,0" Minimum="25" Maximum="100" x:Name="ZoomSlider"/>
<FlowDocumentPageViewer MinZoom="25"
Zoom="{Binding ElementName=ZoomSlider, Path=Value}">
<FlowDocument>
<Paragraph>
Der erste Blick vieler Entwickler in einer neuen Version von Visual Studio
gilt der Toolbar. Welche neuen, interessanten Controls stehen jetzt zur
Verfügung? Gibt es die neuen Steuerelemente, die man begeistert in Word oder
anderen Produkten aus dem Hause Microsoft entdeckt hat, jetzt auch für eigene
Anwendungen? Schließlich möchten Softwarehersteller, dass das Design ihrer
eigenen Software dem aktuellen Stand der Technik entspricht und auf keinen Fall
"angestaubt" wirkt.
</Paragraph>
<Paragraph>
Wenn man zum ersten Mal eine WPF Applikation erstellt und die Toolbox von Visual
Studio öffnet, trifft man auf jede Menge vertrauter Controls. Sie finden die
üblichen Verdächtigen wie Buttons, TextBoxen, ListBoxen und Labels. Nicht viel
Neues in Sachen Controls bei WPF? <Bold>Weit gefehlt!</Bold>
</Paragraph>
</FlowDocument>
</FlowDocumentPageViewer>
</StackPanel>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="VisualTreeWatcher" Height="200" Width="300">
<StackPanel x:Name="MyStackPanel" Margin="10">
<TextBlock x:Name="MyTextBlock" Text="My TextBlock" />
<TextBox x:Name="MyTextBox" Text="My TextBox" />
</StackPanel>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="VisualTreeWatcher" Height="200" Width="300">
<Grid ShowGridLines="True">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>

<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="1*" />
<RowDefinition Height="3*" />
<RowDefinition Height="20" />
</Grid.RowDefinitions>

<TextBlock Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
Background="LightGray" Text="A Title" FontSize="16"
FontWeight="Bold" />

<TextBlock Grid.Column="0" Grid.Row="1" Text="This" />
<TextBlock Grid.Column="1" Grid.Row="1" Text="is" />
<TextBlock Grid.Column="0" Grid.Row="2" Text="my" />
<TextBlock Grid.Column="1" Grid.Row="2" Text="Grid!" />

<TextBlock Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2"
Background="LightGray" Text="A Footer" FontSize="10" />
</Grid>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="VisualTreeWatcher" Height="200" Width="300">
<Canvas Background="LightGray">
<TextBlock Canvas.Top="10" Canvas.Left="20"
Text="First TextBlock" />

<TextBlock Canvas.Top="30" Canvas.Left="200"
Text="First TextBlock" />

<Rectangle Canvas.Top="50" Canvas.Left="20" Canvas.ZIndex="1"
Fill="Gray" Height="50" Width="50" />

<Rectangle Canvas.Top="70" Canvas.Left="50" Canvas.ZIndex="0"
Fill="Black" Height="50" Width="50" />
</Canvas>
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:sysio="clr-namespace:System.IO;assembly=mscorlib"
Title="VisualTreeWatcher" Height="200" Width="300">
<Page.Resources>
<ObjectDataProvider
ObjectType="{x:Type sysio:DirectoryInfo}"
MethodName="GetFiles" x:Key="Files">
<ObjectDataProvider.ConstructorParameters>
<sys:String>c:\temp</sys:String>
</ObjectDataProvider.ConstructorParameters>
</ObjectDataProvider>
</Page.Resources>

<ListBox ItemsSource="{Binding Source={StaticResource Files}}" />
</Page>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Page
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="VisualTreeWatcher" Height="200" Width="300">
<StackPanel>
<Menu>
<MenuItem Header="Menu 1">
<MenuItem Header="Menu 1.1" />
<MenuItem Header="Menu 1.2" />
<MenuItem Header="Menu 1.3" />
</MenuItem>
<MenuItem Header="Menu 2">
<MenuItem Header="Menu 2.1" />
<MenuItem Header="Menu 2.2" />
</MenuItem>
</Menu>
</StackPanel>
</Page>
29 changes: 29 additions & 0 deletions WpfTraining/03 UI Design With XAML/02 Adorner/Adorner.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Adorner", "Adorner\Adorner.csproj", "{F6CF3721-4723-4363-B31D-A50DCA696B01}"
EndProject
Global
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 2
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
SccTeamFoundationServer = http://silver:8080/
SccLocalPath0 = .
SccProjectUniqueName1 = Adorner\\Adorner.csproj
SccProjectName1 = Adorner
SccLocalPath1 = Adorner
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F6CF3721-4723-4363-B31D-A50DCA696B01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F6CF3721-4723-4363-B31D-A50DCA696B01}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F6CF3721-4723-4363-B31D-A50DCA696B01}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F6CF3721-4723-4363-B31D-A50DCA696B01}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
155 changes: 155 additions & 0 deletions WpfTraining/03 UI Design With XAML/02 Adorner/Adorner/Adorner.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{F6CF3721-4723-4363-B31D-A50DCA696B01}</ProjectGuid>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<RootNamespace>Samples.Adorner</RootNamespace>
<AssemblyName>Samples.Adorner</AssemblyName>
<WarningLevel>4</WarningLevel>
<OutputType>winexe</OutputType>
<MinFrameworkVersionRequired>3.0</MinFrameworkVersionRequired>
<IsWebBootstrapper>false</IsWebBootstrapper>
<SccProjectName>SAK</SccProjectName>
<SccLocalPath>SAK</SccLocalPath>
<SccAuxPath>SAK</SccAuxPath>
<SccProvider>SAK</SccProvider>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileUpgradeFlags>
</FileUpgradeFlags>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<OldToolsVersion>3.5</OldToolsVersion>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<PublishUrl>Publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Web</InstallFrom>
<UpdateEnabled>true</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>false</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>.\bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>false</DebugSymbols>
<Optimize>true</Optimize>
<OutputPath>.\bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xaml" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="UIAutomationProvider" />
<Reference Include="UIAutomationTypes" />
<Reference Include="ReachFramework" />
<Reference Include="System.Printing" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.IdentityModel" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Page Include="Window1.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Compile Include="Window1.xaml.cs">
<DependentUpon>Window1.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<Compile Include="MoveShapeAdorner.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<SubType>Designer</SubType>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<None Include="app.config" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<AppDesigner Include="Properties\" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
<Visible>False</Visible>
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
<Visible>False</Visible>
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Application x:Class="Adorner.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="Window1.xaml"
>
<Application.Resources>

</Application.Resources>
</Application>
17 changes: 17 additions & 0 deletions WpfTraining/03 UI Design With XAML/02 Adorner/Adorner/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System;
using System.Windows;
using System.Data;
using System.Xml;
using System.Configuration;

namespace Adorner
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>

public partial class App : System.Windows.Application
{

}
}
Loading

0 comments on commit 95bda34

Please sign in to comment.