I have been reading about changing the appearance of WPF controls. In most cases though the buttons were created from scratch and thus there were no multiple sources let alone one single image used to display a button, that would properly resize.
I want to display a button, which has a custom look to it. It should be able to load the visual data from an image (preferably PNG-image with per-pixel-alpha), slice it into pieces (please look at the scheme below) and thus resize the button correctly, while keeping as many advantages of the original WPF Button (including text / content, icons, events and binding) as possible.
Is something like this possible?
Is there a way to have a WPF template, that would use a certain imagesource (or perhaps even several separate files if need be) to allow a resizable button (or control in general if this is do-able). This button would contain an icon and some text and it would have an "onMouseOver" image-"template" as well as a "onMouseDown" one.
I know in CSS this is do-able having an image be a whole image-map and use coordinates and clipping rectangles to ensure proper appearance. Does anyone have an idea if this is possible and give me some pointers where I could look for how to "design" my own controls, that derive from known ones?
この特定のケースでは、ボタンと、場合によってはプログレス バーが本当に必要です。ボタンとプログレス バーのスタイルを設定する方法を理解できれば、他の種類のコントロールでそれを行う方法についてのアイデアが得られると思います。
私は .NET Framework 4.5 を使用していますが、このアプリケーションを使用するユーザーも同じフレームワークを使用する必要があります。
前もって感謝します!