Automatic width in ComboBox for WPF

WPF has the annoying property, that the width of the combobox is not related to the largest element in the view:

Thanks to a blog post, which I cannot find anymore, you can the Popup child item of the combobox can be queried to figure out the width of the element:

Source code can be found on Github: ComboBoxEx.cs

and corresponding Commit: Github Commit

Update of OwnCloud

Since I’m using OwnCloud instead of OneDrive or Google Drive for my private photo storage, I’m also obliged to keep care of updates…

You may choose:

  1. Trust yourself and update owncloud and hope that you can make it
  2. Trust Microsoft/Google that they will handle it and will not give away your data voluntarily or unvoluntarily via security holes.

I made myself trusting myself… nevertheless, I believe the risk of making a fault and losing the data is higher as using OneDrive or other cloud-based services…

Back to the original topic:

  • The Owncloud Client notified my that an update is available.
  • Owncloud Server does not support automatic updates like WordPress…. So reading through the manual.
  • Connect to server
    • Switch on maintenance mode
    • Move all to backup directory
    • Download and extract latest version
    • Copy config/config.php to new directory
    • Copy data/ to new directory
    • Run Update Script
    • Leave maintenance mode

In total about 15 minutes which is ‚waste of time‘ compared to the scenario OneDrive.

SlideMeister 1.2

SlideMeister 1.2 is now released… Source Code available under GitHub (by the way: Another US-driven service, I would like to get rid off):

https://github.com/mbrenn/slidemeister

The Download of the application is given under:

http://depon.net/downloads/slidemeister.zip

What has changed? 

  • Images are now created by factory methods instead being directly correlated in the main view
  • A step for transition sequence can now set several transition sets
  • Initialization of a transition is now working correctly
  • Filenames for exports include an ordinal number (ofor better sorting)
  • Minor layout improvements

Internal object structure for .Net

A very nice blog series is available within the following links. They describe the native memory layout of .Net objects. Knowledge about this allows specific optimization when a huge number of objects is handled…

Have fun!

Managed object internals, Part 1. The layout

Managed object internals, Part 2. Object header layout and the cost of locking

Managed object internals, Part 3. The layout of a managed array

Managed object internals, Part 4. Fields layout

BurnSystems.Base64

Just as a small training for implementing specifications, I implemented the Base64 part of the RFC 4648 completely.

By importing the complete PDF into Microsoft Word and marking requirement-relevant information with background color, I created a unit tests for the necessary chapters.

e.g. https://github.com/mbrenn/burnsystems.base64/blob/master/src/BurnSystems.Base64.Tests/EncoderTests.cs

Each unit test is green and code coverage for unit tests is about 100%.

Why did I create such a library, even though Base64 is directly supported by .Net Standard 1.0 and therefore each .Net implementation like .Net Framework or .Net Core?

As mentioned: I wanted to implement the RFC as strict as possible, which is not given by the .Net Framework (some exception handling deviates) and in addition it was given as a training how to implement RFC requirement documents and somehow get a tracing between the specification and implementation. More work will follow!

And… because I can!

(Source: http://sdtimes.com/fifteen-catty-programmers/)

The complete source code is available at GitHub:

https://github.com/mbrenn/burnsystems.base64/

 

xUnit does not currently work with .Net Standard

If you try to use xUnit with .Net Standard and have included the necessary packages for „xunit“ and „xunit.runner.visualstudio“, you won’t see the tests within the test explorer of Visual Studio. At least with the current version (xUnit 2.2.0 and VS Community 15.2).

If you would like to use xUnit, you need to create your test assembly as a .Net Framework 4.6.2 library and you may create your library itself as a .Net Standard project.

This works perfectly…

Keywords: Visual Studio, XUnit, Test Explorer Empty, .Net Standard.

 

By the way… This is the first post which is directly connected to Facebook and Twitter.