我想在附加到Listview的单个Itemsource上将ListView项目切换到Windows Phone 8.1(本机xaml + c#)中的List / Grid样式。
供参考,请参阅附图。
答案 0 :(得分:0)
您可以根据需要创建两个不同的视图。在此处实施可见性转换器,以在您的视图之间切换。
namespace MVVM1Test.Resources.Converters
{
public class NotConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return !(bool)value;
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
return !(bool)value;
}
}
}