- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我在平移 Panorama 应用程序时遇到一些闪烁问题,列表框开始闪烁,如您在此视频中所见:http://www.screenr.com/Aiy8
XAML 代码:
<phone:PhoneApplicationPage
x:Class="PanoramaApp5.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True" shell:SystemTray.BackgroundColor="Transparent"
shell:SystemTray.Opacity="0">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<!--Panorama control-->
<controls:Panorama FontSize="20" Foreground="White" Loaded="Panorama_Loaded" Title="Envato Stats" Background="{x:Null}">
<controls:Panorama.TitleTemplate>
<DataTemplate>
<Image Source="/PanoramaApp5;component/Images/logo.png" Margin="14,105,0,10" HorizontalAlignment="Left" Name="logo" Stretch="Fill" VerticalAlignment="Top" Width="700" Height="70"/>
<!--<TextBlock Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" FontSize="100" Margin="10,50,0,0" />-->
</DataTemplate>
</controls:Panorama.TitleTemplate>
<controls:PanoramaItem Header="recent sales" Margin="0,-20,0,0">
<!--Double line list with image placeholder and text wrapping-->
<ListBox Margin="0,0,-12,0" ItemsSource="{Binding Items}" Width="435" Height="Auto">
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel Orientation="Horizontal" Margin="0,0,0,17">
<StackPanel Width="auto" MaxWidth="440">
<TextBlock Text="{Binding LineOne}" TextWrapping="Wrap" Style="{StaticResource PhoneTextLargeStyle}" />
<TextBlock Text="{Binding LineTwo}" TextWrapping="Wrap" Margin="12,1,12,0" Style="{StaticResource PhoneTextSubtleStyle}" />
<TextBlock Text="{Binding LineThree}" TextWrapping="Wrap" Margin="12,1,12,0" Style="{StaticResource PhoneTextSubtleStyle}" />
</StackPanel>
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
</controls:PanoramaItem>
</controls:Panorama>
</Grid>
</phone:PhoneApplicationPage>
这是绑定(bind)的C#代码
public void LoadRecent(object sender, DownloadStringCompletedEventArgs e)
{
try // In case the user is blocked by the API
{
XDocument document = XDocument.Parse(e.Result);
// Get the XML nodes
IEnumerable<XElement> item =
from el in document.Descendants("item")
select el;
IEnumerable<XElement> amount =
from el in document.Descendants("amount")
select el;
IEnumerable<XElement> rate =
from el in document.Descendants("rate")
select el;
IEnumerable<XElement> soldAt =
from el in document.Descendants("sold-at")
select el;
int i = 0;
foreach (XElement el in document.Descendants("amount"))
{
DateTime mydate = DateTime.ParseExact(soldAt.ElementAt<XElement>(i).Value, "ddd MMM dd HH:mm:ss zzz yyyy", System.Globalization.CultureInfo.InvariantCulture);
this.Items.Add(new ItemViewModel() { LineOne = item.ElementAt<XElement>(i).Value, LineTwo = "Amount: $" + amount.ElementAt<XElement>(i).Value + string.Format(" at the rate {0:P0}", float.Parse(rate.ElementAt<XElement>(i).Value)), LineThree = soldAt.ElementAt<XElement>(i).Value });
i++;
}
}
catch { }
this.IsDataLoaded = true;
}
更新:似乎如果应用程序栏模式设置为“最小化”,闪烁问题就会消失,如果我将其设置为“默认”模式,闪烁会再次开始,任何人都知道为什么这是那样的行为吗?如果有可能修复它。
最佳答案
解决方案:似乎不透明度是有罪的,我没有将其设置为实体,而是将不透明度设置为 .99 并且可以正常工作。
关于c# - Windows Phone 列表框在平移时闪烁,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13012363/
我是 Jetpack Compose 的新手。我目前正在开发一个聊天应用程序。我要求用户从图库中选择图像或从相机中拍照。然后我将文件 Uri 保存到数据库中,然后收听所有消息的列表。更新此列表时,此图
强制性代码,但 jsFiddle 准确地演示了这个问题。我有一个在 3 秒内扩大和淡出的圆圈。声纳风格是我的意图。问题是动画完成后它会快速“闪烁”然后重新开始。 请在此处查看问题:http://jsf
您好,我有一个多种颜色的 Logo ,我想将其用于随机/不稳定的故意闪烁效果。我只能找到其他关于使用淡入/淡出功能进行闪烁技巧的文章。关于如何用 css3 和/或 jQuery 做这样的技巧有什么想法
我正在使用 Swing 创建组件并使用 GLCanvas (com.jogamp.opengl.awt.GLCanvas) 创建我的窗口。 接下来就是问题了 在初始状态下,一切正常,但是当我拖动窗口调
我将 PhoneGap 2.2.0 与 jQuery Mobile 1.2.0 结合用于我在 Android 平台(版本 2.3.3 及更高版本)上的应用程序。在我使用固定标题的页面上,根本没有转换。
在我们使用 JavaScript 向页面添加图像或文本后,我们的网页在 iPad 上闪烁。我们尝试了 -webkit-backface-visibility:hidden; 的各种组合; -webki
有人能告诉我为什么在这个使用 SwingWorker 的简单演示中,屏幕闪烁,好像按钮不断跳跃一样? (关于改进多线程部分的反馈也值得赞赏)。 import java.awt.EventQueue;
我正在运行时从 CSV 文件向字符串网格添加多行,但是 StringGrid 在更新时似乎会闪烁很多,我认为会有一个 beginupadate/Endupdate 命令来停止此操作。但是我找不到它。有
我的窗口中有一个文本元素,我希望它每隔几秒或几毫秒闪烁一次或出现并消失。 我的代码是: import QtQuick 2.6 import QtQuick.Window 2.2 Window {
我的窗口中有一个文本元素,我希望它每隔几秒或几毫秒闪烁一次或出现并消失。 我的代码是: import QtQuick 2.6 import QtQuick.Window 2.2 Window {
我在UIButtons中有3个UIView,它们具有相同的文本颜色和相同的背景颜色。轻按三个按钮即可触发相应的事件。但是只有其中之一会响应触摸而“闪烁”。其他两个会发生什么?它们有时(但很少)具有“闪
我在 iOS 8 下实现 UIRefreshControl 时遇到了一种闪烁。每次我第一次到达 tableView 的顶部时(即应用程序刚刚启动时),我都会看到下面的 gif 中显示的闪烁。这不会发生
我希望有人能帮助我。我遇到以下问题: http://jsfiddle.net/zhPAF/ 标记: About Us
当鼠标悬停在图像“A”上时,尝试让图像“B”覆盖在图像“A”上。理想情况下,我希望它淡入。 HTML: jQuery:
我有一个 TabControl,我可以在其中添加/删除多个 TabPage。 当我添加足够多的页面以至于必须显示导航按钮时,我遇到了闪烁问题。 当导航按钮(左右导航的 2 个箭头)未显示时,我根本没有
我尝试实现自定义双缓冲,但它会导致闪烁。 这是控件(继承自Control的自定义控件)构造函数中的代码: bufferContext = new BufferedGraphicsContext();
我有以下代码: var footer = $('.footer'), extra = 0; // footer.css({ opacity: '0', display: 'block' });
我遇到了与 JPanel 中闪烁相关的问题。不知道为什么, window 里的球时不时地闪烁。我尝试了几种方法,比如双缓冲、BufferStrategy、Canvas,但都不起作用。主要思想是使用线程
我试图在 OpenGL 中绘制一些文本,而程序绘制立方体或任何 Opengl native ,因此,当我尝试将文本放在屏幕上时,它闪烁得非常快,我不知道为什么,我试图改变 sleep 值什么都没有..
我已经使用 LibGDX UI Setup 启动了一个项目。 我在 implements ApplicationListener 中唯一拥有的是: public void create() {
我是一名优秀的程序员,十分优秀!