使用InteractionRequestTrigger显示自定义弹出视图时,每次显示View和ViewModel的相同实例时都会使用它们。如何重新创建/重置View / ViewModel,因此View的状态为"默认为"。问题是我在弹出窗口中使用了TabControl,在关闭并重新打开弹出窗口后,仍然选择了最后选择的选项卡。
有什么想法吗?
答案 0 :(得分:2)
您必须创建自己的PopupWindowAction。为WindowContent Type添加一个属性,并在每次显示弹出窗口时使用它来创建新实例。
答案 1 :(得分:2)
这是一种不需要你创建一组新的螺母和螺栓的方法。
public class Sample {
public static void main(String arg[]) {
try{
//94 NOV 21 to 94/11/21
SimpleDateFormat sourceDateFormat = new SimpleDateFormat("yy MMM d");
Date date = sourceDateFormat.parse("94 NOV 21");
SimpleDateFormat targetDateFormat = new SimpleDateFormat("yy/M/d");
System.out.println(targetDateFormat.format(date));
}catch(ParseException e){
e.printStackTrace();
}
}
}
。IInteractionRequestAware
绑定到新媒体资源TabControl.SelectedIndex
setter的实现中,将所选索引属性重置为0.