Comments (5)
i figured out that the issue only happens on properties that are edited via a textbox
additionally i was able to isolate the issue to a point where our applications sets the OverrideDefaultStyle
property for textboxes in a default style. when i comment this setter, the crash does not happen.
still if i do the same in a small example project the crash does not happen yet
from snoopwpf.
A repro would be very nice in this case.
from snoopwpf.
issue is reproducable with the following example:
SnoopCrashOnPropertyEdit.zip
i figured out that in the past the line FrameworkElement.StyleProperty.OverrideMetadata(typeof(TextBox), new FrameworkPropertyMetadata { DefaultValue = FindResource(typeof(TextBox)) });
was added in our App.xaml.cs. and the style sets the OverridesDefaultStyle Property to true. i have no idea why exactly this was done in the past but this is the cause of the crash
from snoopwpf.
The crash in Snoop just reveals that your code is wrong.
You can test that by using my modified version of your repro.
SnoopCrashOnPropertyEdit.zip
The problem with your code is that you overwrite the default style, by changing the default metadata of the style property, and then also set OverridesDefaultStyle
to true
.
Which is something that's not allowed in WPF, at least if you want to also use controls inheriting from the same type.
from snoopwpf.
ok thanks i see. i removed the changing of the metadata in this case to fix that issue. i was just a bit confused because with older versions there was no crash
from snoopwpf.
Related Issues (20)
- Light mode broken HOT 22
- Cannot attach the snoop to the .net framework 4.5 single app HOT 8
- Save the Current Preview to file does not work all the time HOT 5
- Snoop does not show version HOT 1
- After upgrading my app to .net 8 snoop no longer works with it
- Change key for Ctrl-Shift-MouseOver HOT 4
- Add mention about SignPath Foundation and free code certificate in Readme.md HOT 2
- Feature Request: Option to snoop without activating snoop on global shortcut HOT 5
- StackOverflowException on Ctrl+Shift HOT 9
- Unable to build if ARM MSVC tools not installed HOT 3
- keyboard not working in snoop window HOT 3
- Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.Object,System.EventHandler]' to type 'System.Collections.Hashtable'. HOT 1
- Unable to attached snoop to application: unauthorized access exception HOT 2
- [Feature request] show current version
- [Feature Request] Tab with names in scope for binding parameter ElementName HOT 1
- Unable to compile from source code HOT 10
- Installer: "Installation directory must be on a local hard drive" HOT 7
- Question: Injecting RPC Services into running application HOT 2
- Cannot serialize a non-public type 'System.Windows.Controls.DataGridHeadersVisibilityToVisibilityConverter'.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from snoopwpf.