我CommandBar在XAML中将其IsOpen属性设置为true,因此每个按钮的文本都是可见的,因为我希望描述保持可见.
当我点击省略号按钮时,它会隐藏文本,第二次点击它时,我收到以下错误:
No installed components were detected. Cannot resolve TargetName HighContrastBorder.
用户界面有些尴尬,可能与此有关,但我无法弄清楚是什么或为什么:
正如您所看到的,我正在显示的各种按钮的按钮文字被截断:
代码方面,据我所知,它并没有什么特别之处:
<Page.BottomAppBar>
<CommandBar IsOpen="True"
ClosedDisplayMode="Compact"
IsSticky="True"
Visibility="{Binding
CommandBarViewModel.IsCommandBarVisible,
Converter={StaticResource BoolToVisibilityConverter}}"
Background="{ThemeResource SystemControlBackgroundAccentBrush}">
<AppBarButton
Icon="Add"
Label="Add"
Foreground="White"
Command="{Binding CommandBarViewModel.AddCommand}"
Visibility="{Binding CommandBarViewModel.IsAddVisible,
Converter={StaticResource BoolToVisibilityConverter}}"/>
<AppBarButton
Icon="Refresh"
Label="Refresh"
Foreground="White"
Command="{Binding CommandBarViewModel.RefreshListCommand}"
Visibility="{Binding
CommandBarViewModel.IsRefreshListVisible,
Converter={StaticResource BoolToVisibilityConverter}}"/>
</CommandBar>
</Page.BottomAppBar>
Run Code Online (Sandbox Code Playgroud)
没有InnerException,App.gics抛出异常
#if DEBUG && !DISABLE_XAML_GENERATED_BREAK_ON_UNHANDLED_EXCEPTION
UnhandledException += (sender, e) =>
{
if (global::System.Diagnostics.Debugger.IsAttached)
global::System.Diagnostics.Debugger.Break();
};
#endif
Run Code Online (Sandbox Code Playgroud)
关于我的问题的任何想法,即文本截止和未处理的异常?
谢谢
更新 - 1:
当我CommandBarViewModel.IsCommandBarVisible从Visible属性中删除binded属性()CommandBar并将其硬编码到时Visible,错误向下移动,而不是发生在App.gics中,它现在发生了它试图设置的第一个按钮的binded属性对...的可见度 …