patrick
patrick

Reputation: 16959

How to create a UserControl that is a bitmap in WPF?

I was the functionality of a UserControl but I want it to look like a bitmap. How can I do this in WPF?

Upvotes: 0

Views: 140

Answers (2)

alpha-mouse
alpha-mouse

Reputation: 5003

You can do the following

  1. Download source of the Bitmap class that will snap to device pixels from here
  2. Rewrite it a little bit.
    a. Set UserControl instead of UIElement as it's parent
    b. Rename MeasureCore to MeasureOverride

I hope that will become the thing you need.

Upvotes: 1

brunnerh
brunnerh

Reputation: 184526

What about the Image control? What exactly do you want? How does a bitmap look like? Can you write more than one sentence?

Upvotes: 1

Related Questions