Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to handle LayoutAnchorable after Deserialize? #392

Closed
yaoyulian opened this issue Oct 29, 2022 · 0 comments
Closed

How to handle LayoutAnchorable after Deserialize? #392

yaoyulian opened this issue Oct 29, 2022 · 0 comments

Comments

@yaoyulian
Copy link

avalondock:LayoutPanel
avalondock:LayoutAnchorablePane
<avalondock:LayoutAnchorable x:Name="LayoutAnchorable1" Title="LayoutAnchorable1" ContentId="LayoutAnchorable1"></avalondock:LayoutAnchorable>
<avalondock:LayoutAnchorable x:Name="LayoutAnchorable2" Title="LayoutAnchorable2" ContentId="LayoutAnchorable2"></avalondock:LayoutAnchorable>
</avalondock:LayoutAnchorablePane>
</avalondock:LayoutPanel>

void Button_Show_LayoutAnchorable1_Click(object sender, RoutedEventArgs e)
{
LayoutAnchorable1.IsActive = true; //this will bring LayoutAnchorable1 to front
}

void Button_Show_LayoutAnchorable2_Click(object sender, RoutedEventArgs e)
{
LayoutAnchorable2.IsActive = true; //this will bring LayoutAnchorable2 to front
}

if I called XmlLayoutSerializer.Deserialize to restore preserved layout in DockManager_Loaded, the click function will have no effect. How can I bring LayoutAnchorable to front in C# code after Deserialize?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant