Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Page printed from: https://blog.jermdavis.dev/

A blog about technology that catches my attention

It's a bit like a swap-file for my brain...

12 years, 386 posts and counting

Content Hub alt text in Sitecore AI images

A place where the docs need to catch up with reality

A colleague bumped into an interesting issue with Sitecore AI and Content Hub the other day, and it lead to a fun support conversation. If you're setting up your instance of Content Hub as the DAM for your Sitecore AI site, you might want to have a read...

Custom menus and spelling corrections for your WPF TextBox?

Having your spelling & menu cake and eating it

Following on from a recent "WPF is easy when you know how" post about animations, I bumped into some new fun the other day. By default a WPF textbox has the ability to enable Windows' spelling checker. But if you have a context menu you lose correction suggestions. How can we have both?

.Net C# WPF ~2 min. read

Getting prices in search data for OrderCloud

A gap in the documentation...

The rate of change of stuff in the Sitecore is exciting for working in the ecosystem. But a challenge is that things sometimes move faster than the clear documentation. A project I'm involved with bumped into an issue here recently, which seemed worth writing down to (hopefully) help others.

Avoid being tripped up by older Windows locales

"It works on my machine!?!" is a very frustrating phrase

I came across a fascinating bug the other day. Some code that involved parsing dates from incoming text had passed testing, but when running on a live server it failed. But not consistently - some dates continued to parse fine, but others would cause errors. The answer was... not what I expected. So maybe some of you might want to be aware of this too:

Asset pickers on your custom entities

Thumbnails and filters to help your editors make good choices

If you're creating custom Entities in Content Hub then you're likely going to be setting up some fields which relate to image assets. There is a default picker for these relation fields, but it's not a great editorial experience most of the time. So having worked through how to set up something better, I'm writing it down as a crib-sheet for myself next time. And maybe it will help you too...

Using WebDAV for remote file editing

When building a proper web UI is too much effort...

I often find myself building little .Net tools to help me with repetitive jobs. And fairly often these need some config data to drive their behaviour. If I have a tool that runs on my home server as a Scheduled Task then providing a way to edit that config remotely can be important. A web app is one way of solving this problem - but it tends to be fairly high effort. Remoting to the server is another, but network security can make that a challenge. So an alternative solution is to expose the config file via WebDAV so that a simple remote tool can use HTTP protocols to edit it. Here's a basic example of setting that up...

.Net C# IIS ~3 min. read

Manually triggering a WPF animation

When you need to do it with code

I have a complicated relationship with WPF. When you know what you're doing, it's great for building desktop apps. It's much easier to handle scenarios like apps getting used across varying DPIs, or doing complex UI layouts. But there are a few bits of it which, when you don't know how to do them, aren't intuitive. I bumped into another one the other day: Needing to trigger an animation on-demand. And so I can remember this next time I need to do this, here's a quick write-up of one way to achieve it...

.Net C# WPF ~3 min. read

Showing workflow state in Content Hub listings

Getting a visible overview of where in your flows all the entities are...

When you have an entity that moves through a State Flow in Content Hub you may well want users to be able to see at a glance where things are in that flow. So here's one way you might set that up to give a nice visual representation in your listings for the entity:

A useful new .Net feature for Processes

Previews of .Net 11 file off a rough edge in my writing process

The pace of change with .Net is pretty relentless these days. And every so often they ship a thing that fixes a challenge I've been mulling over addressing myself. That's happened again with Process API changes in preview 4 of .Net 11. So if you have code which spawns other executables, you might want to look at what they've changed...

.Net C# ~2 min. read

How do I have an image for my Entity?

A critical setting for a custom entity

I've been spending some time setting up some custom Entities in Content Hub recently. I bumped up against an issue with one feature where it took me a while to find the right info to make it work the way I wanted.

Sitecore Content Hub ~2 min. read