Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Programming Talk / C# - How do you set a default size of a control that you can resize?

Author
Message
Extending a C# Program
15
Years of Service
User Offline
Joined: 7th Jan 2009
Location:
Posted: 6th Jan 2012 23:22
How do you set a default size of a control that you can resize?

I have been looking at a code sample from Charles Petzold.

It is from here:

http://www.charlespetzold.com/blog/2009/05/Realizing-a-Fisheye-Effect-in-Silverlight.html
it uses mouse over methods to increase the size of button classes.

I have it working but I want to make some modifications. I want the starting size of the button to be larger. I do not know how much of the code I need to post here to make the issue clear enough. The XAML for the page describes a "FisheyeButton" that is described in a seperate xaml file. Something like this:




The functionality of the project is such that if I give the Fisheyebutton a width and height a set size at this loction, the effect where the size of the control the effect of becoming larger does not happen. In other words, if I write in the <src:FisheyeButton... tag above Width="100", then the button does not behave at run time as it should.

In the same page.xaml file, the btnStyle is defined like this:




I wonder if perhaps at this point, I can add a "Setter" property to define a default starting widh and height for the class.

Login to post a reply

Server time is: 2024-04-20 12:43:56
Your offset time is: 2024-04-20 12:43:56