当组合框中有更多项目时,组合框将显示listpicker弹出窗口.如果我选择第一个并向下滚动,则多个项目将显示为已选中.但ComboBox的SelectedItem将是我选择的那个.我修改了ListPickerFlyout的样式并关闭了ListView的虚拟化.如果我这样做,ListView将不会保留SelectedItem.这是ComboBox的错误吗?有没有解决这个问题的方法
这是我修改过的风格
<DataTemplate x:Key="ListPickerFlyoutPresenterContentTemplate" >
<ListView VirtualizingStackPanel.VirtualizationMode="Recycling" SelectionMode="Single" >
<!--<ListView.ItemsPanel>
<ItemsPanelTemplate>
<VirtualizingStackPanel/>
</ItemsPanelTemplate>
</ListView.ItemsPanel>-->
<ListView.ItemContainerStyle>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<Border x:Name="OuterContainer" RenderTransformOrigin="0.5,0.5">
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Pressed"/>
<VisualState x:Name="Disabled"/>
<VisualStateGroup.Transitions>
<VisualTransition From="Pressed" To="Normal" />
</VisualStateGroup.Transitions>
</VisualStateGroup>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Unselected" />
<VisualState x:Name="Selected">
<Storyboard>
<DoubleAnimation Storyboard.TargetName="CheckGlyph" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
<DoubleAnimation Storyboard.TargetName="SelectedCheckMark" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Foreground" Duration="0">
<DiscreteObjectKeyFrame KeyTime="0" Value="Green" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentBorder" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ListPickerFlyoutPresenterSelectedItemBackgroundThemeBrush}" />
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState> …Run Code Online (Sandbox Code Playgroud) 我想使用socket.io框架将node.js聊天应用程序集成到JBoss服务器上运行的JSF Web应用程序.你能不能给出任何关于如何做的事情.
我已经推荐这个链接用facebook app实现facebook登录.它工作正常.从Facebook应用程序登录后,它会重定向到我的应用程序.
但是,当我在Windows 10设备上运行这个应用程序的Facebook应用程序(最新的测试版和最新的Facebook)都没有重定向到我的应用程序.相反,Facebook测试版打开其时间线和Facebook应用程序崩溃.我认为fbconnect://authorize?windows 10 facebook app不支持?但我在satackoverflow(link1)中有一些链接说它工作正常.但只有与这些链接不同的是,他们实际上已经创建了Windows 10通用应用程序,其中我的是在Windows 10中运行的Windows Phone 8.1应用程序
任何想法为什么这不适用于Windows 10设备.这个工作的任何解决方法?
facebook-login windows-phone-8.1 win-universal-app uwp windows-10-universal
我已经开始倾听模型的变化了.当模型渲染功能发生变化时,将调用函数并提示警告窗口.但由于两个更改事件,渲染函数调用两次意味着两次.
WineDetails查看
app.WineView = Backbone.View.extend({
template:_.template($('#tpl-wine-details').html()),
initialize:function () {
this.model.bind("change", this.render, this);
},
render:function (eventName) {
if(eventName)alert("changed")
$(this.el).html(this.template(this.model.toJSON()));
return this;
},
events:{
"change input":"change",
"click .save":"saveWine",
"click .delete":"deleteWine"
},
change:function (event) {
var target = event.target;
console.log('changing ' + target.id + ' from: ' + target.defaultValue + ' to: ' + target.value);
// You could change your model on the spot, like this:
// var change = {};
// change[target.name] = target.value;
// this.model.set(change);
},
saveWine:function () {
this.model.set({
name:$('#name').val(), …Run Code Online (Sandbox Code Playgroud)