Let's use XAML Island on WPF app without changing C# code behind

Published 10-24-2019 08:55 PM 2,776 Views
Microsoft

Final answer is case by case. However, if you had been creating apps using MVVM pattern, then there is possible that it's easy to migrate to UWP controls using XAML Islands.

 

In this article, I migrate to UWP controls using XAML Islands from WPF controls.

The sample app

I created a simple application like below:

itemmanager.gif


The app is a really simple MVVM app. MainPage.xaml is as below:

 

 

<Window x:Class="WpfApp.Views.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:WpfApp.Views"
        xmlns:viewModels="clr-namespace:WpfApp.ViewModels"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Window.DataContext>
        <viewModels:MainWindowViewModel />
    </Window.DataContext>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <local:ItemsTreeView SelectionChanged="ItemsTreeView_SelectionChanged" />
        <local:ContentItemView Grid.Column="1" />
    </Grid>
</Window>

 

 

 

The left side is a UserControl that name is ItemsTreeView. The UserControl is to display TreeView and raise a SelectionChanged event when selection changed on the TreeView.

 

The right side is a UserControl that name is ContentItemView. The UserControl is to provide displaying and editing features to selected item on the TreeView.

 

A following picture is a project structure of the app.

clipboard_image_1.png

WpfApp.Models project is a Class Library project of .NET Standard 2.0. WpfApp project is a WPF App(.NET Core) project.

Let's set up for XAML Islands

The details is written on this document. I have set up my solution like following:

clipboard_image_2.png

 

UWPApp project and UWPApp.Controls project references WpfApp.Models project.

And I've created two UserControls to UWPApp.Controls project:

clipboard_image_3.png

 

Those are implemented same as WPF's ones. For example, TreeView tag of ItemsTreeView.xaml is:

 

 

<TreeView x:Name="treeView" ItemsSource="{Binding Categories}"
          ItemTemplateSelector="{StaticResource treeViewItemTemplateSelector}"
          SelectedItemChanged="TreeView_SelectedItemChanged">
</TreeView>

 

 


TreeView tag of UWPItemsTreeView.xaml is:

 

 

<winui:TreeView x:Name="treeView" ItemsSource="{Binding Categories}"
                ItemTemplateSelector="{StaticResource treeViewItemTemplateSelector}"
                ItemInvoked="treeView_ItemInvoked">
</winui:TreeView>

 

 

 

As with WPF, it can use data binding feature on UWP controls, even if using XAML Islands. And it also can use compile time data binding feature, if target data type is in Class Library in .NET Standard, like below:

 

 

<DataTemplate x:DataType="models:Item">
    <winui:TreeViewItem>
        <TextBlock>
            <Run Text="{x:Bind Name, Mode=OneWay}" />
            <Run Text=": " />
            <Run Text="{x:Bind Emoji, Mode=OneWay}" />
        </TextBlock>
    </winui:TreeViewItem>
</DataTemplate>

 

 

 

Let's replace to UWP controls

Adding Microsoft.Toolkit.Wpf.UI.Controls package to the WPF project, and change MainWindow.xaml to use WindowsXamlHost control.

 

 

<Window x:Class="WpfApp.Views.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:WpfApp.Views"
        xmlns:viewModels="clr-namespace:WpfApp.ViewModels"
        xmlns:xaml="clr-namespace:Microsoft.Toolkit.Wpf.UI.XamlHost;assembly=Microsoft.Toolkit.Wpf.UI.XamlHost"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Window.DataContext>
        <viewModels:MainWindowViewModel />
    </Window.DataContext>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <xaml:WindowsXamlHost InitialTypeName="UWPApp.Controls.UwpItemsTreeView" ChildChanged="UwpItemTreeViewHost_ChildChanged" />
        <xaml:WindowsXamlHost InitialTypeName="UWPApp.Controls.UwpContentItemView" ChildChanged="UwpContentItemView_ChildChanged" Grid.Column="1" />
    </Grid>
</Window>

 

 

 

And WindowsXamlHost doesn't have a feature to inherit DataContext value, so set up it on ChildChanged event handler:

 

 

using Microsoft.Toolkit.Wpf.UI.XamlHost;
using System.Windows;
using UWPApp.Controls;
using WpfApp.Models;
using WpfApp.ViewModels;

