Skip to content

cnsuhao/WPFDXInterop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WPF DirectX Extensions

WPF DirectX Extensions allow you to easily host DirectX 10 and DirectX 11 content in WPF applications.

Getting Started

Where to get it

Resources

More Info

Code Example

XAML

<Window x:Class="WpfApplication5.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApplication5"
        mc:Ignorable="d"
        xmlns:DXExtensions="clr-namespace:Microsoft.Wpf.Interop.DirectX;assembly=Microsoft.Wpf.Interop.DirectX"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Image>
            <Image.Source>
                <DXExtensions:D3D11Image  x:Name="InteropImage"/>
            </Image.Source>
        </Image>
    </Grid>
</Window>

C#

The C# portions of interfacing with a native component that generates the DX visualization is not concise enough to host as an example. We would recommend that you look at sample code here to get a detailed understanding of the code required

Using WPF DirectX Extensions

The documentation explains how to install Visual Studio, add the WPF DirectX Extension NuGet package to your project, and get started using the API.

Building WPF DirectX Extensions from Source

What You Need

Build and Create WPF DirectX Extensions NuGet

  • Clone the Repository
  • Open Microsoft.Wpf.Interop.DirectX_winsdk or Microsoft.Wpf.Interop.DirectX_dxsdk solution from Source in Visual Studio
  • Change Build Configuration to Release and build for x86 and x64
  • Run BuildNuGetPackage in scripts to create nuget packages

About

Repo for WPF DX Interop support

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.7%
  • Batchfile 0.3%