现代用户界面 - 如何使链接在“_top”中加载其内容?

时间:2015-05-30 12:37:14

标签: wpf modern-ui

我有一个ModernTab控件,我正在动态添加Link

InstallationTab.Links.Add(new Link { DisplayName = "Review Configuration", Source = new Uri("/Views/InstallationProgress.xaml", UriKind.Relative) });

我希望InstallationProgress.xaml加载到顶部框架而不是当前内容框架。

我该怎么做?

enter image description here

1 个答案:

答案 0 :(得分:0)

我回答了我自己的问题,万一其他人发现自己在这里:

这只是“劫持”ModernTab点击的一个例子。在这里,您可以强制在顶部框架中加载内容,例如:

处理ModernTab的struct node* deleteNode_1(struct node* current, int key) { if (current == NULL) return current; if (key < current->key) current->left = deleteNode_2(current->left, key); else if (key > current->key) current->right = deleteNode_2(current->right, key); else { if (current->left == NULL) { struct node *temp = current->right; free(current); return temp; } else if (current->right == NULL) { struct node *temp = current->left; free(current); return temp; } struct node* temp = minValueNode(current->right); current->key = temp->key; current->right = deleteNode_2(current->right, temp->key); } return current; } struct node* deleteNode_2(struct node* current, int key) { if (current == NULL) return current; if (key < current->key) current->left = deleteNode_3(current->left, key); else if (key > current->key) current->right = deleteNode_3(current->right, key); else { if (current->left == NULL) { struct node *temp = current->right; free(current); return temp; } else if (current->right == NULL) { struct node *temp = current->left; free(current); return temp; } struct node* temp = minValueNode(current->right); current->key = temp->key; current->right = deleteNode_3(current->right, temp->key); } return current; } // ... 事件:

SelectedSourceChanged

MyModernTab.SelectedSourceChanged += MyModernTab_SelectedSourceChanged;