Fix for issue 2667 - Tab header drop shadow z-order#2819
Merged
Keboo merged 1 commit intoMaterialDesignInXAML:masterfrom Aug 20, 2022
Merged
Fix for issue 2667 - Tab header drop shadow z-order#2819Keboo merged 1 commit intoMaterialDesignInXAML:masterfrom
Keboo merged 1 commit intoMaterialDesignInXAML:masterfrom
Conversation
Keboo
approved these changes
Aug 20, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix for #2667
This defaults the tab header of the
TabControltoPanel.ZIndex="1"which makes the shadow appear on top ofTabItems as I believe is the desired default.I also added a binding on the content such that you can have the content cover the drop shadow in case you desire to do so; that is accomplished simply by adding
Panel.ZIndex="2"(or higher) on theTabControlitself.Ideally I thought it would be cool if this behavior could be controlled per
TabItem. To do that I wanted thePropertyPathon the binding in line 81 to look something akin toPath='SelectedItem.(Panel.ZIndex)', which essentially would first pick out theTabControl.SelectedItem, on which it would then pick out thePanel.ZIndexattached property. However, I am not able to get a working syntax to accomplish that. Perhaps you know the syntax?Another way to semi-accomplish it is by binding to
SelectedItemin line 81 and then using a converter to pick out the value of the attached propertyPanel.ZIndex. However, this has the downside that changes to thePanel.ZIndexvalue on theTabItemswill only be reflected when the user changes tab (because thePathof the binding does not change, only the attached property value which the converter picks out). Not really sure whether I prefer that over the current approach in the PR.