所以我可以打开一个原生窗口,例如:
string
我可以通过以下方式获取窗口ID:
chrome.windows.create({ url: 'chrome://bookmarks', type: 'popup'})
问题是如何从本机应用获取窗口ID?我需要知道什么时候,例如。 chrome.windows.get(integer windowId, object getInfo, function callback)
弹出窗口已关闭...
答案 0 :(得分:0)
终于搞定了:
private void grdMain_Loaded(object sender, RoutedEventArgs e)
{
Canvas canvas = sender as Canvas;
ScaleTransform st = new ScaleTransform();
BindingOperations.SetBinding(st, ScaleTransform.ScaleXProperty, new Binding("ScaleFactor"));
BindingOperations.SetBinding(st, ScaleTransform.ScaleYProperty, new Binding("ScaleFactor"));
st.CenterX = canvas.ActualWidth / 2;
st.CenterY = canvas.ActualHeight / 2;
canvas.LayoutTransform = st;
}