当我使用Windows应用认证套件测试我的应用程序时,我得到xml文件,但有以下错误
调试应用程序检查失败应用程序不应安装任何调试二进制文件.
Error: Following errors were encountered while running the Debug Binary Check test.
Failed to extract imported API information for this application.
Impact if not fixed: Windows Store policies do not allow submission of debug binaries. Please ensure that all submitted binaries are configured as release to avoid rejecting your submission.
Run Code Online (Sandbox Code Playgroud)
有些人可以帮助我解决这个问题
提前致谢
visual-studio windows-8 app-certification-kit visual-studio-2012
我最近将一个非常简单的应用程序从Windows 8开发人员预览版移植到了Windows 8 Consumer Preview.一切似乎工作正常,但现在GetTickCount()似乎不再在Windows.h或WinBase.h中定义该函数.
尽管我在文件顶部定义了这些标头:
#include <Windows.h>
#include <WinBase.h>
Run Code Online (Sandbox Code Playgroud)
我的代码行
unsigned int seed = GetTickCount() % UINT_MAX;
Run Code Online (Sandbox Code Playgroud)
仍然给我错误:
error C3861: 'GetTickCount': identifier not found
Run Code Online (Sandbox Code Playgroud)
任何人都可以告诉我GetTickCount()去哪里或者我应该用什么作为替代品?
我想在每次构建之前运行一些自定义批处理代码.在VS <11/C#应用程序中,我可以在项目设置中设置预构建事件.我在javascript metro VS11解决方案中找不到类似的设置.
任何人都知道它在哪里,或者选项是否已经消失(!)我可以采用哪种解决方法?
我想设置WinRT XAML Toolkit图表控件的图例项目的样式。
我检查了源代码,发现以下样式:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:datavis="using:WinRTXamlToolkit.Controls.DataVisualization">
<Style
TargetType="datavis:Legend">
<Setter
Property="BorderBrush"
Value="Black" />
<Setter
Property="BorderThickness"
Value="1" />
<Setter
Property="IsTabStop"
Value="False" />
<Setter
Property="TitleStyle">
<Setter.Value>
<Style
TargetType="datavis:Title">
<Setter
Property="Margin"
Value="0,5,0,10" />
<Setter
Property="FontWeight"
Value="Bold" />
<Setter
Property="HorizontalAlignment"
Value="Center" />
</Style>
</Setter.Value>
</Setter>
<Setter
Property="Template">
<Setter.Value>
<ControlTemplate
TargetType="datavis:Legend">
<Border
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition
Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<datavis:Title
Grid.Row="0"
x:Name="HeaderContent"
Content="{TemplateBinding Header}"
ContentTemplate="{TemplateBinding HeaderTemplate}"
Style="{TemplateBinding TitleStyle}" />
<ScrollViewer
Grid.Row="1"
VerticalScrollBarVisibility="Auto"
BorderThickness="0"
Padding="0"
IsTabStop="False">
<ItemsPresenter …Run Code Online (Sandbox Code Playgroud) silverlight-toolkit windows-runtime winrt-xaml windows-store-apps winrt-xaml-toolkit
我想DataTemplate为我创建一个自定义ListView.我有一个简单的class Person:
public class Person
{
public string Name{get;set;}
public SolidColorBrush SomeColor{get;set;}
public Person(string name){ Name = name; }
}
Run Code Online (Sandbox Code Playgroud)
我将ItemsSourcemy 的属性设置ListView为a List<Person> persons.如果我只是使用DisplayMemberPath=Name一切正常,但我想有一个自定义模板来显示Name和SomeColor.我创建了一个示例Grid来展示我希望它看起来如何(没有任何绑定,仅作为示例):
<Grid Height="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto" MinWidth="10"/>
</Grid.ColumnDefinitions>
<TextBlock Text="Patrick" Grid.Column="0" TextAlignment="Right" Margin="0,0,10,0" VerticalAlignment="Center"/>
<Rectangle Fill="Green" Grid.Column="1" />
</Grid>
Run Code Online (Sandbox Code Playgroud)
这是我尝试实现我DataTemplate的ListView:
<ListView x:Name="listView" ItemsSource="{Binding ElementName=pageRoot, Path=FriendList ,Mode=OneWay}">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalAlignment" Value="Stretch"/> …Run Code Online (Sandbox Code Playgroud) 我想从不同的类(页面)更改图像源,包括设置弹出窗口
我承认我必须将图像作为全局变量.但无法弄清楚如何做到这一点.还有其他方法吗?
我试图用两个按钮创建一个自定义控件(例如)。我有一个Generic.Xaml文件,看起来像这样
<Style TargetType="local:DoubleButton">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="local:DoubleButton">
<Grid>
<Button x:Name="leftButton" Click="leftButtonClick" />
<Button x:Name="rightButton" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Run Code Online (Sandbox Code Playgroud)
DoubleButton类如下所示:
public sealed class DoubleButton : Control
{
public DoubleButton()
{
this.DefaultStyleKey = typeof(DoubleButton);
}
public void leftButtonClick(object sender, RoutedEventArgs e)
{
MessageDialog dlg = new MessageDialog("message");
}
}
Run Code Online (Sandbox Code Playgroud)
但是这种方法永远不会被调用。如果有人对如何为自定义控件引发事件有个好主意。
谢谢
我正在构建一个Windows 8应用程序,允许将图像和文本共享到Facebook和Twitter.
谁能告诉我从哪里开始或者最简单的方法是什么?
我想定义一个在基类中不是异步的虚方法,但它在派生类中是异步的,调用者使用委托调用它(实际上它是由屏幕上的按钮激活的ICommand)我该怎么做.
public class BaseClass
{
BIONESSBindingCommand mLogoffCommand;
public ICommand LogoffCommand
{
get
{
if (mLogoffCommand == null)
{
mLogoffCommand = new BIONESSBindingCommand(
Param => Logoff(), //Command DoWork
Param => true); //Always can execute
}
return mLogoffCommand;
}
}
public virtual Task Logoff()
{
DoLogoff();
return null; //???
}
}
public class DerivedClass : BaseClass
{
public override async Task Logoff()
{
await SomeWoAsyncWork();
base.Logoff(); //Has warninngs
}
}
Run Code Online (Sandbox Code Playgroud) c# asynchronous task-parallel-library async-await windows-runtime
当我将GridView数据绑定到ObservableCollection时,会自动选择该集合的第一项.SelectionModeGridView 的属性设置为multiple.有没有办法阻止这种自动选择?或者我应该监听什么事件,以便我可以SelectedIndex将GridView 重置为-1?
c# ×6
windows-8 ×5
winrt-xaml ×5
xaml ×2
async-await ×1
asynchronous ×1
c++ ×1
data-binding ×1
facebook ×1
gridview ×1
javascript ×1
twitter ×1
winapi ×1
windows ×1
winjs ×1