GithubHelp home page GithubHelp logo

marb2000 / xamlislands Goto Github PK

View Code? Open in Web Editor NEW
48.0 11.0 19.0 7.07 MB

Repository with several XAML Islands v1 samples (Win32, WPF, and WinForms) to demonstrate how to use it.

License: MIT License

C# 38.50% C++ 56.70% C 4.79%
xaml-islands wpf winforms winrt csharp windows-xaml-host uwp xaml xaml-winrt windows-10

xamlislands's Introduction

Hi visitor 👋

I'm a Product Manager (PM) at Google where I work on developer experiences (leading many SDKs for multiple languages and platforms), including generative AI experiences for developers. I love crafting software products, especially those designed for developers. I get a lot of satisfaction from creating frameworks and tools that empower millions of developers to build innovative apps.

Prior to my current role, I was a PM at Microsoft where I worked on Windows OS, APIs, and SDKs. I helped create user experiences for Windows itself and enabled developers to create great apps for it. Some SDKs and tools where I put my energy were Windows Runtime, UWP, Windows App SDK, and WinUI. Additionally, I had the privilege of collaborating with brilliant minds on the Azure, .NET and Visual Studio teams, among others.

I’m from Seville, Spain, a beautiful city that you should visit. I’ve been living in Seattle since 2012. I’ve been fascinated with computers since I was a kid. I’ve always loved books and comics, so by 12, I had developed a digital catalog for my Marvel comic collection in Clipper. When I was around 15, I started developing games using C and ASM. Before I started working as PM, I spent several years as a developer, researcher assistant, developer advocate, and application development manager.

Feel free to connect with me via X or LinkedIn

Thank you for taking the time to read about me!

-Miguel

xamlislands's People

Contributors

ocalvo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xamlislands's Issues

DataGrid

I would love to replace an existing WPF datagrid which recently went closed source with UWP DataGrid.

However I couldn't add it as xamlhost control since it is not part of Windows.UI.Xaml.Controls

Any chance of an example of DataGrid in WPF?

Thanks!

Xaml island app fails on Microsoft store

I am trying to submit an App built using XAML ISLAND based WPF .Net Core 3.1 App. However, the package is failing with:

WAP_3.20.1.0_x64_bundle.msixupload121.2 MB
Package acceptance validation error: You cannot submit pre-compiled .NET Native packages. Please upload the Microsoft Store appxupload file and try again

I have built the sample Xaml Island Apps from this github also, however they all fail with same error. Please help me.

Compilation issue

I'm new to XamlIslands and found this set of samples so I downloaded them and opened the CppWinRT_Win32_App solution using my VS 2019 version 16.7.4. I set the config to Debug x64 and did a build. I keep getting this error:

1>D:\XamlIslands\XamlIslands-master\1903_Samples\CppWinRT_Win32_App\obj\x64\Debug\MyApp\Generated Files\winrt\Windows.Foundation.Collections.h(1244,50): error C2039: 'back_inserter': is not a member of 'std'

I would note that when I open the solution a "Settings" window appears and I have no ideal what I am supposed to do with it so I dismiss it.

Custom Controls in WPF with XamlHost Preview4

I tried to run some samples that you provided, but, until now, only .NET Core Forms App with Custom Control scenario worked. I tried too create new projects like yours, but I'm getting the same exception:

image

Looking for current states, It's normal? Thanks after all

Class not registered error

When creating the app object

winrt::MyApp::App app;

I get the error:

Exception thrown at 0x00007FF9CA2C9129 (KernelBase.dll) in SampleCppApp.exe: WinRT originate error - 0x80040154 : 'Class not registered'.

Feedback and errors

I'm trying to build a similar app to the Winforms on netcore3.0 example.

Unfortunately I can't get it to work following the steps in https://github.com/marb2000/XamlIslands/blob/master/1903_Samples/WnForms_and_WPF_Readme.md, even though this seems to be the most exhaustive explanation I can find.