namespace WpfApp.Views
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }

        private void UwpItemTreeViewHost_ChildChanged(object sender, System.EventArgs e)
        {
            var host = (WindowsXamlHost)sender;
            if (host.Child is UwpItemsTreeView treeView)
            {
                treeView.DataContext = DataContext;
                treeView.SelectionChanged += (_, args) =>
                {
                    ((MainWindowViewModel)DataContext).SelectedItem = args.SelectedItem as Item;
                };
            }
        }

        private void UwpContentItemView_ChildChanged(object sender, System.EventArgs e)
        {
            var host = (WindowsXamlHost)sender;
            if (host.Child is UwpContentItemView itemView)
            {
                itemView.DataContext = DataContext;
            }
        }
    }
}

 

 

 

And, launch the app, then the following window is displayed:

itemmanager2.gif


Color emoji is fine. And the controls size is touch friendly. If you don't need touch friendly size, then you can also use compact size:

itemmanager3.gif


And also, if you like dark mode, then it can be used really easy. it's just adding RequestedTheme="Dark" to App.xaml of UWPApp project.

itemmanager4.gif

 

Improve XAML

Currently, I have been using WindowsXamlHost control on MainWindow.xaml, like below:

 

 

<xaml:WindowsXamlHost InitialTypeName="UWPApp.Controls.UwpItemsTreeView" ChildChanged="UwpItemTreeViewHost_ChildChanged" />

 

 

 

I think it is not good. Because I have to set DataContext property manually. And I also have to set any other properties and event handlers in C# code. I'm XAMLer, so I would like to write almost all in XAML.

InkCanvas control that is provided from Windows Community Toolkit is on XAML Islands, however it doesn't use WindowsXamlHost control.

