设为首页 加入收藏

TOP

[UWP] 使用SemanticZoom控件(四)
2017-10-11 16:08:51 】 浏览:3329
Tags:UWP 使用 SemanticZoom 控件
1      <Border Background="{Binding Converter={StaticResource BackgroundConverter}}">
2             <TextBlock Text="{Binding Group.Key}" HorizontalAlignment="Center" 
3                        VerticalAlignment="Center"
4                        Foreground="{Binding Converter={StaticResource ForegroundConverter}}"/>
5      </Border>

我一直想实现在ZoomedOutView里那种有数据的和没数据的用颜色区分的功能,自己写Converter没写出来,然后发现了这个

这两个Converter是系统自带的,用的时候设置好Enabled和Disabled的颜色,有数据的时候显示Enabled的颜色,没有就显示Disabled的颜色

1 <JumpListItemBackgroundConverter x:Key="BackgroundConverter" Enabled="Red"
2                                          Disabled="Transparent"/>
3 <JumpListItemBackgroundConverter x:Key="ForegroundConverter" Enabled="White" Disabled="Black"/>

 附上demo

SemanticZoomDemo

 还有一个待解决的问题,在ZoomOutView中如何将无数据的项变成不可点击状态?既然那两个Converter能知道哪个是没数据的,说明一定有办法,Pending……

参考链接

http://blogs.msdn.com/b/msgulfcommunity/archive/2013/06/18/implementing-longlistselector-as-jumplists-in-windows-phone-8-alphabetical-list.aspx

首页 上一页 1 2 3 4 下一页 尾页 4/4/4
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇[UWP] 使用SemanticZoom控件 下一篇[UWP] 使用SemanticZoom控件

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目