当我们选择一个磁贴时,有没有人知道从代码隐藏中激活底部AppBar的方法?我找到了这个,但我找不到C#等价物.我浏览了一堆样品,但没有运气
http://msdn.microsoft.com/en-us/library/windows/apps/br229676.aspx
我正在为Windows 8创建我的第一个应用程序,我有一个问题.在Windows Phone 7中,我们可以在App.xaml.cs中定义所有全局变量并通过App.all_performers访问例如,这适用于默认数据类型,但如果我创建一个由我创建的一个对象的列表,如evento
public static List<evento> eventos_near = new List<evento>();
Run Code Online (Sandbox Code Playgroud)
我有这个错误:
可访问性不一致:字段类型'System.Collections.Generic.List <UrbaneousTry2.evento>'的访问权限低于字段'UrbaneousTry2.App.eventos_near'
有人可以帮帮我吗?我需要在我的应用程序的所有页面中使用列表和词典
该问题几乎与此处描述的相同:http://social.msdn.microsoft.com/Forums/en-US/winappswithcsharp/thread/542b827a-7c8e-4984-9158-9d8479b2d5b1但我对接受的答案不满意在那里,并觉得必须有一个更好的解决方案......
我试图在我的列表视图上实现一个'clasic'上下文菜单(不是通过AppBar,而是通过PopupMenu)并且工作正常,但是只有当我将列表视图设置为"无"SelectionMode时.
上面的链接正确地解释了如果ListView设置为"无"选择模式以外的ListViewItem'吞下'右侧轻敲事件.如何覆盖此行为,以便列表视图项被选中,列表视图仍然会触发我可以响应的RightTapped事件?
我收集了来自Web服务的产品,我在网格视图中预览了这个产品,但是我将产品的图像作为Base64字符串.如何将其转换为图像并将其绑定到网格视图中的图像?
任何能帮助我解决这个问题的代码.
对不起令人困惑的标题,但我不知道该怎么称呼它们.我在说这个:
<Style x:Key="SkipBackAppBarButtonStyle" TargetType="Button" BasedOn="{StaticResource AppBarButtonStyle}">
<Setter Property="AutomationProperties.AutomationId" Value="SkipBackAppBarButton"/>
<Setter Property="AutomationProperties.Name" Value="Skip Back"/>
<Setter Property="Content" Value=""/> <!-- This one -->
</Style>
Run Code Online (Sandbox Code Playgroud)
StandardStyles.xaml中有几个,但我不知道它是如何工作的,任何想法?
谢谢!
我正在尝试使用Share Charm在Windows 8 Metro C++应用程序中共享图像.为此,我需要先将图像加载到StorageFile ^.我认为它应该看起来像:
create_task(imageFile->GetFileFromPathAsync("Textures/title.png")).then([this](StorageFile^ storageFile)
{
imageFile = storageFile;
});
Run Code Online (Sandbox Code Playgroud)
其中imageFile在头文件中定义
Windows::Storage::StorageFile^ imageFile;
Run Code Online (Sandbox Code Playgroud)
这个实际的代码会抛出这个例子
An invalid parameter was passed to a function that considers invalid parameters fatal.
Run Code Online (Sandbox Code Playgroud)
这似乎非常简单,但是关于在Metro中共享的文档很少,并且唯一的Microsoft示例显示了如何使用FilePicker进行共享.
如果有人知道如何正确地做到这一点,将非常感激.
我不是在询问当前LayoutAwarePage的类型
Type type = ((Frame)Window.Current.Content).CurrentSourcePageType;
Run Code Online (Sandbox Code Playgroud)
但是关于当前页面的实例,我需要访问其属性
如何在WinRT XAML Toolkit图表控件中更改图表控件的调色板颜色?
例如,我想更改饼图切片的颜色.
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) 我想从不同的类(页面)更改图像源,包括设置弹出窗口
我承认我必须将图像作为全局变量.但无法弄清楚如何做到这一点.还有其他方法吗?
windows-runtime ×10
winrt-xaml ×9
c# ×6
windows-8 ×6
xaml ×5
c++ ×1
c++-cx ×1
windows ×1
xml ×1