These are chat archives for AvaloniaUI/Avalonia

Aug 2018
Aug 07 2018 06:00
one pc has strange problem with dpi (125% in settings)
в Avalonia.Win32.Interop.UnmanagedMethods.SetProcessDpiAwareness(PROCESS_DPI_AWARENESS)
в Avalonia.Win32.Win32Platform..ctor()
в Avalonia.Win32.Win32Platform..cctor()
в Avalonia.Win32.Win32Platform.Initialize(Boolean)
в Avalonia.Win32.Win32Platform.Initialize()
в System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
в System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
в System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo)
в Avalonia.AppBuilder+<>cDisplayClass3_0.<UsePlatformDetect>b11()
в Avalonia.Controls.AppBuilderBase1[[System.__Canon, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Setup() в Avalonia.Controls.AppBuilderBase1[[System.Canon, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Start[[System.Canon, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.Func`1<System.Object>)
reproduce on 4.6 and netcore2.0
Nelson Carrillo
Aug 07 2018 06:09
That API call is for per monitor DPI and Windows 8.1+ only
We shouldn’t be calling it on Windows 7 or we’ll crash
Aug 07 2018 06:09
Its win8+
Maybe not 8.1, i ask him...
Nelson Carrillo
Aug 07 2018 06:14
Weird because we check for ShCore.dll which should only be present on Win8.1 plus
Aug 07 2018 06:21
he say win8, not 8.1
Nelson Carrillo
Aug 07 2018 06:27
Sounds like a bug. We should probably check for the availability of the function using GetProcAddress
Aug 07 2018 06:29
ShCore.dll is win8 lib, as msdn say. I add issue later
Nelson Carrillo
Aug 07 2018 06:32
Joshua Walsh
Aug 07 2018 09:30

Hi! This is probably a dumb question, but is it possible to get the scroll position of a TextBox in Avalonia? I'd like to check whether a TextBox is scrolled to the end. In WPF I could do

public static bool IsScrolledToEnd(this TextBox textBox)
    return textBox.VerticalOffset + textBox.ViewportHeight == textBox.ExtentHeight;

but in Avalonia TextBox doesn't have a VerticalOffset property.