我在这里有一个用户控件,我想覆盖我当前的区域。除非它没有出现。
这是我的 SpatialMode.xaml 代码:
<UserControl x:Class="FilteringModule.View.SpatialFilterMode"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
MouseDown="UserControl_MouseDown"
MouseUp="UserControl_MouseUp"
MouseMove="UserControl_MouseMove">
<Canvas x:Name="SpatialCanvas" Background="Wheat">
<Border
x:Name="dragSelectionBorder"
BorderBrush="Blue"
BorderThickness="1"
Background="LightBlue"
CornerRadius="1"
Opacity="0.5"
/>
</Canvas>
</UserControl>
我称之为:
public void ShowSpatialFilterMode()
{
Console.WriteLine("SHOWING SPATIAL FILTER MODE?");
_spatialFilterMode = new SpatialFilterMode();
_spatialFilterMode.Visibility = Visibility.Visible;
}
它写入控制台,所以我知道它正确地击中它,除了它没有显示?
任何帮助将不胜感激。
谢谢!