CommunityToolkit / WindowsCommunityToolkit

The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building .NET apps with UWP and the Windows App SDK / WinUI 3 for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
https://docs.microsoft.com/windows/communitytoolkit/
Other
5.89k stars 1.38k forks source link

WPF InkCanvas - The inkable area of the ink canvas is 1/4 of the whole ink canvas #2539

Closed gsantopaolo closed 6 years ago

gsantopaolo commented 6 years ago

I'm submitting a bug report (I searched for similar issues and did not find one)

Current behavior

The inkable area of the ink canvas is 1/4 of the whole ink canvas: image The InkCanvas has a white background

Expected behavior

The inkable area of the ink canvas sould be the whole ink canvas area The InkCanvas shoud not have a background color

Minimal reproduction of the problem with instructions

Add the following XAML to a WPF app (.Net Framework 4.7.1)

`<Window x:Class="WpfApp1.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" Background="Red" xmlns:local="clr-namespace:WpfApp1" mc:Ignorable="d" Title="MainWindow" Height="450" Width="800" WindowStartupLocation="CenterScreen" WindowState="Maximized" xmlns:controls="clr-namespace:Microsoft.Toolkit.Wpf.UI.Controls;assembly=Microsoft.Toolkit.Wpf.UI.Controls">

`

Environment

Nuget Package(s): Microsoft.Toolkit.Wpf.UI.Controls 5.0.0-preview

Package Version(s):

Windows 10 Build Number:

Device form factor:

Visual Studio

Additional Information: Tested on a Surface Book 15' screen resolution: 3240 x 2160 Scale: 200% <-- please pay attention to this value my gut says that maybe is something relevant for the bug resolution

azchohfi commented 6 years ago

This is a known issue. https://docs.microsoft.com/en-us/windows/uwp/xaml-platform/xaml-host-controls#whats-not-yet-supported If you change it to 100%, it will work. Also, if you wrap the control using WindowsXamlHost, it should work. This package and all it's controls are still in preview, as everything in Windows 10 October 2018 Update (1809) is using the preview underling API (DesktopWindowXamlSource) which is in preview for this version of Windows.

gsantopaolo commented 6 years ago

@azchohfi Anyways the InkCanvas background shall be transparent... ;)

azchohfi commented 6 years ago

That is also a known issue, and unfortunately (for the current version of Windows 10, 1809) it is not transparent. That will most likely be fixed on a future release of Windows 10.

gsantopaolo commented 6 years ago

@azchohfi thanks fr your patient in answering, looking forward to use xaml islands controls!