【发布时间】:2014-08-07 11:14:10
【问题描述】:
我应用了一种技术,即使用负边距在框架外绘制标签(用作按钮)。在我的情况下这是必要的,因为我将来自各种程序集的 WPF 页面加载到这个框架中,并希望使用页面/框架之外的空间:
在我的WPF Page的XAML中放入如下sn-p即可达到效果:
<Label VerticalAlignment="Bottom" Margin="-55,0,0,5" HorizontalAlignment="Left" Background="{StaticResource Refresh}" Width="40" Height="40" Opacity="0.7" MouseEnter="Refresh_MouseEnter" MouseLeave="Refresh_MouseLeave" MouseDown="Refresh_MouseDown" />
<Label VerticalAlignment="Bottom" Margin="-100,0,0,5" HorizontalAlignment="Left" Background="{StaticResource Save}" Width="40" Height="40" Opacity="0.7" MouseEnter="Save_MouseEnter" MouseLeave="Save_MouseLeave" MouseDown="Save_MouseDown" />
问题:我的一位同事尝试使用我的应用程序,但图标(以及其他控件)没有出现...这很糟糕,因为它们是必不可少的,而且很多我的模块依赖于它们。
【问题讨论】:
标签: c# .net wpf vb.net windows