I checked the source code(It's OSS!). The control inherits WindowsXamlHostBase class, and it was binding properties using Bind method.

 

I created two wrapper control like following:

UWPItemsTreeView class:

 

 

using Microsoft.Toolkit.Wpf.UI.XamlHost;
using System;
using WpfApp.Views;
using UWPControl = UWPApp.Controls.UwpItemsTreeView;

namespace WpfApp.Wrapper
{
    public class UWPItemsTreeView : WindowsXamlHostBase
    {
        public event EventHandler<TreeViewSelectionChangedEventArgs>? SelectionChanged;
        public UWPItemsTreeView() : base(typeof(UWPControl).FullName)
        {
        }

        protected override void OnInitialized(EventArgs e)
        {
            Bind(nameof(DataContext), DataContextProperty, UWPControl.DataContextProperty);
            base.OnInitialized(e);
        }

        protected override void OnChildChanged()
        {
            if (ChildInternal is UWPControl c)
            {
                c.SelectionChanged += ChildInternal_SelectionChanged;
            }

            base.OnChildChanged();
        }

        private void ChildInternal_SelectionChanged(object? sender, UWPApp.Controls.TreeViewSelectionChangedEventArgs e)
        {
            SelectionChanged?.Invoke(this, new TreeViewSelectionChangedEventArgs(e.SelectedItem));
        }
    }
}

 

 

 

UwpContentItemView class:

 

 

using Microsoft.Toolkit.Wpf.UI.XamlHost;
using System;
using UWPControl = UWPApp.Controls.UwpContentItemView;

namespace WpfApp.Wrapper
{
    public class UwpContentItemView : WindowsXamlHostBase
    {
        public UwpContentItemView() : base(typeof(UWPControl).FullName)
        {
        }

        protected override void OnInitialized(EventArgs e)
        {
            Bind(nameof(DataContext), DataContextProperty, UWPControl.DataContextProperty);
            base.OnInitialized(e);
        }
    }
}

 

 

 

And I modified MainWindow.xaml to use those.

 

 

<Window x:Class="WpfApp.Views.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:WpfApp.Views"
        xmlns:viewModels="clr-namespace:WpfApp.ViewModels"
        xmlns:wrapper="clr-namespace:WpfApp.Wrapper"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <Window.DataContext>
        <viewModels:MainWindowViewModel />
    </Window.DataContext>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <wrapper:UWPItemsTreeView SelectionChanged="ItemsTreeView_SelectionChanged" />
        <wrapper:UwpContentItemView Grid.Column="1" />
    </Grid>
</Window>

 

 

 

And I removed ChildChanged event handler from the code behind.

That's all. The app is continuously work fine, and XAML looks nice.

The source code is following github repository:

https://github.com/runceel/IgniteLT

Wrap up

XAML Islands is great feature to import modern look and feel to Win32 apps.

Color emoji(:sushi::cat::dog_face::rooster::map_of_japan::cat_face:‍:bust_in_silhouette:) is fine, touch friendly is also fine, and high dpi support is well.

 

And WinUI 3.0 or later, XAML Islands will be delivered with WinUI, and it supports Windows 10 Creators Update or later.

It means all UWP Controls are going to be able to use on all Win32 apps on all supported Windows 10.

 

I'm really looking forward to it being released. If you also feel it is interesting, please check the details on the roadmap of WinUI:

https://github.com/microsoft/microsoft-ui-xaml/blob/master/docs/roadmap.md

 

%3CLINGO-SUB%20id%3D%22lingo-sub-950844%22%20slang%3D%22en-US%22%3ELet's%20use%20XAML%20Island%20on%20WPF%20app%20without%20changing%20C%23%20code%20behind%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-950844%22%20slang%3D%22en-US%22%3E%3CP%3EFinal%20answer%20is%20case%20by%20case.%20However%2C%20if%20you%20had%20been%20creating%20apps%20using%20MVVM%20pattern%2C%20then%20there%20is%20possible%20that%20it's%20easy%20to%20migrate%20to%20UWP%20controls%20using%20XAML%20Islands.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20this%20article%2C%20I%20migrate%20to%20UWP%20controls%20using%20XAML%20Islands%20from%20WPF%20controls.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1849610630%22%20id%3D%22toc-hId-1849610628%22%3EThe%20sample%20app%3C%2FH2%3E%0A%3CP%3EI%20created%20a%20simple%20application%20like%20below%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F148693i8F4392E403F0AEB8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22itemmanager.gif%22%20title%3D%22itemmanager.gif%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EThe%20app%20is%20a%20really%20simple%20MVVM%20app.%20MainPage.xaml%20is%20as%20below%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CWINDOW%20class%3D%22WpfApp.Views.MainWindow%22%20xmlns%3D%22%26lt%3BA%20href%3D%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fwinfx%2F2006%2Fxaml%2Fpresentation%22%0A%20%20%20%20%20%20%20%20xmlns%3Ax%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fwinfx%2F2006%2Fxaml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fwinfx%2F2006%2Fxaml%3C%2FA%3E%22%0A%20%20%20%20%20%20%20%20xmlns%3Ad%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fexpression%2Fblend%2F2008%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fexpression%2Fblend%2F2008%3C%2FA%3E%22%0A%20%20%20%20%20%20%20%20xmlns%3Amc%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.openxmlformats.org%2Fmarkup-compatibility%2F2006%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.openxmlformats.org%2Fmarkup-compatibility%2F2006%3C%2FA%3E%22%0A%20%20%20%20%20%20%20%20xmlns%3Alocal%3D%22clr-namespace%3AWpfApp.Views%22%0A%20%20%20%20%20%20%20%20xmlns%3AviewModels%3D%22clr-namespace%3AWpfApp.ViewModels%22%0A%20%20%20%20%20%20%20%20mc%3AIgnorable%3D%22d%22%0A%20%20%20%20%20%20%20%20Title%3D%22MainWindow%22%20Height%3D%22450%22%20Width%3D%22800%22%26gt%3B%0A%20%20%20%20%3CWINDOW.DATACONTEXT%3E%0A%20%20%20%20%20%20%20%20%3CMAINWINDOWVIEWMODEL%3E%3C%2FMAINWINDOWVIEWMODEL%3E%0A%20%20%20%20%3C%2FWINDOW.DATACONTEXT%3E%0A%20%20%20%20%3CGRID%3E%0A%20%20%20%20%20%20%20%20%3CGRID.COLUMNDEFINITIONS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CCOLUMNDEFINITION%3E%3C%2FCOLUMNDEFINITION%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CCOLUMNDEFINITION%3E%3C%2FCOLUMNDEFINITION%3E%0A%20%20%20%20%20%20%20%20%3C%2FGRID.COLUMNDEFINITIONS%3E%0A%20%20%20%20%20%20%20%20%3CITEMSTREEVIEW%20selectionchanged%3D%22ItemsTreeView_SelectionChanged%22%3E%3C%2FITEMSTREEVIEW%3E%0A%20%20%20%20%20%20%20%20%3CCONTENTITEMVIEW%20grid.column%3D%221%22%3E%3C%2FCONTENTITEMVIEW%3E%0A%20%20%20%20%3C%2FGRID%3E%0A%3C%2FWINDOW%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20left%20side%20is%20a%20UserControl%20that%20name%20is%20ItemsTreeView.%20The%20UserControl%20is%20to%20display%20TreeView%20and%20raise%20a%20SelectionChanged%20event%20when%20selection%20changed%20on%20the%20TreeView.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20right%20side%20is%20a%20UserControl%20that%20name%20is%20ContentItemView.%20The%20UserControl%20is%20to%20provide%20displaying%20and%20editing%20features%20to%20selected%20item%20on%20the%20TreeView.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorclipboard_image_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3EA%20following%20picture%20is%20a%20project%20structure%20of%20the%20app.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F148778i348633208258ADAD%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_1.png%22%20title%3D%22clipboard_image_1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3EWpfApp.Models%20project%20is%20a%20Class%20Library%20project%20of%20.NET%20Standard%202.0.%20WpfApp%20project%20is%20a%20WPF%20App(.NET%20Core)%20project.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--702546331%22%20id%3D%22toc-hId--702546333%22%3ELet's%20set%20up%20for%20XAML%20Islands%3C%2FH2%3E%0A%3CP%3EThe%20details%20is%20written%20on%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%2Fapps%2Fdesktop%2Fmodernize%2Fhost-custom-control-with-xaml-islands%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ethis%20document%3C%2FA%3E.%20I%20have%20set%20up%20my%20solution%20like%20following%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F148805i14F8DB58150E0995%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_2.png%22%20title%3D%22clipboard_image_2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EUWPApp%20project%20and%20UWPApp.Controls%20project%20references%20WpfApp.Models%20project.%3C%2FP%3E%0A%3CP%3EAnd%20I've%20created%20two%20UserControls%20to%20UWPApp.Controls%20project%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F148814iC11AA209307F08C0%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20alt%3D%22clipboard_image_3.png%22%20title%3D%22clipboard_image_3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThose%20are%20implemented%20same%20as%20WPF's%20ones.%20For%20example%2C%20TreeView%20tag%20of%20ItemsTreeView.xaml%20is%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CTREEVIEW%20name%3D%22treeView%22%20itemssource%3D%22%7BBinding%20Categories%7D%22%20itemtemplateselector%3D%22%7BStaticResource%20treeViewItemTemplateSelector%7D%22%20selecteditemchanged%3D%22TreeView_SelectedItemChanged%22%3E%0A%3C%2FTREEVIEW%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3ETreeView%20tag%20of%20UWPItemsTreeView.xaml%20is%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CTREEVIEW%20name%3D%22treeView%22%20itemssource%3D%22%7BBinding%20Categories%7D%22%20itemtemplateselector%3D%22%7BStaticResource%20treeViewItemTemplateSelector%7D%22%20iteminvoked%3D%22treeView_ItemInvoked%22%3E%0A%3C%2FTREEVIEW%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20with%20WPF%2C%20it%20can%20use%20data%20binding%20feature%20on%20UWP%20controls%2C%20even%20if%20using%20XAML%20Islands.%20And%20it%20also%20can%20use%20compile%20time%20data%20binding%20feature%2C%20if%20target%20data%20type%20is%20in%20Class%20Library%20in%20.NET%20Standard%2C%20like%20below%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CDATATEMPLATE%20datatype%3D%22models%3AItem%22%3E%0A%20%20%20%20%3CTREEVIEWITEM%3E%0A%20%20%20%20%20%20%20%20%3CTEXTBLOCK%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CRUN%20text%3D%22%7Bx%3ABind%20Name%2C%20Mode%3DOneWay%7D%22%3E%3C%2FRUN%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CRUN%20text%3D%22%3A%20%22%3E%3C%2FRUN%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CRUN%20text%3D%22%7Bx%3ABind%20Emoji%2C%20Mode%3DOneWay%7D%22%3E%3C%2FRUN%3E%0A%20%20%20%20%20%20%20%20%3C%2FTEXTBLOCK%3E%0A%20%20%20%20%3C%2FTREEVIEWITEM%3E%0A%3C%2FDATATEMPLATE%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-1040264004%22%20id%3D%22toc-hId-1040264002%22%3ELet's%20replace%20to%20UWP%20controls%3C%2FH2%3E%0A%3CP%3EAdding%26nbsp%3BMicrosoft.Toolkit.Wpf.UI.Controls%20package%20to%20the%20WPF%20project%2C%20and%20change%20MainWindow.xaml%20to%20use%20WindowsXamlHost%20control.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CWINDOW%20class%3D%22WpfApp.Views.MainWindow%22%20xmlns%3D%22%26lt%3BA%20href%3D%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fwinfx%2F2006%2Fxaml%2Fpresentation%22%0A%20%20%20%20%20%20%20%20xmlns%3Ax%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fwinfx%2F2006%2Fxaml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fwinfx%2F2006%2Fxaml%3C%2FA%3E%22%0A%20%20%20%20%20%20%20%20xmlns%3Ad%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fexpression%2Fblend%2F2008%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fexpression%2Fblend%2F2008%3C%2FA%3E%22%0A%20%20%20%20%20%20%20%20xmlns%3Amc%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.openxmlformats.org%2Fmarkup-compatibility%2F2006%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.openxmlformats.org%2Fmarkup-compatibility%2F2006%3C%2FA%3E%22%0A%20%20%20%20%20%20%20%20xmlns%3Alocal%3D%22clr-namespace%3AWpfApp.Views%22%0A%20%20%20%20%20%20%20%20xmlns%3AviewModels%3D%22clr-namespace%3AWpfApp.ViewModels%22%0A%20%20%20%20%20%20%20%20xmlns%3Axaml%3D%22clr-namespace%3AMicrosoft.Toolkit.Wpf.UI.XamlHost%3Bassembly%3DMicrosoft.Toolkit.Wpf.UI.XamlHost%22%0A%20%20%20%20%20%20%20%20mc%3AIgnorable%3D%22d%22%0A%20%20%20%20%20%20%20%20Title%3D%22MainWindow%22%20Height%3D%22450%22%20Width%3D%22800%22%26gt%3B%0A%20%20%20%20%3CWINDOW.DATACONTEXT%3E%0A%20%20%20%20%20%20%20%20%3CMAINWINDOWVIEWMODEL%3E%3C%2FMAINWINDOWVIEWMODEL%3E%0A%20%20%20%20%3C%2FWINDOW.DATACONTEXT%3E%0A%20%20%20%20%3CGRID%3E%0A%20%20%20%20%20%20%20%20%3CGRID.COLUMNDEFINITIONS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CCOLUMNDEFINITION%3E%3C%2FCOLUMNDEFINITION%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CCOLUMNDEFINITION%3E%3C%2FCOLUMNDEFINITION%3E%0A%20%20%20%20%20%20%20%20%3C%2FGRID.COLUMNDEFINITIONS%3E%0A%20%20%20%20%20%20%20%20%3CWINDOWSXAMLHOST%20initialtypename%3D%22UWPApp.Controls.UwpItemsTreeView%22%20childchanged%3D%22UwpItemTreeViewHost_ChildChanged%22%3E%3C%2FWINDOWSXAMLHOST%3E%0A%20%20%20%20%20%20%20%20%3CWINDOWSXAMLHOST%20initialtypename%3D%22UWPApp.Controls.UwpContentItemView%22%20childchanged%3D%22UwpContentItemView_ChildChanged%22%20grid.column%3D%221%22%3E%3C%2FWINDOWSXAMLHOST%3E%0A%20%20%20%20%3C%2FGRID%3E%0A%3C%2FWINDOW%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20WindowsXamlHost%20doesn't%20have%20a%20feature%20to%20inherit%20DataContext%20value%2C%20so%20set%20up%20it%20on%20ChildChanged%20event%20handler%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3Eusing%20Microsoft.Toolkit.Wpf.UI.XamlHost%3B%0Ausing%20System.Windows%3B%0Ausing%20UWPApp.Controls%3B%0Ausing%20WpfApp.Models%3B%0Ausing%20WpfApp.ViewModels%3B%0A%0Anamespace%20WpfApp.Views%0A%7B%0A%20%20%20%20%2F%2F%2F%20%3CSUMMARY%3E%0A%20%20%20%20%2F%2F%2F%20Interaction%20logic%20for%20MainWindow.xaml%0A%20%20%20%20%2F%2F%2F%20%3C%2FSUMMARY%3E%0A%20%20%20%20public%20partial%20class%20MainWindow%20%3A%20Window%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20public%20MainWindow()%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20InitializeComponent()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20private%20void%20UwpItemTreeViewHost_ChildChanged(object%20sender%2C%20System.EventArgs%20e)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20host%20%3D%20(WindowsXamlHost)sender%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(host.Child%20is%20UwpItemsTreeView%20treeView)%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20treeView.DataContext%20%3D%20DataContext%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20treeView.SelectionChanged%20%2B%3D%20(_%2C%20args)%20%3D%26gt%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20((MainWindowViewModel)DataContext).SelectedItem%20%3D%20args.SelectedItem%20as%20Item%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20private%20void%20UwpContentItemView_ChildChanged(object%20sender%2C%20System.EventArgs%20e)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20host%20%3D%20(WindowsXamlHost)sender%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(host.Child%20is%20UwpContentItemView%20itemView)%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20itemView.DataContext%20%3D%20DataContext%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%2C%20launch%20the%20app%2C%20then%20the%20following%20window%20is%20displayed%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F148955i8709A036E29464D2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22itemmanager2.gif%22%20title%3D%22itemmanager2.gif%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EColor%20emoji%20is%20fine.%20And%20the%20controls%20size%20is%20touch%20friendly.%20If%20you%20don't%20need%20touch%20friendly%20size%2C%20then%20you%20can%20also%20use%20compact%20size%3A%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F148995i3D0CFA8CC42A087B%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22itemmanager3.gif%22%20title%3D%22itemmanager3.gif%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EAnd%20also%2C%20if%20you%20like%20dark%20mode%2C%20then%20it%20can%20be%20used%20really%20easy.%20it's%20just%20adding%20RequestedTheme%3D%22Dark%22%20to%20App.xaml%20of%20UWPApp%20project.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F149017i4AE6F00FE01DECB2%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20alt%3D%22itemmanager4.gif%22%20title%3D%22itemmanager4.gif%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--1511892957%22%20id%3D%22toc-hId--1511892959%22%3EImprove%20XAML%3C%2FH2%3E%0A%3CP%3ECurrently%2C%20I%20have%20been%20using%20WindowsXamlHost%20control%20on%20MainWindow.xaml%2C%20like%20below%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CWINDOWSXAMLHOST%20initialtypename%3D%22UWPApp.Controls.UwpItemsTreeView%22%20childchanged%3D%22UwpItemTreeViewHost_ChildChanged%22%3E%3C%2FWINDOWSXAMLHOST%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20think%20it%20is%20not%20good.%20Because%20I%20have%20to%20set%20DataContext%20property%20manually.%20And%20I%20also%20have%20to%20set%20any%20other%20properties%20and%20event%20handlers%20in%20C%23%20code.%20I'm%20XAMLer%2C%20so%20I%20would%20like%20to%20write%20almost%20all%20in%20XAML.%3C%2FP%3E%0A%3CP%3EInkCanvas%20control%20that%20is%20provided%20from%20Windows%20Community%20Toolkit%20is%20on%20XAML%20Islands%2C%20however%20it%20doesn't%20use%20WindowsXamlHost%20control.%3C%2FP%3E%0A%3CP%3EI%20checked%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fwindows-toolkit%2FMicrosoft.Toolkit.Win32%2Fblob%2F537a56d64fe3a913b0d6759b4935b25a91926191%2FMicrosoft.Toolkit.Wpf.UI.Controls%2FInkCanvas%2FInkCanvas.cs%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ethe%20source%20code%3C%2FA%3E(It's%20OSS!).%20The%20control%20inherits%20WindowsXamlHostBase%20class%2C%20and%20it%20was%20binding%20properties%20using%20Bind%20method.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20created%20two%20wrapper%20control%20like%20following%3A%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId--162109632%22%20id%3D%22toc-hId--162109634%22%3EUWPItemsTreeView%20class%3A%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3Eusing%20Microsoft.Toolkit.Wpf.UI.XamlHost%3B%0Ausing%20System%3B%0Ausing%20WpfApp.Views%3B%0Ausing%20UWPControl%20%3D%20UWPApp.Controls.UwpItemsTreeView%3B%0A%0Anamespace%20WpfApp.Wrapper%0A%7B%0A%20%20%20%20public%20class%20UWPItemsTreeView%20%3A%20WindowsXamlHostBase%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20public%20event%20EventHandler%3CTREEVIEWSELECTIONCHANGEDEVENTARGS%3E%3F%20SelectionChanged%3B%0A%20%20%20%20%20%20%20%20public%20UWPItemsTreeView()%20%3A%20base(typeof(UWPControl).FullName)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20protected%20override%20void%20OnInitialized(EventArgs%20e)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20Bind(nameof(DataContext)%2C%20DataContextProperty%2C%20UWPControl.DataContextProperty)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20base.OnInitialized(e)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20protected%20override%20void%20OnChildChanged()%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(ChildInternal%20is%20UWPControl%20c)%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20c.SelectionChanged%20%2B%3D%20ChildInternal_SelectionChanged%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20%20%20%20%20base.OnChildChanged()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20private%20void%20ChildInternal_SelectionChanged(object%3F%20sender%2C%20UWPApp.Controls.TreeViewSelectionChangedEventArgs%20e)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20SelectionChanged%3F.Invoke(this%2C%20new%20TreeViewSelectionChangedEventArgs(e.SelectedItem))%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D%0A%3C%2FTREEVIEWSELECTIONCHANGEDEVENTARGS%3E%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH4%20id%3D%22toc-hId-1580700703%22%20id%3D%22toc-hId-1580700701%22%3EUwpContentItemView%20class%3A%3C%2FH4%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-csharp%22%3E%3CCODE%3Eusing%20Microsoft.Toolkit.Wpf.UI.XamlHost%3B%0Ausing%20System%3B%0Ausing%20UWPControl%20%3D%20UWPApp.Controls.UwpContentItemView%3B%0A%0Anamespace%20WpfApp.Wrapper%0A%7B%0A%20%20%20%20public%20class%20UwpContentItemView%20%3A%20WindowsXamlHostBase%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20public%20UwpContentItemView()%20%3A%20base(typeof(UWPControl).FullName)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%7D%0A%0A%20%20%20%20%20%20%20%20protected%20override%20void%20OnInitialized(EventArgs%20e)%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20Bind(nameof(DataContext)%2C%20DataContextProperty%2C%20UWPControl.DataContextProperty)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20base.OnInitialized(e)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20I%20modified%20MainWindow.xaml%20to%20use%20those.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-markup%22%3E%3CCODE%3E%3CWINDOW%20class%3D%22WpfApp.Views.MainWindow%22%20xmlns%3D%22%26lt%3BA%20href%3D%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fwinfx%2F2006%2Fxaml%2Fpresentation%22%0A%20%20%20%20%20%20%20%20xmlns%3Ax%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fwinfx%2F2006%2Fxaml%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fwinfx%2F2006%2Fxaml%3C%2FA%3E%22%0A%20%20%20%20%20%20%20%20xmlns%3Ad%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.microsoft.com%2Fexpression%2Fblend%2F2008%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.microsoft.com%2Fexpression%2Fblend%2F2008%3C%2FA%3E%22%0A%20%20%20%20%20%20%20%20xmlns%3Amc%3D%22%3CA%20href%3D%22http%3A%2F%2Fschemas.openxmlformats.org%2Fmarkup-compatibility%2F2006%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Ehttp%3A%2F%2Fschemas.openxmlformats.org%2Fmarkup-compatibility%2F2006%3C%2FA%3E%22%0A%20%20%20%20%20%20%20%20xmlns%3Alocal%3D%22clr-namespace%3AWpfApp.Views%22%0A%20%20%20%20%20%20%20%20xmlns%3AviewModels%3D%22clr-namespace%3AWpfApp.ViewModels%22%0A%20%20%20%20%20%20%20%20xmlns%3Awrapper%3D%22clr-namespace%3AWpfApp.Wrapper%22%0A%20%20%20%20%20%20%20%20mc%3AIgnorable%3D%22d%22%0A%20%20%20%20%20%20%20%20Title%3D%22MainWindow%22%20Height%3D%22450%22%20Width%3D%22800%22%26gt%3B%0A%20%20%20%20%3CWINDOW.DATACONTEXT%3E%0A%20%20%20%20%20%20%20%20%3CMAINWINDOWVIEWMODEL%3E%3C%2FMAINWINDOWVIEWMODEL%3E%0A%20%20%20%20%3C%2FWINDOW.DATACONTEXT%3E%0A%20%20%20%20%3CGRID%3E%0A%20%20%20%20%20%20%20%20%3CGRID.COLUMNDEFINITIONS%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CCOLUMNDEFINITION%3E%3C%2FCOLUMNDEFINITION%3E%0A%20%20%20%20%20%20%20%20%20%20%20%20%3CCOLUMNDEFINITION%3E%3C%2FCOLUMNDEFINITION%3E%0A%20%20%20%20%20%20%20%20%3C%2FGRID.COLUMNDEFINITIONS%3E%0A%20%20%20%20%20%20%20%20%3CUWPITEMSTREEVIEW%20selectionchanged%3D%22ItemsTreeView_SelectionChanged%22%3E%3C%2FUWPITEMSTREEVIEW%3E%0A%20%20%20%20%20%20%20%20%3CUWPCONTENTITEMVIEW%20grid.column%3D%221%22%3E%3C%2FUWPCONTENTITEMVIEW%3E%0A%20%20%20%20%3C%2FGRID%3E%0A%3C%2FWINDOW%3E%0A%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20I%20removed%20ChildChanged%20event%20handler%20from%20the%20code%20behind.%3C%2FP%3E%0A%3CP%3EThat's%20all.%20The%20app%20is%20continuously%20work%20fine%2C%20and%20XAML%20looks%20nice.%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3EThe%20source%20code%20is%20following%20github%20repository%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Frunceel%2FIgniteLT%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Frunceel%2FIgniteLT%3C%2FA%3E%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--578429248%22%20id%3D%22toc-hId--578429250%22%3EWrap%20up%3C%2FH2%3E%0A%3CP%3EXAML%20Islands%20is%20great%20feature%20to%20import%20modern%20look%20and%20feel%20to%20Win32%20apps.%3C%2FP%3E%0A%3CP%3EColor%20emoji(%3Asushi%3A%3Acat%3A%3Adog_face%3A%3Arooster%3A%3Amap_of_japan%3A%3Acat_face%3A%E2%80%8D%3Abust_in_silhouette%3A)%20is%20fine%2C%20touch%20friendly%20is%20also%20fine%2C%20and%20high%20dpi%20support%20is%20well.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20WinUI%203.0%20or%20later%2C%20XAML%20Islands%20will%20be%20delivered%20with%20WinUI%2C%20and%20it%20supports%20Windows%2010%20Creators%20Update%20or%20later.%3C%2FP%3E%0A%3CP%3EIt%20means%20all%20UWP%20Controls%20are%20going%20to%20be%20able%20to%20use%20on%20all%20Win32%20apps%20on%20all%20supported%20Windows%2010.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'm%20really%20looking%20forward%20to%20it%20being%20released.%20If%20you%20also%20feel%20it%20is%20interesting%2C%20please%20check%20the%20details%20on%20the%20roadmap%20of%20WinUI%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmicrosoft-ui-xaml%2Fblob%2Fmaster%2Fdocs%2Froadmap.md%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3Ehttps%3A%2F%2Fgithub.com%2Fmicrosoft%2Fmicrosoft-ui-xaml%2Fblob%2Fmaster%2Fdocs%2Froadmap.md%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Version history
Last update:
‎Oct 24 2019 09:21 PM
Updated by: