WPF Style Inheritance Behavior

Recently I was using a window style with MahAppsMetro, now it applies the styles at application level. One of the things I am doing is embedding AvalonEdit in one such window. Now with Metro styling it applies styles to the controls and in my case SearchPanel in AvalonEdit was styled too! This is fine, but the results were quite un-expected:

Metro Styling applied to SearchPanel

Metro Styling applied to SearchPanel

Now, of course I do want to keep Metro Style for my application, however want to keep AvalonEdit styling intact as well.

Thinking further the simplest thing to do would be to be to somehow disable inheritance of styles at some level. I found a post on stackoverflow discussing this. However for me it was not to stop inheriting styles but to fallback to theme. Documentation on this topic is pretty scarce.

Now to get things to work, I wrapped the AvalonEdit.TextEditor in a custom Control which would InheritanceBehavior.SkipToThemeNow.



[Read More]

pwsh and openssh on windows

powershell-core/pwsh

to install powershell either download the zip/msi from github page or you can install thru chocolatey. But I preferred going with msi file for now.

The claim is that you can run powershell core side-by-side, which is not a requirement for me- but wanted to move over to it for some time now.

Anyway, I installed this in C:\PowerShell\6.0.1 directory & added it to Path environment variable on the machine- so is accessible to all uesrs.



[Read More]

git diff

By default git usually launches vimdiff for diffs and merges, but I would rather prefer kdiff3 gui for merges/diffs. Here are some of my notes about how to set it up.

For a detailed list of options that git diff supports visit this link

git supports various tools for merge and diff, here is a partial list: - kdiff3 & documentation - tkdiff - meld - vimdiff - gvimdiff

You can setup kdiff3 by default as diff tool by executing follow command:

git config --global diff.tool kdiff3

for other tools see here: Viewing all git diffs with vimdiff



[Read More]