-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #160 from rojepp/master
#87: Xaml TP supports external components
- Loading branch information
Showing
11 changed files
with
180 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
...viders.Xaml.Tests.ExternalControl/FSharpx.TypeProviders.Xaml.Tests.ExternalControl.fsproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | ||
<PropertyGroup> | ||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | ||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | ||
<SchemaVersion>2.0</SchemaVersion> | ||
<ProjectGuid>94b8edad-06d1-44a8-ac44-906d7b6a37ab</ProjectGuid> | ||
<OutputType>Library</OutputType> | ||
<RootNamespace>FSharpx.TypeProviders.Xaml.Tests.ExternalControl</RootNamespace> | ||
<AssemblyName>FSharpx.TypeProviders.Xaml.Tests.ExternalControl</AssemblyName> | ||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion> | ||
<Name>FSharpx.TypeProviders.Xaml.Tests.ExternalControl</Name> | ||
<TargetFrameworkProfile /> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugSymbols>true</DebugSymbols> | ||
<DebugType>full</DebugType> | ||
<Optimize>false</Optimize> | ||
<Tailcalls>false</Tailcalls> | ||
<OutputPath>bin\Debug\</OutputPath> | ||
<DefineConstants>DEBUG;TRACE</DefineConstants> | ||
<WarningLevel>3</WarningLevel> | ||
<DocumentationFile>bin\Debug\FSharpx.TypeProviders.Xaml.Tests.ExternalControl.XML</DocumentationFile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<Optimize>true</Optimize> | ||
<Tailcalls>true</Tailcalls> | ||
<OutputPath>bin\Release\</OutputPath> | ||
<DefineConstants>TRACE</DefineConstants> | ||
<WarningLevel>3</WarningLevel> | ||
<DocumentationFile>bin\Release\FSharpx.TypeProviders.Xaml.Tests.ExternalControl.XML</DocumentationFile> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<Reference Include="mscorlib" /> | ||
<Reference Include="FSharp.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> | ||
<Private>True</Private> | ||
</Reference> | ||
<Reference Include="PresentationCore" /> | ||
<Reference Include="PresentationFramework" /> | ||
<Reference Include="System" /> | ||
<Reference Include="System.Core" /> | ||
<Reference Include="System.Numerics" /> | ||
<Reference Include="System.Xaml" /> | ||
<Reference Include="UIAutomationTypes" /> | ||
<Reference Include="WindowsBase" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<Compile Include="MyExternalButton.fs" /> | ||
</ItemGroup> | ||
<PropertyGroup> | ||
<MinimumVisualStudioVersion Condition="'$(MinimumVisualStudioVersion)' == ''">11</MinimumVisualStudioVersion> | ||
</PropertyGroup> | ||
<Import Project="$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets" Condition=" Exists('$(MSBuildExtensionsPath32)\..\Microsoft SDKs\F#\3.0\Framework\v4.0\Microsoft.FSharp.Targets')" /> | ||
<!-- 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> |
7 changes: 7 additions & 0 deletions
7
tests/FSharpx.TypeProviders.Xaml.Tests.ExternalControl/MyExternalButton.fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace FSharpx.TypeProviders.Tests.Xaml | ||
|
||
type public MyExternalButton() = | ||
inherit System.Windows.Controls.Button() | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
tests/FSharpx.TypeProviders.Xaml.Tests/FSharpx.TypeProviders.Xaml.Tests.sln
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio 2012 | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharpx.TypeProviders.Xaml.Tests", "FSharpx.TypeProviders.Xaml.Tests.fsproj", "{36B258D4-1AA4-4031-906A-228E649A3EC4}" | ||
EndProject | ||
Project("{F2A71F9B-5D33-465A-A702-920D77279786}") = "FSharpx.TypeProviders.Xaml.Tests.ExternalControl", "..\FSharpx.TypeProviders.Xaml.Tests.ExternalControl\FSharpx.TypeProviders.Xaml.Tests.ExternalControl.fsproj", "{94B8EDAD-06D1-44A8-AC44-906D7B6A37AB}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{36B258D4-1AA4-4031-906A-228E649A3EC4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{36B258D4-1AA4-4031-906A-228E649A3EC4}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{36B258D4-1AA4-4031-906A-228E649A3EC4}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{36B258D4-1AA4-4031-906A-228E649A3EC4}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{94B8EDAD-06D1-44A8-AC44-906D7B6A37AB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{94B8EDAD-06D1-44A8-AC44-906D7B6A37AB}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{94B8EDAD-06D1-44A8-AC44-906D7B6A37AB}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{94B8EDAD-06D1-44A8-AC44-906D7B6A37AB}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
namespace any | ||
type MyButton() = | ||
inherit System.Windows.Controls.Button() | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:ext="clr-namespace:FSharpx.TypeProviders.Tests.Xaml;assembly=FSharpx.TypeProviders.Xaml.Tests.ExternalControl" | ||
xmlns:any="clr-namespace:any;assembly=FSharpx.TypeProviders.Xaml.Tests" | ||
Title="MainWindow" Height="350" Width="525"> | ||
<Grid Name="MainGrid"> | ||
<StackPanel Name="StackPanel1"> | ||
<Button Name="Button1">First Button</Button> | ||
<Button Name="Button2">Second Button</Button> | ||
<!-- <Button Name="Control">An unfortunately named button</Button> --> | ||
<any:MyButton x:Name="InternalComponent">My internal component should get the type object</any:MyButton> | ||
<ext:MyExternalButton x:Name="ExternalComponent">My external component should get a type other than object</ext:MyExternalButton> | ||
</StackPanel> | ||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters