mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-19 18:11:39 -05:00
Clean up more warnings (#15039)
* These `Icon` bindings were to `Profile`s which aren't Observable, but it also doesn't matter * More c# warnings hopefully we'll just jump straight to real errors now.
This commit is contained in:
@@ -60,7 +60,7 @@
|
|||||||
<IconSourceElement Grid.Column="0"
|
<IconSourceElement Grid.Column="0"
|
||||||
Width="16"
|
Width="16"
|
||||||
Height="16"
|
Height="16"
|
||||||
IconSource="{x:Bind Icon, Mode=OneWay, Converter={StaticResource IconSourceConverter}}" />
|
IconSource="{x:Bind Icon, Converter={StaticResource IconSourceConverter}}" />
|
||||||
|
|
||||||
<TextBlock Grid.Column="1"
|
<TextBlock Grid.Column="1"
|
||||||
Text="{x:Bind Name}" />
|
Text="{x:Bind Name}" />
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
<IconSourceElement Grid.Column="0"
|
<IconSourceElement Grid.Column="0"
|
||||||
Width="16"
|
Width="16"
|
||||||
Height="16"
|
Height="16"
|
||||||
IconSource="{x:Bind Icon, Mode=OneWay, Converter={StaticResource IconSourceConverter}}" />
|
IconSource="{x:Bind Icon, Converter={StaticResource IconSourceConverter}}" />
|
||||||
|
|
||||||
<TextBlock Grid.Column="1"
|
<TextBlock Grid.Column="1"
|
||||||
Text="{x:Bind Name}" />
|
Text="{x:Bind Name}" />
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
Width="24"
|
Width="24"
|
||||||
Height="24"
|
Height="24"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IconSource="{x:Bind Icon, Mode=OneWay, Converter={StaticResource IconSourceConverter}}" />
|
IconSource="{x:Bind Icon, Converter={StaticResource IconSourceConverter}}" />
|
||||||
|
|
||||||
<TextBlock Grid.Row="0"
|
<TextBlock Grid.Row="0"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ namespace Microsoft.Terminal.Wpf
|
|||||||
using System;
|
using System;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Automation;
|
|
||||||
using System.Windows.Automation.Peers;
|
using System.Windows.Automation.Peers;
|
||||||
using System.Windows.Interop;
|
using System.Windows.Interop;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
@@ -56,30 +55,6 @@ namespace Microsoft.Terminal.Wpf
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// WPF's HwndHost likes to mark the WM_GETOBJECT message as handled to
|
|
||||||
/// force the usage of the WPF automation peer. We explicitly mark it as
|
|
||||||
/// not handled and don't return an automation peer in "OnCreateAutomationPeer" below.
|
|
||||||
/// This forces the message to go down to the HwndTerminal where we return terminal's UiaProvider.
|
|
||||||
/// </summary>
|
|
||||||
/// <inheritdoc/>
|
|
||||||
protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
|
|
||||||
{
|
|
||||||
if (msg == (int)NativeMethods.WindowMessage.WM_GETOBJECT)
|
|
||||||
{
|
|
||||||
handled = false;
|
|
||||||
return IntPtr.Zero;
|
|
||||||
}
|
|
||||||
|
|
||||||
return base.WndProc(hwnd, msg, wParam, lParam, ref handled);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
protected override AutomationPeer OnCreateAutomationPeer()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Event that is fired when the terminal buffer scrolls from text output.
|
/// Event that is fired when the terminal buffer scrolls from text output.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -274,6 +249,30 @@ namespace Microsoft.Terminal.Wpf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// WPF's HwndHost likes to mark the WM_GETOBJECT message as handled to
|
||||||
|
/// force the usage of the WPF automation peer. We explicitly mark it as
|
||||||
|
/// not handled and don't return an automation peer in "OnCreateAutomationPeer" below.
|
||||||
|
/// This forces the message to go down to the HwndTerminal where we return terminal's UiaProvider.
|
||||||
|
/// </summary>
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled)
|
||||||
|
{
|
||||||
|
if (msg == (int)NativeMethods.WindowMessage.WM_GETOBJECT)
|
||||||
|
{
|
||||||
|
handled = false;
|
||||||
|
return IntPtr.Zero;
|
||||||
|
}
|
||||||
|
|
||||||
|
return base.WndProc(hwnd, msg, wParam, lParam, ref handled);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
protected override AutomationPeer OnCreateAutomationPeer()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/// <inheritdoc/>
|
/// <inheritdoc/>
|
||||||
protected override void OnDpiChanged(DpiScale oldDpi, DpiScale newDpi)
|
protected override void OnDpiChanged(DpiScale oldDpi, DpiScale newDpi)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user