Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change checkbox size WPF

Tags:

I want to make a bigger checkbox in WPF.

I've discovered that I need to do a control template, one example of which is found here: http://msdn.microsoft.com/en-us/library/ms752319.aspx

If I use that code the checkbox doesn't resemble the default look. All I want to do is change the Border Width & Height attributes.

I need a control template that looks exactly like the default, from there I will just change the Width and Height. Does anyone know where I can find one? Or a better approach?

like image 728
patrick Avatar asked Jun 06 '11 17:06

patrick


People also ask

How to increase CheckBox size in c#?

There's an AutoSize option in the Properties windows; if you turn that off by changing it to False , you will be able to modify the size of your CheckBox .


1 Answers

How about this?

<CheckBox>     <CheckBox.LayoutTransform>         <ScaleTransform ScaleX="2" ScaleY="2" />     </CheckBox.LayoutTransform> </CheckBox> 

You can use double values for ScaleX and ScaleY if the integer values are not exactly what you want.

like image 111
Matthew Avatar answered Sep 22 '22 10:09

Matthew