Setup:

  • Visual Studio 16.3 Preview 1
  • .net core 3.0 preview 7

What am I trying:

  • Winforms project written in .net core that sits in Systray
  • UWP class library containing user controls, theme resources and assets
    • user control class library references the Microsoft.Toolkit.Uwp.UI.Animations nuget package

What did I miss from the explanation:

  • Platforms + RuntimeIdentifiers need to be set to x86/x64 (VS also gives a warning about the VCForwarders if you do not do that). VS template for Winforms on netcore3.0 does not set them by default and then VS thinks you want to use AnyCpu.
    <Platforms>x64;x86</Platforms>
    <RuntimeIdentifiers>win-x64;win-x86</RuntimeIdentifiers>

If I do not add this, I get a warning:

Because your app is being built as AnyCPU no Microsoft.VCRTForwarders.140 DLLs were copied to your ouput folder. Microsoft.VCRTForwarders.140 only supports x86 or x64 applications due to a C++ Runtime dependency. Please change your app project architecture to x86 or x64 in the Configuration Manager.

After adding this, the app does not start anymore on x86:

The target process exited without raising a CoreCLR started event. Ensure that the target process is configured to use .NET Core. This may be expected if the target process did not run on .NET Core.

On x64, the app raises an exception:

System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Toolkit.Uwp.UI.Animations, Version=5.1.0.0, Culture=neutral, PublicKeyToken=null'.

Are the Microsoft.Toolkit.Uwp.UI.Animations supported in xaml islands? Should I include them in a special way?

Missing license

It doesn't look like the repo nor any of the source files have an open-source license, and therefore can't be used by others. Since this is sample code, can an open-source license be added?

Is it possible to receive push notifications from WNS in a WPF app, which uses Xaml Islands?

I'm creating an app in WPF and using Xaml Islands to add UWP look and feel to it.

I'd like to receive push notifications from Amazon SNS, using the Windows Push Notification Services (WNS). Following this article to create a notification channel, I tried to run the this code:

await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();

But it failed with the following very verbose exception: Element not found. (0x80070490). I tried also to run it in a custom UWP component, but the result was the same.

So, my question is that, is it possible to receive push notifications from WNS with this kind of app type?

C++ example is awful

The example tries to show me how to wrap window behavior in a class, which I already know how to and I already did in my code base: I'm trying to integrate Xaml Islands to an existing application, not trying to undo your abstractions so that I can understand what is going on (it hides important behavior in base classes split around the whole code base - the main part of getting Xaml Islands working, creating a DesktopWindowXamlSource, isn't even in the file with the entry point)

It doesn't explain design decisions: why use an event revoker for an event which literally just changes a text label's content???

Thought you could run it to understand it better? Too bad for you (after you've figured out how to make a self-signed certificate, of course, because none is included in the repo and VS isn't smart enough to generate a new one on its own, instead redirecting you to some PowerShell commands with arcane parameters):
image
image
(trying to launch the SampleCppApp directly instead project gives you a module not found hresult exception)

The examples should be kept to minimal changes from the base vs project for a win32 desktop app, and have the whole code in 1 or 2 files. Custom controls in such an example would be fine, because it's ignorable when trying to get the base stuff running.

Submit Samples

Hello Miguel Ramos,

I would like to submit my WPF XamlIslands samples here . Can I create pull request and submit it.

Thanks & Regards,
Vinoth.

Could we please get a XAML Islands example for WPF .Net 5 using CsWinRT

I'm assuming we should be using CsWinRT when accessing UWP APIs from WPF .Net 5. That said, it doesn't look like XAML Islands are supported yet (not sure since there are no examples out there).

Could you please clarify how XAML Islands are to be used in a WPF .Net 5 app that uses CsWinRT.

SwapChainPanel example

Hi could you please show an example about how to use a SwapChainPanel wrapped control in a .WPF .NET Core 3 app?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.